Sign in to follow this  
dxdotnet1

terrain rendering question

Recommended Posts

ive read some CLOD algorithm in the net like geomipmapping and/or rottger but all of the tutorials given are implemented in DX and was not using any vertex and index buffer. I havent found any in DX :( If i were to use some CLOD(geomipmap for example) how can i implement vertex buffer with it? store all the vertices as one VB dynamically or separated VB per patch? what if the number of vertex exceed the limit of the vid card?

Share this post


Link to post
Share on other sites
Hi there,
I had the same problem a while ago. The best practise is to normally understand your API first and then read the white paper and try to understand the theory. If you put both of those to good practise the problem becomes seamingly easier.

Another option would be to try and find someone on #gamedev on the afternet servers who has implemented one of the algorithms.

Share this post


Link to post
Share on other sites
Since Geomipmapping isn't really a continuous level of detail algorithm, implementing it with vertex buffers is actually fairly easy. Just think of each chunk (at each level of detail) at an individual level; you could build a bunch of static vertex buffers as a pre-process step (one for each chunk, then for each LOD - there shouldn't be too many), and then you can just swap between the various buffers as the algorithm demands them.

Unless you plan on having deformable terrain, this should be the optimal solution for your problem. And even if you do want deformable terrain, you should think about that after you get a basic engine implemented once you have a bit more experience with terrain engines.

Hope this was some help (and not too confusing - it's early for me).

Share this post


Link to post
Share on other sites
Well recently i've implemented geomipmapping in C# with managed directx, and what i'm doing is cuting the terrain in sectors and using a vertex buffer per section and one global array of index buffer's each corresponding to a level of detail. I can recommend to you this site http://homepage.mac.com/jhuwaldt/java/3DStuff/GeoMMap/GeoMMap.html with an implementation of geomipmapping in Java and this book : Real-Time 3D Terrain Engines Using C++ and DirectX 9 and Trent's book : Focus On 3D Terrain Programming

I plan to post my implementation of geomipmapping to codeproject, but first i need to get rid of the nasty t-junctions in the terrain.

Meanwhile i have uploaded a version nearly finished to this location :
http://s39.yousendit.com/d.aspx?id=1GK9O2QFF5JQG0OGDAZ1MPL7LS

Fell free to grab it :-)

It uses quadtree based frustum culling and a version of the geomipmapping algorithm. The code is based on the engine implemented in Realtime Terrain Engines using c++

I have to warn you the t-junctions problem is not resolved...

Good Luck !

[Edited by - i24021 on July 20, 2005 8:34:26 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this