• Advertisement
Sign in to follow this  

Terrain Geomorphing

This topic is 2637 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

The time has come for me to implement a LOD system to go along with my Quadtree frustrum culling system, to try and improve performance. I have looked at articles on ROAM, and other algorithms of the like, but I think i've settled on a less complicated LOD system along with geomorping:


Now, in the IRC channel I got mixed reactions. My program currently runs unlit, textured terrain at a maximum of about 1kfps, going down to a dire 100fps. It needs to be stressed that I have nothing else at all in the scene. No lighting. No shadows. There is almost no overhead in my code. Some said that I must have a bottleneck other then LOD, but I'm pretty sure it is LOD. I have a small terrain (512m * 512m) and I was thinking of applying what was mentioned in the above article.

If I do use it, I plan to:

Use my quadtree system to determine visible leafs (or patches)
Generate the vertices needed for each of these leafs
Write all of the indices to the index buffer (The buffer is completely rewritten per frame)
Draw the entire visible terrain in one big DrawIndexed call:

pDeviceContext->DrawIndexed(nIndices, 0, 0);

At the moment, I have some brute force code, which I am sure might be the root of my bad performance. (I say bad performance relatively, taking into account how little is being rendered or processed). I think having a fast method to calculate the indices for each leaf, as well as batching the terrain into one draw call would speed up performance.

for( UINT p = 0; p < techDesc.Passes; ++p )
mTerrainShader.pRenderTechnique->GetPassByIndex( p )->Apply(0, pDeviceContext);

for(int i = 0; i < nVisibleLeafs; i++)
pDeviceContext->DrawIndexed(pVisibleLeafs.nIndices, pVisibleLeafs.uStartIndice, 0);

I await your replies, my question is should I be switching to an LOD system (I plan to eventually render terrains many times larger then I am now), how would I calculate the needed tesselation level for each patch if I did (The article above sort of glossed over it) and lastly, if at all possible some pseudo code for how to deal with T vertices as mentioned in the same article.

Share this post

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

  • Advertisement