Sunday, December 16, 2007

Clarity Progress - Week 11

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:

  1. Move patch generation into a separate thread so it doesn't hold up the rendering frame rate.
  2. Create a queue of patches to be generated.
  3. Implement some sort of error metric to determine which patches to generate, and which to reclaim.
  4. Any kind of performance increase
  5. Allow mouse and keyboard input to control the camera position.
  6. Place objects near the surface for scale reference.
  7. 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.

3 comments:

  1. Hey, are you still working on this?
    I'd like to know more about what problems you may have run into, as I'm about to start a similar project.

    Thanks

    ReplyDelete
  2. The project got sidelined for a number of reasons, the dumbest of which was my desire to move from Blogger to another platform and my inability to do so quickly.

    I'm planning on picking it back up as soon as I get my new blog up... Probably next week or the next.

    I'd be happy to discuss my findings with you, though. What kind of experience do you have with this sort of thing?

    ReplyDelete
  3. none at all!

    I've been doing small 2D games for a while, and I'm picking terrain rendering, subdivision and generation as my undergrad thesis (computer engineering).
    So far it seems i'll focus on the rendering, but I'm also interested in generation and precision issues.
    Looking forward to the new blog :)

    ReplyDelete