PDA

View Full Version : Generating triangle strips



User137
28-08-2007, 09:35 PM
Any good source of information or source code for making triangle strips? For now my algorithm fails in it. It does however proceed to triangles next to where it recurses but seems to miss faces from end result and more from between. Some things need changing though. I don't even know if it's possible to have a model that cannot have a strip, is it so? (assuming every triangle has at least 1 shared edge with another triangle)

Edit: Now that i thought about it better, it's actually very linear thing to calculate, only has to experiment it to start from all possible places and go with the flow... But i still don't know if there are models that can't have strip.

Vertex count in stripped model is FaceCount+2.

paul_nicholls
28-08-2007, 10:56 PM
Hi User137,
Perhaps this site may give you some ideas:

http://www.delphi3d.net/articles/viewarticle.php?article=tristrips.htm

cheers,
Paul

User137
29-08-2007, 12:14 AM
Thanks!

"If you bump into a triangle that doesn't have any more neighbors, you simply start a new strip."

This sentence and articles nice image showed it that model may need several strips... I guess it's then down to forming the triangles out of polygons and quads that is job for modelling program if wanted to have perfect strip. If even that can do it... But then "figure 2" was 2D, not a solid 3d model.

My approach in theory is similar, made already code to form the adjacency graph kind of array, but then continuing with keeping in mind last 2 used vertices and tagging faces as "used". Every triangle should weight to 3 too... Will try it tomorrow.

vgo
29-08-2007, 10:08 AM
You can also concatenate the strips by using degenerate triangles (connect the first and last vertices of two strips with a dummy triangle) if you run into situation where you have strips with only a few triangles in them. Try googling for "degenerate triangle strip".

User137
29-08-2007, 01:31 PM
Had more comments from other forum too and finally decided to scrap the idea for its complexity. It would lead to several strips on same model and problems with normals and texturing too. But it was good to have it sorted out :wink: