Level of detail

Ah, I apologize for not posting this post until now, haven’t had enough time to write it during the weekend.

Right now, I have a fully functional level of detail system for my terrain grid (Note that this does not include changing the LOD of the rendered nodes depending on the camera location, as this was scheduled to be implemented later on). I will attempt to explain how I decided to make this work. The different LOD levels are created by stepping through the heightmap pixels using different step lenghts (Right now I use 8 pixel steps for the lowest quality, 4 pixels for the second lowest, 2 for medium quality and 1 pixel for full quality). This, however, is not enough, as it will produce cracks where different levels meet each other, as the pixel that the lower level of quality will skip is probably not aligned with the other two adjacent pixels.

I decided to solve this by making the outer borders of each node use the highest quality, no matter the LOD level. Doing it this way is on one hand heavier for the application to render, as we require quite a few extra polygons. On the other hand, if I had done it the opposite way and used a specific lower quality for the borders, we would be able to spot the node edges much easier as we move around, as the lower quality around these areas will stick out more heavier (While we won’t notice the higher quality edges on the lower quality level nodes, since they’ll be too far away). I could have solved it by continously checking if each node is adjacent to a node with a different quality level, and changing the border edges to match that quality. However, the method I’m using right now is working without any problems, so I’m using it until I am forced otherwise, or I figure out a much better method.

Well then. I think it’s about time to begin looking into the creation of heightmaps. Stay tuned!

Be Sociable, Share!

Leave a Reply