Jump to content
  • Advertisement
Sign in to follow this  
goldie83

TriangleList to TriangleStrip converter

This topic is 666 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

Hi,

 

I have a big set of triangle lists, many of them could be packed in triangle strips.

 

Is there a well known/good algorithm to convert a triangle list ot a list of triangle strips?

Share this post


Link to post
Share on other sites
Advertisement

There's few libs:

https://github.com/spoonless/tristripper

http://www.nvidia.com/object/nvtristrip_library.html

 

NvTriStrip is significantly slower than Tanguy's tristripper, and works only with 16-bit indices. But its output often renders somewhat faster.

 

It might be that you'll benefit mostly because of triangles reordering, rather than because it will be rendered as strips.

It's unlikely your mesh might be expressed as single strip. So either there will be degenerate triangles connecting strips, or you'll have to draw mesh in multiple calls.

If you don't care about strips, those libs can generate optimized triangle lists.

Also there's another option for meshes that will be prepared offline - use AMD Tootle, it can optimize meshes not only for vertex/prefetch caches, but also for lesser pixel overdraw.

Share this post


Link to post
Share on other sites

Yeah - you want a good triangle list rather than a triangle strip, even if your target platform supports primitive restart to allow efficient stitching of strips, triangle lists can still outperform strips because they utilize the post transform cache better. This is a solid algorithm that generates good triangle lists without you needing to know the size of the GPUs post transform cache. https://tomforsyth1000.github.io/papers/fast_vert_cache_opt.html. tristripper is good too.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!