Sign in to follow this  
spythebeast

terrain rendering / culling , why am I getting underdraw?

Recommended Posts

spythebeast    122
I'm rendering terrain from a heightmap, this terrain is then divided into 32x32 chunks, which are then frustum culled individually. There is no quadtree implementation as of yet.. My culling works extremely well for models loaded from mesh files , and also seems to work perfectly for flat sections of the landscape. However when it starts testing for steeper sections of terrain I seem to get massive amounts of underdraw for sections close to the camera. I'm working out the radius (to use in the frusum culling calculation) for each segment of terrain by first working out the radius for each piece as if it was flat (i.e the diagonal length). Then I iterate through the appropriate part of the heightmap , and set the radius to anything that ends up being heigher than the previous calculation. Cheers

Share this post


Link to post
Share on other sites
JohnnyCasil    373
Why are you testing if it is the frustum using a sphere on an essentially rectanglar set of data. Why not just making some sort of bouding box around the chunks and test that.

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