PDA

View Full Version : triangle -----> triangle_strip ????



celic
02-27-2002, 07:26 AM
how to convert or how to export from Max in TRIANGLE_STRIP format???

fritzlang
02-27-2002, 07:45 AM
Dont know if you can, unless you write your own script/ exporter of course, that builds strips from your data.

You could convert what you've exported:

check the faq on this site,
22.100 How do I make triangle strips out of triangles?

knackered
02-27-2002, 07:48 AM
Don't know of any exporter for max that converts tris to tristrips.
Download the nvTriStrip triangle-stripping library free from http://developer.nvidia.com/
It does a very good job of converting discreet (indexed) triangles into (indexed) triangle strips.
Be warned, though - filter out any degenerate triangles (triangles with 2 or more indices referencing the same vertex) from the list you give it, as it will assert if you don't.
There are some other quirks too, but can't remember exactly what these are.
It's a very good library, though - and easy to use.
Another note - you may have to recompile the source (which nvidia kindly provide) if you're using it in a multi-dll multi-threaded project.

Julien Cayzac
02-27-2002, 11:18 PM
Originally posted by knackered:
There are some other quirks too, but can't remember exactly what these are.

Do not remap the indices when using the resulting strips with OpenGL. Indices remapping has been reported to work only when used with d3d (someone reported this on the opengl-gamedev yahoo group: I don't remember who, maybe jwatte).

Julien.

knackered
02-27-2002, 11:45 PM
Why not?
Remapping the indices seems to work for me with OpenGL. Does it remap them in a way that hits performance in opengl apps? I haven't benchmarked the results....but it certainly *works* with opengl.