Triangle strip indices order?
by Chris Calef · in Torque 3D Professional · 11/24/2010 (3:00 pm) · 41 replies
Hi, just a random question after bashing my head against the problem for most of the day yesterday... I'm writing an FBX exporter for dts models, and have (mostly) succeeded at exporting the skeleton and animation frames, but when I came to the meshes, in particular triangle strip meshes (I haven't tried all triangles yet) I found that I really have no idea how the indices work.
I thought I did, and my solution starts to look like it should be working, but it isn't:

What I'm doing is starting with the first three indices, making a triangle out of them, and then for each new one, making a triangle out of it plus the last two. I'm going in the same order every time. My problem looks like possibly the winding order is not supposed to be the same every time... but I'm not sure that's it, because on closer examination it also looks like it's trying to make triangles between verts that shouldn't be part of the same triangle at all (i.e. edges going across the middle inside the barrel).
This makes me wonder if there is another list somewhere or more information stored somewhere, that should be telling me how these indices actually are supposed to go together to form triangles?
Of course, now that I've publicly admitted confusion on the matter, I'll probably solve the problem in the next ten minutes, but in case that doesn't happen I'd be wildly grateful if anyone here could help me figure this out.
Cheers!
Chris
I thought I did, and my solution starts to look like it should be working, but it isn't:

What I'm doing is starting with the first three indices, making a triangle out of them, and then for each new one, making a triangle out of it plus the last two. I'm going in the same order every time. My problem looks like possibly the winding order is not supposed to be the same every time... but I'm not sure that's it, because on closer examination it also looks like it's trying to make triangles between verts that shouldn't be part of the same triangle at all (i.e. edges going across the middle inside the barrel).
This makes me wonder if there is another list somewhere or more information stored somewhere, that should be telling me how these indices actually are supposed to go together to form triangles?
Of course, now that I've publicly admitted confusion on the matter, I'll probably solve the problem in the next ten minutes, but in case that doesn't happen I'd be wildly grateful if anyone here could help me figure this out.
Cheers!
Chris
About the author
Rich H
Default Studio Name