Culling Out Unneeded Terrain Tutorial??

Started by
2 comments, last by jtmerchant 20 years, 3 months ago
I basically know nothing about frustrum culling or any of that, but I'm looking for a good tutorial on how to not render unneeded(sp?) triangles on my terrain. Thank you, Joshua Merchant PS:: I already have a terrain running that is loaded by a grayscale - heightmap. [edited by - jtmerchant on January 5, 2004 2:11:52 PM]
Advertisement
What technique do you use to store and display your terrain. A triangle soup, vertex arrays, quadtree, maybe a LOD approach? Culling depends heavily on the way you handle your terrain data.
Well right now I just have a static vertex buffer that stores all of the vertices and a static index buffer that stores the order, and a simple one-dimentional array that stores the heights. This is quite simple and very much of a brute force method, so I can change it to the way a tutorial shows how to do it. One thing I don't want a link to is one of these articles here on GameDev as I have already looked at them, but I don't think they're very simple to understand.

EDIT:: I followed this tutorial. I changed most of the code, but the base idea is still there.

[edited by - jtmerchant on January 5, 2004 8:11:28 PM]
Ok, first a link to a frustum culling tutorial (not specific to terrains): click
The tutorial also mentions a quadtree. This is a datastructure I recommend for a flat terrain. By flat I don''t mean no bumps or mountains but flat as in a heightmap, not a sphere or something. A quadtree is relatively easy to understand. You just start with one quad. That quad has four children. Each of those 4 children have 4 hildren and so on till you reach some limit. The most leaf nodes of the quadtree (the quads without children) contain triangles.
Well, that''s a very basic description but you get the idea. The advantage this gives you when it comes to frustum culling is that you don''t have to check for each triangle if it is visible or not. You start with the root quad. Is it visible? yes or no? If a certain quad is not visible then you don''t have to test any of it''s children because they will also be invisible. This can give quite a perfomance boost in most situations where you can''t see the entire terrain (that is most situations).
I''ll edit this post when I find some more tutorials. (And finish some school work ;-) )

This topic is closed to new replies.

Advertisement