Was curious if people did much tri-stripping manually for game models, or if there is an automatic triangulation in one of the larger suites that applies optimal flow. Are triangle strips always meaningful, or does it require the programmers to implement efficiencies taking them into account? Is this performance boost lost if the verts are not all perfectly indexed in strip form?
Personally, if I'm going to be baking tangent space normals to a character or object, especially if it has mirroring, I like to. Seems to help the bakes come out more predictably, especially if different engines/apps are going to be automatically triangulating quads in a different way. But I'd like to know if it actually provides a performance benefit to simply cut strips manually.
Of course there are the benefits of manual triangulation in making lowpoly meshes, but I mean creating strips in modern stuff with lots of quad loops. It feels a lot like knitting; I don't mind it, but am curious what other, more experienced persons tend to do.
Replies
- http://en.wikipedia.org/wiki/Triangle_strip
And then how we are create a model with GL_TRIANGLE_STRIP method in openGL :
- http://www.falloutsoftware.com/tutorials/gl/gl3.htm
(Method is same with QUAD_STRIP)
To make it short and easier to understand :
- GL_TRIANGLES method : Action to list 3 vertex and then to create a triangle.
Order is not important, because he will need 3 coordinate to create a triangle.
- GL_TRIANGLE_STRIP method : Action to list vertex in a right order and then to deduce the triangle structure from the beginning to the end of the list.
Image we start to create the model from the top and we turn around the model to finish the structure to bottom of the model like a spiral.
Then. with this information I can easly say that :
IMPOSSIBLE to you as a 3D artist to create a model ready for the TRIANGLE_STRIP method.
And you have to use a plugin for it (I didn't find any plug in for it yet...)
Also the plug you will use will create the triangle flow. vertex. quad, what you want, but in the way the programmer built it.
For that reason sometime with some plugin, to export as quad with create shit in the engine.
Same exporting triangle will give shit because using the QUAD method in the engine ...
And also, the engine you are using has been creating by human, I am not sure they will test your model when loading it in the engine to understand if you model is ready for TRIANGLES, QUAD, TRIANGLE_STRIP or TRIANGLE_STRIP method.
Hope my english is not so broken and you will understand the explanation
Do you use Maya for creating 3D?
You don't tri-strip manually. Not something you can do in say Maya/3DS Max.
Even if the terrain was in tris, it still stripified it. Gave a boost in performance by like 30%.
Thats not strictly true. manually triangulting the model used to be done quite a bit to ensure that it tri stripped well.
perhaps i've got it arse ways but it was my understanding that the direction of the middle edge of the quad was essential for maintaining the strip
Striping is absolutely not similar with triangulate your model in your 3D application XD
Or to keep quad in your model for optimization O_o...
Striping is a method to connect vertex together with a right vertex list in a right order and then to deduce triangle.
To triangulate your model or to create quad definitely never, and absolutely never from the absolute no way to help to build a model with strip method. :D
For the simple reason : STRIP method is both available with QUAD and TRIANGLE.
To get a model ready for STRIP method you need to list all vertex of your model, and to create a new index list of your vertex from a Vtx.n and to follow the next vertex from the same triangle, etc.. etc.. etc..
Actually I am sure on your model vtx[0] is somewhere on your model and vtx[1] and the complete opposite!
If you want send to me your 3d model and I will export it as C++ code and then load it in openGL with glBegin(GL_TRIANGLE_STRIP); method! and yu will see the result.
I follow Lamont here.
If you are working in Maya I can prove with a melscript in realtime in the viewport your model is far away to be ready for strip.
Yeah yeah it can change the lenght and some vertex could be listed 2 times. (green zone)
But look, with Quad method vertex list is the same.
Maybe the orientation of the edge in the blue zone will be not same at the end, but...
No seriously to triangulate your model and then to create good orientation of your edge to help to reduce of 10 the vertex list of your model is really poor in optimization.
And, you maybe do not know yourself if :
- the plug you are using to export 3D will create a cool algo for STRIP in the engine..
- the plug for importing 3D data in the game editor will build the model with STRIP method..
- the engine you are using is using TRIANGLES, QUADS, TRIANGLE_STRIP or QUAD_STRIP method to create the model when rendering.
isn't it?
And you are the 3D artist.
Then if you create character on a big production, the animator will take your model and turn edge if the deformation are bad with the current poly flow
No seriously, about STRIP, keep cool, orient your edge for a good rendering of your model in game and it should be ok!
Thanks for taking the time to explain it. I haven't had to tristrip since using torque(which is something i'm trying to forget) so im clearly behind the curve.
Because 2 constraint for strip :
- to list vertex in a right order
- to list vertex in the right way (CCW and CW)
yeah because after if I apply a
glCullFace(GL_BACK)....
Could ghave more surprise
I can't send you the character I am working on now but will ask the programmer if he knows about any of this.
My problem now lies elsewhere, it seems. I was actually just triangulating my model (and keeping it in proper strips because I thought that was good practice, na
noo...
Triangle strip : to triangulate...
Quad strip : to create quad...
But really... it depends of the plug in...
Question for your programmer could be :
- What method do you use to draw model in game?
---- Triangles?
---- Quads?
---- Triangle Strip?
---- quad strip?
- About the plug in to export 3D, to your prepare the model :
---- Do you list triangle or quad?
---- do you create a new index flow for stripping?
It could be a good beginning. o_<
Oh sorry I donno anything about how works the vertex shading in the engine yet. Just can help for the model structure.