Sign in to follow this  
Matt328

terrain lod

Recommended Posts

Matt328    272
I'm currently trying to implement geomipmapping in my terrain renderer, but having some trouble trying to figure out the fastest way to do the actual draw calls. I'm using a 512x512 height map field which I've read in from a raw file, and calculated a list of (512*512) vertices. I would like to send these to the card once, then be able to pick and choose which verts to render (say for certain patches I want to change the LOD bias and render only a subset of certain vertices) through an index list. Would it be better to try and make this work, manipulating only the index list, or would I be able to get away with manipulating and pushing the actual vertex list every frame? gldrawelements seems like it might do what I need, it allows you to specify a pointer to an index list right? Edit: if the gldrawelements works as I think it does, couldn't I simplify this one step further and set each patch as a separate vertex array, and use a generic index list for each LOD? for example say patch x is going to be rendered with LOD=2, so draw x's vertices using index_list[2]

Share this post


Link to post
Share on other sites
Promit    13246
Quote:
Original post by Matt328
Edit: if the gldrawelements works as I think it does, couldn't I simplify this one step further and set each patch as a separate vertex array, and use a generic index list for each LOD? for example say patch x is going to be rendered with LOD=2, so draw x's vertices using index_list[2]
You'll find this will be a much better strategy in the long run. It's inefficient in the form you described, but is easily optimized to a very fast version (so fast, in fact, that the overhead introduced when compared to brute force is negligible).

Share this post


Link to post
Share on other sites
Matt328    272
Thanks, Promit. I've been kicking this around for a few days now, read just about every paper there is on geomipmapping, but wasn't able to visualize exactly how to render in OpenGL. Hopefully I can get started on the implementation soon, I'm sure I'll be back with more questions.

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