| Tuesday, December 20, 2005 |
 New planet video |
Posted - 12/20/2005 5:21:18 PM | Finally, it is done.
I've been missing some time to fix all the issues, but i'd say it's "good enough". You might notice a bit of popping in the textures, that's because recording with fraps decreased the framerate to the 30s, which in return made the texturing process "lag" a bit. When it's running at over 100 fps, popping doesn't appear.
In addition in some view angles, the atmosphere is not correctly blended with the ring (a sort of dark halo appears, which makes the ring look ugly). I tried to not show it, but that's something i'll have to fix in the future.
The video is a bit long ( 4 minutes ) and weights 75 MB. Encoded in Divx4 as usual.
Primary download link
Mirror Link
New screens:




| |
| Monday, December 19, 2005 |
 Preparing the video |
Posted - 12/19/2005 10:52:33 AM | I'm now in X-Mas vacation, so i've been pretty busy ( preparing my trip back to France to see my family, buying presents, etc.. ). On the Infinity front, i'm now preparing the promised video. It should be done by tomorrow, as i'm taking the train on Wednesday ( so if it's not out by wednesday, you'll know i missed the deadline ). I've been working on fixing a few bugs & artefacts in the terrain engine, adding back the clouds layer ( and tuning its shader ), and finally making a tool to convert a Mercator-like map to a cube map, in order to display a Jupiter-like planet in the sky.
I'll start to work on things like vegetation, volumetric clouds, water or weather effects.. next year. Until then, after the video, it's very likely that i'll be working on non-3D related things, like the user interface, or even the gameplay basics.
| |
| Wednesday, December 14, 2005 |
 Low orbit view |
Posted - 12/14/2005 11:22:09 AM | As i've mentionned in a previous entry, the low orbit view is now looking pretty good. I got ride of the visible tiling in the detail textures ( to the cost of more texture popping, but that'll be fixed later ).
I've found a NASA picture on the web showing how the atmosphere looks like from a low orbit, and tried to replicate it. Clouds are missing, and the ground features are of course different ( my planet is not Earth, after all ), but the colors are matching pretty closely, so i'm happy:

| |
| Monday, December 12, 2005 |
 Detail textures, step 5 |
Posted - 12/12/2005 4:43:29 PM | Actually, i should stop calling this "detail textures". Detail textures are now in and fully working, so i guess as soon as next time i'll go back to "terrain step". I'm really not that productive these days: i'm spending far too much time exploring the planet, tuning the parameters, colors, etc..



| |
| Saturday, December 10, 2005 |
 Detail textures, step 4 (and a new panorama video) |
Posted - 12/10/2005 2:55:47 PM | Not a lot of progress today, it's the week end, and i'm in a relaxing mood. Still spent an hour to fix a few things though.
The low orbit views are now back to looking decent. I thought to a trick yesterday evening in my bed, while trying to sleep: using a dynamic texture scale, instead of a constant one. This makes the repeating pattern disapear at high altitudes, because the texture repeats less quickly than at ground level. The scale is dependent on the depth of the terrain patch (ex.: at level 12 of the octree, the scale is x32; at level 11, it is x16; at level 10, it is x8, etc.. ). Of course, there are now seams between patches of different levels, but there was already seams before, and it's not really much visible. If that really becomes a problem later, i can still use a per-vertex scale instead of a per-patch one, so that the scale value is continuous.
I've added an alpha channel to the detail textures, that encodes the bumpiness of the terrain. These are combined together in a pixel shader, to make lighting more or less strong depending on the surface (ex.: rock has a lot of bumps while grass has very little).
The next "big thing" to do now is to fix the texture popping problems, using alpha blending.
I've made a new 360° panoramic video to show off the detail textures on "Mount Showwhite".
Get it here (15.2 Mb DIVX 4)
Warning: it's a high quality video, encoded at 3500 bits/sec in 800x600. Due to this, there was some slowdowns while recording the video, so you shouldn't be worried about the performance. In real-time on my computer it runs at 130-150 fps.

| |
 Detail textures, step 3 (continued) |
Posted - 12/9/2005 6:07:00 PM | I'm probably going to hell. It's soon midnight, and i haven't done any progress in the past two hours.. i've been too busy.. tweaking some parameters, then exploring the planet. You can get lost so easily, i doubt i'd be able to find again the exact location of all the places i'm taking into screenshots. But here are two new ones that i found interesting:


| |
 Detail textures, step 3 |
Posted - 12/9/2005 12:13:30 PM | Sweet people, here i do officially present you Mount SnowWhite. Meet Mount SnowWhite: a huge mountain located in a long chain of mountains ( second view ). This mountain is, by strange circumstances, approximately the same size than Mount White, Alps, on Earth ( 4700 m ). The screenshot was taken at an altitude of about 1740 m, where the eternal snows are starting. The top of the mountain is actually a plateau: it is completely flat, but it cannot be seen from that view. The huge rock on the middle-right is a cliff almost 500 m high. The mountain can be seen at up to a 50 km distance.


I'm continuing to improve the detail textures generator. Today, i've been working on the turbulence parameters for the normal map and the height map. I've also added support for multiple layers sharing a single texture. I added an immediate mode for my renderer, looking OpenGL-alike. I've also separated the concepts of texture unit and texture interpolator in the renderer, to allow me to access up to 16 TMUs ( needed for better detail textures ).
The low orbit view still looks horrible.
| |
| Thursday, December 8, 2005 |
 Detail textures, step 2 |
Posted - 12/8/2005 10:12:34 AM | 

Things are getting better, i've fixed some artefacts introduced by the detail textures algorithm, and i've added variety to the detail textures.
Still, i'm not happy at all. Of course, the two screenies above are pretty good, but due to the tiling patterns, the quality of the low-orbit views has been greatly reduced. That's a real shame. But i can surely improve many things. I still have to improve the heightfield & noise generation and the rules used to procedurally map the terrain. The lighting is a bit too uniform, too.
| |
| Wednesday, December 7, 2005 |
 Detail textures, step 1 |
Posted - 12/7/2005 5:04:56 PM | So here we are. I've started to implement detail textures. It's extremely early, and i've actually broken some other parts of the code :) So, i was hesitating a bit to post it, but i thought the end result was "good enough" to show.

As usual, the conditions are very different from the last set of screenshots. The atmosphere doesn't look the same and it's not the same location. But if you look closely at the ground, you'll notice it's now textured. I'm using a set of texture layers and a technique called texture splatting. However, instead of assigning weights per vertex ( the standard way of doing splatting ), i'm assigning them.. per pixel.
This isn't much visible in that screenshot, for a simple reason: as i'm early in my tests, i'm only using.. 4 layers. That's right, only 4: water, grass, forest and snow. Of course i plan to add more layers for more variety.. i think i'll go up to 12 layers. In addition, in this screenshot, i've disabled the per-slope texturing. It's only altitude based. Taking into account the slope, i think the variety and realism of the terrain will be increased a lot. Finally, i still have to tweak the lighting to match the terrain sharpness better.
The best thing ? Per-pixel texture splatting comes out to be free as far as performance is concerned, since i'm only using it at texture generation time (ie. once every N frames), and the textures are then cached for the "normal" rendering.
The addition of detail textures immediately gives a better understanding of the scales of the "features". For example, in the "above" screenshot, the two mountains look more like hills. In fact, they are many kilometers high! The new screenshot with detail textures shows mountains which are pretty much the same size, but now you really feel high in the sky, instead of being a few meters above the ground only..
With vegetation and clouds casting shadows, i think the terrain engine will be pretty close to what you could find in a flight simulator.
In a few days, i'll test a non Earth-like planet with the textures Betelgeuze made.
| |
| Tuesday, December 6, 2005 |
 Untitled |
Posted - 12/6/2005 5:35:22 PM | A few days ago i promised to post a video showing seamless planetary transitions. It's not ready yet, but to make you patient until i fix all the bugs and implement detail textures, i've uploaded a small "teaser" video: a panoramic view of a valley, surrounded by mountains.
Get it here ( 3.7 Mb DIVX4 )
| |
 Heightfield/Atmosphere improvements |
Posted - 12/6/2005 11:00:44 AM | I'm working on the heightfield generation for the planet surface, as well as improving the atmosphere as seen from space, and some shader parameters. Not much to say, so i'll just post two "experimental" screenshots:



| |
 Seams fixed, coming work |
Posted - 12/5/2005 4:22:01 AM | Texture seams more or less fixed (there are still a few seams here and there, mostly between patches that are at a differnet LOD level, but since they're usually quite far from the camera, it's not too bad).
Plan for today:
- blending for smoother texture transitions
- playing with the heightfield generator parameters
- starting to work on detail textures
Here are two images with the atmosphere wavelength R & G switched:


| |
 Fixing seams |
Posted - 12/4/2005 10:32:51 AM | I've spent a couple of hours this week end to try to fix the seams problem. You see, when doing texturing, i'm using a normal map in order to correctly texture and light a terrain patch. Each terrain patch has got a local heightfield ( basically, a square area covereing a part of the planet ), and some "links" to the adjacent patches ( this is a part of the algorithm to avoid cracks between patches ). For example, look at this diagram:

In black, a patch at level N, and in orange and green, the two right adjacent patches to the black one, in orange and green, both at level N+1.
Now, to generate the normal map of a patch, i'm using the most simple technique ever: differencing the heightfield. For a given texel, i just take the 4 adjacent heights ( left, right, top, bottom ), and generate a normal from that.
The seams problem occurs for all the texels that are on the boundary: for example, all the texels that are at coordinate x = 0 in the patch. The left adjacent height is undefined for those. So, before, i was simply taking the current height, rather than the adjacent one.
You can see in the following shot, the typical problem when showing off the normal map. In red, the horizontal seams. In blue, the vertical ones.

How to fix that ? I choose the most logical solution: taking the height directly from the adjacent patch. Since i've got the links to the adjacent patches, you're probably thinking it's surely only a matter of sampling the heightfield from the adjacent patch, isn't it ? Well, unfortunately, no, it isn't so easy. You have to remember that the adjacent patches can be at a different tesselation level. You have to list all of the possible situations ( left = level - 1, left = level, left = level + 1), and also handle the case where the sampled height doesn't exist.. yet. Just think about it: if the current patch is at level N and the left one is at level N-1, half the height values in the left patch are "missing", and have to be generated on-the-fly when computing the normal. I'll save the details here, but believe me: sometimes it's mind-boggling.
Anyway, i've finished to fix the horizontal seams. Fixing the vertical seams is only a matter of hours now ( hopefully it should be finished tomorrow ). Here is a screenshot after the fix. If you compare with the previous screen, notice that the horizontal seams ( red arrows ) have disappeared, and that the transition for these normals is now smooth:

| |
|
| S | M | T | W | T | F | S | | | | | 1 | 2 | 3 | | | | | | | | 11 | | 13 | | 15 | 16 | 17 | 18 | | | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | | | | | | |
OPTIONS
Track this Journal
ARCHIVES
October, 2009
August, 2009
July, 2009
May, 2009
April, 2009
March, 2009
February, 2009
January, 2009
November, 2008
October, 2008
July, 2008
June, 2008
May, 2008
April, 2008
March, 2008
January, 2008
December, 2007
November, 2007
October, 2007
September, 2007
August, 2007
July, 2007
June, 2007
May, 2007
April, 2007
March, 2007
February, 2007
January, 2007
December, 2006
November, 2006
October, 2006
September, 2006
August, 2006
July, 2006
June, 2006
May, 2006
April, 2006
March, 2006
February, 2006
January, 2006
December, 2005
November, 2005
October, 2005
September, 2005
August, 2005
July, 2005
June, 2005
May, 2005
April, 2005
March, 2005
February, 2005
January, 2005
December, 2004
October, 2004
September, 2004
August, 2004
|