Some NvTriStrip questions...

Hello! Yesterday I’ve integrated nvtristrip into my model converter to generate triangle strips. It works fine, but some things are not clear to me.

  1. What is the best value for minstriplength?
  2. Should I stitch the strips together?
  3. How should I use remapIndices()? Should I use it on the generated strips or on the original indices array? And anyway what does it do?
  1. What is the best value for minstriplength?
    Depends on your mesh file, If the min strip length is too high you might end up getting no strips at all, if it is too low, you might have to call glDrawElements() multiple number of times increasing function call overhead, you you can use glMultiDrawArrays() though, Try setting this value to just a little more than the Vertex Cache size of your card.

  2. Should I stitch the strips together?
    Degenerate triangles decrease performance, stiching strips does that.

  3. How should I use remapIndices()? Should I use it on the generated strips or on the original indices array? And anyway what does it do?
    I dont think you can call remapIndices() on tri-strips (maybe you can, I am a lil rusty on this), this rearranges your vertices so that the indices dont jump too much so that its cache friendly (I mean if you had indices like (10,100,500) for a single triangle, it would change this to (10,12,14) or something so that your index access for triangles are cache friendly.

-Sundar

Thanks for your reply. I’ve already figured out the usage of RemapIndices().

But there is another problem. On some meshes there are some triangles missing after I generate tristrips. I have no idea why is this. Is this a bug, or am I doing something wrong? (The original non-stripped mesh works fine)

nvtristrip is a little buggy, in my experience.
You’ll probably have a nicer time using this open source tristripper: http://users.pandora.be/tfautre/softdev/

It’s supposed to be faster and produces better organised strips than the nvidia one.
It’s written by GPSnoopy whom frequents this forum, so if you have any questions about it you’ll probably get some decent free support from him!

Thanks. I was thinking about using tristripper, but I wasn’t sure that it is as good as the nvidia one. But I’ll give it a try…

OK, tri stripper works very well. But one last qestion: should I stitch the strips together, or leave them as they are? Which would be faster?

Originally posted by Catman:
OK, tri stripper works very well. But one last qestion: should I stitch the strips together, or leave them as they are? Which would be faster?

Originally posted by Sundy:
[b]2. Should I stitch the strips together?

Degenerate triangles decrease performance, stiching strips does that.
[/b]

I know that, but I also know that lots of glDrawElements() calls are also slow. Well, I think I’ll have to test it myself…

One thing I have noticed (I’m playing around with nvTriStrip at the moment) is that if you do link your strips you appear to get artifacts appearing in your object.

Although I must admit I noticed that when I was just stripping one mesh in one object. When I do the entire scene the mesh is being mangled. It might be something I’m doing wrong.

Maybe I’ll try the Tri Stripper lib too (sigh just have to decipher the STL now…)