Generalized TRISTRIP DIP PrimtiveCount equation

Started by
11 comments, last by reltham 18 years, 8 months ago
Okay, I fixed my image and test above for the second version.

So, indices 9, 10, & 11 are for the degenerate labeled 9.
Indices 10, 11, & 12 are for the degenerate labeled 10.
Indices 11, 12, & 13 are for the degenerate labeled 11.
Indices 12, 13, & 14 are for the degenerate labeled 12.

And the same for the other rows.


The first version is still correct and valid. It's also less indices and primitives, but it's not a combination of 4 strips like you describe. Also, it is a touch more vertex cache friendly.

[Edited by - reltham on August 3, 2005 6:21:12 PM]
Advertisement
So, I was under the assumption you only needed to add 2 extra indicies for a degenerate triangle? From what your post says, I need 3? Where do those indicies go for your first diagram?

Thanks for the help BTW

FROG!
If you are starting with seperate and complete strips, then you are only adding 2 indices between each strip to connect them together, but they end up forming 4 degenerates when combined with the 2 indices that start the strip you are attaching.

So in my diagram indices 1 thru 10 make up the first strip and indices 13 thru 22 make up the second strip (you could renumber 13-22 as 1-10 and it would be a valid strip on it's own). Adding indices 11 and 12 between them connects them together. However, now that they are a single strip indices 13 and 14 are no longer the "starting 2" of the strip and thus end up making degenerate triangles in conjunction with the added indices (that connect the two strips).

The first version doesn't need as many. All of them are there in that image.

Indices 9, 10, & 11 make up the degenerate labeled 9 that is between the first and second row (the second row builds on the opposite direction, right to left instead of left to right like the first row).

Indices 18, 19, & 20 make up the degenerated labeled 18, and then indices 19, 20, and 21 make up the degenerated labeled 19.

Finally, indices 28, 29, & 30 make up the degenerated labeled 28.

So you end up with only 4 extra indices making for degenerate triangles. You do have to build your strip differently, winding back and forth, but this is a more efficient way that is also more vertex cashe friendly (since your shared vertices are accessed closer together by the indices).

This topic is closed to new replies.

Advertisement