LOD - Level of Detail. This was a lot of drudge work to get done, but I'm really happy with the results.
Here you can see the visual impact of increasing level of detail patches:
You can click on the picture for higher detail, but I wasn't able to get blogger/picasaweb to accept the image in it's orginal format of 2000x3000 pixels. Annoying. I suppose I could host the pictures on the sourceforge website, but that would be a waste of the space there.
The white lines show borders between patches, and the red lines show an edge between different levels of detail. Getting those red edges working properly was probably the hardest part of all of this
The triangles along that edge have to be adjusted so that there aren't any more vertices on one side than the other to avoid t-junctions:
It seems easy enough when you look at it, but there was a lot of trickery going on to make lookups between neighboring patches work between different levels of detail.
So, by manually or randomly increasing the level of detail, there is plenty to look at when you zoom into the planet:
In that sequence, I randomly adding LOD as the camera gets closer. I got the terrain generation algorithm producing some more convincing mountains, but there are also some odd spikes that I have to track down. If you look at the right side of the globe in the lower left corner, you can see a few unexplained spires.
My goal is to make it all the way to the surface of the planet and show the correct level of detail, with vertices spaced out about 1 meter apart. I think that is around the level of terrain detail you get in a game like Battlefield.
There are a number of things which need to be done before the camera can get down that far:
- Move patch generation into a separate thread so it doesn't hold up the rendering frame rate.
- Create a queue of patches to be generated.
- Implement some sort of error metric to determine which patches to generate, and which to reclaim.
- Any kind of performance increase
- Allow mouse and keyboard input to control the camera position.
- Place objects near the surface for scale reference.
- Tweak the terrain generation algorithm so it looks good at close range.
But, the holiday season is here, so I won't have much time to spend until January. I'm not planning on accomplishing any of that until January. Week 12 will officially begin after new year's day.