Jump to content
  • Advertisement


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


converting from tri-fans to tri-strips on terrain rendering.

This topic is 5458 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Implementing a triangle fan based quadtree terrain engine was easy enough. but every suggested that i move over to triangle strips for speed and space. After some though i quickly came across a problem, or should i say, a challenge. Since my terrain will always have areas with different level of details, triangle strip rendering seems almost counter-intuitive. Im using a vertex buffer that draws 1000 vertices per drawprimitive call. so it loops thru, drawing 1000 vertices worth of polygons until the buffer has all been drawn. problem with using tri-strips is that moving from one quad or area to another will cause the triangles to draw undesireable triangles at undesireable locations. ex: suppose one area far away from the camera is represented by 1 large quad (8 polygons). Then the quads (which are at a higher detail) that are neighbors to the first mentioned quad will have to be drawn BUT CONTINUING with the same triangle strip. Can you see the potential problem here? how is it done then, using tri-strips?

Share this post

Link to post
Share on other sites
If you are using tri-fans, then I assume you are not using CLOD. If you are, this would make switching to tri-stips somewhat harder.

Anyway, there are two "tricks" for using triangle strips:
1. Use larger patches for each LOD.
2. Use degenerate triangles to link the end of one strip with the beginning of the next.

If you could post a sketch of how the triangles in your terrain are arranged, especially in two neighboring areas of different LODs, this would help any additional explanations...

Michael K.,
Co-designer and Graphics Programmer of "The Keepers"

We come in peace... surrender or die!

[edited by - technobot on August 13, 2003 3:58:42 AM]

Share this post

Link to post
Share on other sites
im using triangle fans on a CLOD terrain.
so im calling drawprimitive for every quad (a fan).
so the drawing for this is easy, simply draw the vertex set for every quad that needs to be drawn.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!