tristrips and trifans in Maya

Hello everybody.

First I’m sorry for my ( very ) bad english. I’m french student and it’s not easy for me.

So currently i’m working for an internship and I have to make a collada writer. I have made a first version of my writer with only triangles geometric. Now I wanna optimize it by including tristrips and trifans. But I don’t find any exemples of collada file with trifans or tristrips. Have you got some one ?

I tried to make my own “example file” but when I open it in Maya viewer the tristrips does not appear. I also tried to open it in GLC_Player but it’s the same thing.

This is my example file :

<geometry id=“Tristrips”>
<mesh>
<source id=“tristrips-positions”>
<float_array id=“tristrips-positions-array” count=“24”>0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 1 1 0 1 0 1 1 1 1</float_array>
<technique_common>
<accessor source=“#tristrips-positions-array” count=“8” stride=“3”>
<param name=“X” type=“float”/>
<param name=“Y” type=“float”/>
<param name=“Z” type=“float”/>
</accessor>
</technique_common>
</source>
<vertices id=“tristrips-vertices”>
<input semantic=“POSITION” source=“#tristrips-positions”/>
</vertices>
<tristrips name=“tristrips” material=“Tois” count=“1”>
<input semantic=“VERTEX” source=“#tristrips-vertices” offset=“0”/>

0 1 2 3 4 5 6 7 0 1</p>
</tristrips>
<triangles name=“boite” material=“Tois” count=“4”>
<input semantic=“VERTEX” source=“#tristrips-vertices” offset=“0”/>

3 5 1 5 1 7 2 4 0 4 0 6</p>
</triangles>
</mesh>
</geometry>

I have perhaps not understood something ? What are you thinking about my example ?

Thank you for your help and again sorry for my english.

quick look at GLC source shows that it doesn’t support tristrips/trifans yet
http://glc-lib.svn.sourceforge.net/view … iew=markup

Might be the same for the Maya importer because none of the DCC tools from Autodesk that I know of will produce tristrips/trifans.

tristrips/trifans are more for making data for games where you might want to pre-process your data with conventional tools to make them more optimized. I’d suggest you just stick with triangles if you are trying to go in/out of most off the shelf viewers and DCC tools.

Convert to tri-stip in one of your last stages of content conditioning or game import if you want to play it safe and be compatible with the most tools.

Anyways, if you optimize a mesh for vertex cache then triangles can be more efficient than tristrips because you can dispatch to your video card more triangles at one time to work on. It’s only a tiny bit less space efficient. And I’d recommend against trifans they usually don’t buy you much because they are so short. At least tri-strips can run for quite a long stretch.

Thank you for your answer.
I thinking you’re right, I will forget the trifans and tristrips.

Anyways, if you optimize a mesh for vertex cache then triangles can be more efficient than tristrips because you can dispatch to your video card more triangles at one time to work on. It’s only a tiny bit less space efficient. And I’d recommend against trifans they usually don’t buy you much because they are so short. At least tri-strips can run for quite a long stretch.

This is a very interesting information thanks :wink: