Archived

This topic is now archived and is closed to further replies.

SoaringTortoise

Dumb question on VB's with view culling

Recommended Posts

Okay, my terrain is made up a uniform height field. I store all the geometry in a collection of vertex buffers and then render all those vertex buffers that are within visual range using standard frustrum culling. I get best view culling when I use VB''s of around 10x10 square units, but this is only going to store 200 polygons per VB, which is about 1/10th the optimum, right. But, if I store the optimum poly''s(2,000... i think) I can''t cull the view properly and my frame rate drops because I''m drawing far too much terrain that isn''t visible. Question is... How can I cull part of a VB? I know about drawing sub-sets of a VB, but this only works for adjacent triangles (drawprimitiveup frompoly for x poly''s). I could break down my rendering into multiple drawprimitiveups that draw subsets of a VB, but that sounds really slow. Is it even worth doing that, or should I just stick with my 100 poly VB''s? Is there, perhaps, a better way? Last thing to go through a tortoise''s mind before it hits the ground at 40mph? "D3DXVec3Add (Tortoise.Pos, Tortoise.Delta, Tortoise.OldPos"

Share this post


Link to post
Share on other sites
What you could do is have your terrain chunks share VB''s. So say you could have each VB with a few thousand polys, shared by a group of 4x4 chunks, with a couple of hundred polys each.

If more than a certain amount (say 75%) of the whole group is visible then just render the whole thing in one call. Otherwise work out the specific chunks that are visible are render them individually. If youre using DrawIndexedPrimitive(UP) then you could each rebuild the index buffer so you can render the visible chunks in one call. Depending on the hardware, and size of terrain chunk that might not give any benefit though.



Share this post


Link to post
Share on other sites