Tossing away triangles

Published March 13, 2006
Advertisement
After playing around with Land-o-Rama for a bit, I noticed that it is rendering a boatload of triangles more than it needs to.

Here's the screenshot showing the terrain patches again:



The patches with the same color share the same LOD. The brightness inside of the patches indicates the morphing amount to use, where 0.0 (finest) is represented by a darker shade, while 1.0 (coarsest) is represented by a lighter shade.

Take a look at the patches with the big black X's in them. All the vertices in these patches have a morphing amount of 1.0, which means that their triangle meshes can be replaced by a one-quarter resolution triangle mesh with absolutely no decrease in rendering quality.

Now, when Land-o-Rama detects that all vertices in a patch contain morph amounts equal to 1.0, it replaces the standard index buffer with a smaller index buffer that skips every other vertex in both the x and y directions.

This cuts the number of triangles rendered by 30 to 40 percent, with a corresponding increase in frame rate. w00t!
0 likes 5 comments

Comments

Sir Sapo
Wow, you're really cranking out the journal entries, it usually takes me at least 2 days to get enough stuff done to fill just one good entry.

Keep up the good work
March 13, 2006 11:52 PM
jasjas
Very cool! Did you enjoy reading them? Does it actually make sense?
March 14, 2006 12:58 AM
darkpanda
Very well furnished journal indeed.

I find it makes sense, though I didn't really read enough to understand the whole idea behind your engine, precisly that "morph" principle. I'll sure get more once I do :)
March 14, 2006 01:27 AM
Dirge
Absolutely, great journal and a very impressive job thus far! Your implementation is also very interesting so would be nice if you could include more details into the algorithms you employ.
March 14, 2006 02:43 PM
Corman
Keep up the good work, and a Rate++ from me to welcome you here. I know the welcome is a little late but it has been awhile since I been on here.
March 16, 2006 03:15 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement