Sign in to follow this  
Valor Knight

Need help with terrain stitching optimization

Recommended Posts

So it has come to this, after 4 revisions, I still feel my terrain stitching, for geo-mipmapping code still is too big, clumsy, and down right looks horrible. It is also probably slow, it produces good looking terrain stitching though imho. So, I figured instead of me trying to do it again, I would try to get a second opinion, perhaps some tips. Frankly it looks too horrible to actually work efficiently; there must be a better way. Or is this how it is done? I have vertex caching for lod 0 only (I hope it works), but have not got around to doing it for the other lod levels because I am stumped for optimizing this. I know that this code is dragging down my fps, so I would love to do anything and everything I can to make it faster. Without further adue, here is my mess for stitching the index buffer for a patch. There was a lot of white space that screwed up the forum size, so I had to link to it. See link below for the source link to the source Later on, I would love to add geo-morphing, but that is not a priority right now. So: 1 Is this the best way to do stitching, (I would love a nice clean loop or 4 ;) ) But I am at a loss for how to do it when you need to match corners – Would zero-ish area triangles work? 2 What can I do to speed this up? It is just this code is called whenever a patch of terrain is changing lods, so it must be as fast as I can possibly get it. this is what it looks like stitched together: Image hosting by Photobucket Thanks EDIT: had to link to the source since there was whitespace that I didnt notice that screwed up the forum size. link to the source [Edited by - Valor Knight on March 15, 2006 3:47:20 PM]

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