Jump to content
  • Advertisement
Sign in to follow this  
ndhb

OpenGL Large terrain with support for run-time modifications

This topic is 3632 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just post to share some work with terrain rendering that I did for a university project. The project was about how to render very large terrains and still be able to make modifications to the terrain surface (erosion, explosions, etc.). The approach I came up with is based on the Clipmap Texture. The implementation was written OpenGL and Java and uses Shader Model 4 features (texture arrays, vertex texture fetch with a non-32f texture format). I used the 16385 x 16385 dataset from Puget Sound found here. The terrain is not textured because I wasn't able find a detailed aerial photograph of the area, but there is diffuse lighting. Here are two screenshots in which I added some bump-mapping noise. Flying above Mt. Rainier Looking towards Mt. Rainier Another screenshot uses a single dirt texture repeated across the surface modulated with noise. Computing procedural textures is something I would like to work on in the future. There are other screenshots in my paper. The paper also describes the approach in detail. Although the world probably doesn't need another terrain render algorithm, maybe someone can use this for something. I anyone has any comments or questions, I will try to explain or answer. I have uploaded a video of the runtime modifications to the terrain (it's compressed with www.xvid.org codec). There's also a video of the incremental updates as the detail center is moved around [Edited by - ndhb on November 17, 2008 8:39:32 PM]

Edited by ndhb

Share this post


Link to post
Share on other sites
Advertisement
Looks nice :)

Im looking into terrain rendering myself but deformation/modification isnt really on my list. However i do want to use authentic GIS/Bathymetric data for the terrain map.

Share this post


Link to post
Share on other sites
Congrats on the nice paper you have written there, especially a lot of good background information.

Re your method for avoiding T-junctions, the end result seems similar to that used in the Infinite Universe Engine (PDF). They restrict neighbouring tiles to differ by at most 1 level of detail, and pre-calculate the 16 unique index buffers, and use them based on the level of adjacent tiles. This results in a similar mesh configuration, but avoids the degenerate triangles and some complexity in the vertex shader.

Share this post


Link to post
Share on other sites
Thanks Barking_Mad and Swiftcoder.

Quote:
They restrict neighbouring tiles to differ by at most 1 level of detail, and pre-calculate the 16 unique index buffers...


I just read the paper you linked to. I liked that the author points out the problems with cascading split/merge operations on the bintree. These are a serious concern when handling very large datasets with these CLOD algorithms (e.g. ROAM). Clearly this issue only becomes even more serious when the terrain can be modified (!) and it deterred me from pursuing a CPU based algorithm.

Yes, pre-computing different index buffers and binding them to the VBO as dictated by neighbouring levels, would also avoid these tile-transitions. Whether rebinding the index buffers (API function call overhead) or evaluating the instructions in the vertex shader (shader overhead) is faster, I can't really say without experimentation - I guess it largely depends on the number of patches/draw calls to cover the terrain is satisfactory detail.

Share this post


Link to post
Share on other sites
Quote:
Original post by ndhb
Quote:
They restrict neighbouring tiles to differ by at most 1 level of detail, and pre-calculate the 16 unique index buffers...
Yes, pre-computing different index buffers and binding them to the VBO as dictated by neighbouring levels, would also avoid these tile-transitions. Whether rebinding the index buffers (API function call overhead) or evaluating the instructions in the vertex shader (shader overhead) is faster, I can't really say without experimentation - I guess it largely depends on the number of patches/draw calls to cover the terrain is satisfactory detail.
I avoided the binding cost by placing all 16 index sets in a single buffer, and using different index ranges depending on the neighbour configuration.

Share this post


Link to post
Share on other sites
Quote:
I avoided the binding cost by placing all 16 index sets in a single buffer, and using different index ranges depending on the neighbour configuration.


Clever. I will try and play around with that idea when I find time for it :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!