Jump to content
Sign in to follow this  
scubaman3D

To triangulate or not to triangulate

Recommended Posts

I seem to vaguely remember reading somewhere that its better to triangulate your models in O2, since this will take less time to render than a model which is squarized.

I'm asking this because I have noticed some people's models are completely triangulated, causing the polycount to skyrocket and I'm wondering if the increased count will actually increase performance.

Share this post


Link to post
Share on other sites

Binarize will triangulate your models anyway and if ArmA works like OFP did, any MLOD model will just get "binarized" on the fly when loaded in game.

And on the hardware level it will be split into triangles anyway.

Share this post


Link to post
Share on other sites

Scubaman.3d video cards work with triangles, so in the end its tris that matters. the reason for working with polygons (Squares) its during the modeling/uv'ing job. its more easy and clean to work with them. But in the end when the videocard faces them, it will convert them in triangles. Thats why it almost duplicates the "poly" count.1 Square is made of 2 triangles...So the true count you want to know is triangles, not polys.

Share this post


Link to post
Share on other sites

so if I have a model with nearly 6,000 faces thats squarized (as much as possible) it could potentially have 12,000 polys once its triangulated and thats ok?

The limit for ArmA is 10k polys, right? So when modeling, I need to keep it under 10,000 triangulated faces?

Share this post


Link to post
Share on other sites

A squarized model will be a smaller P3D file than a triangulated one:

Triangle 1 = Vert 1, 2, 3

Triangle 2 = Vert 2, 3, 4

Quad 1 = Vert 1, 2, 3 ,4

Probably only matters if you are storing a large collection of models and/or keeping version history.  Doesn't matter once binarized.  I hate looking at triangulated models, squarized is just easier on my eyes.

There is no face count limit in ARMA, 10K triangles is just a sensible number.  The limit is 32768 vertices as DirectX counts them.  That's a bit tricky since what Oxygen considers a point != DirectX vertices, I don't know all the rules, but if buldozer fails to draw your model and you see a "Too many vertices" error msg, that is the reason.  Often what we consider as a single mesh actually gets split up into different parts at runtime, which means more vertices than you saw reported as points in Oxygen.

As an example, start O2 and Buldozer, create a sphere with the value 64 used in all 5 parameters.  Copy it 4 times so you have 5 spheres in O2 and in Buldozer.  9930 points and 10240 faces is what you should see.  Triangulating this model should not matter to Buldozer.

But now sharpen all edge, and note that buldozer stops drawing the model.

Share this post


Link to post
Share on other sites
Quote[/b] ]The limit is 32768 vertices as DirectX counts them.  That's a bit tricky since what Oxygen considers a point != DirectX vertices, I don't know all the rules, but if buldozer fails to draw your model and you see a "Too many vertices" error msg, that is the reason

or maybe it only means that your system can not draw more vertexes ? wink_o.gif

Quote[/b] ]Triangle 1 = Vert 1, 2, 3

Triangle 2 = Vert 2, 3, 4

Quad 1 = Vert 1, 2, 3 ,4

since what time one vertex can not belong to several faces in p3d ? wink_o.gif

Share this post


Link to post
Share on other sites

1)well i'm not sure if i'm correct but, according to open gl, everytime a triangle needs to be drawn in the screen, the GPU is reprocess the vertixes no matter if some of them are common on

different triangles. So i think that earl is correct.

2)

But now sharpen all edge, and note that buldozer stops drawing the model.

I think that this has to do with normal vectors?

3)Well at my experience our not loading point was >16,500 polys (mixed triangles and polys).

Also the idea of first triangulation (since binarisation or graphic card will do it isn't correct).

I've tried the same model triangulated and as it was first modelled, in first case polycount was almost double and it didn't load at all (same number of vertixes), but in second it loaded.

Share this post


Link to post
Share on other sites

I think it's because hard edges are actually different geometry. Two triangles joined together into a quad with a soft edge at the hypotenuse has 4 points, whereas the same quad with a hard edged hypotenuse has 6. The two triangles of the hard edged quad share no vertexes in common. The shared vertexes at the corners are actually split between the two triangles, and you have 2 tris with their corners at exactly the same spot.

Share this post


Link to post
Share on other sites

I think Plaintiff explained it better than me :-)

or maybe it only means that your system can not draw more vertexes ? wink_o.gif

I'm pretty sure it's the vertex buffer limit per model.

since what time one vertex can not belong to several faces in p3d ? wink_o.gif

I can describe a cube with six quads (24 vertices), or with twelve triangles (36 vertices).  A squarized P3D model is smaller filesize than the same model triangulated.  That is all.

Share this post


Link to post
Share on other sites
A squarized model will be a smaller P3D file than a triangulated one:

Triangle 1 = Vert 1, 2, 3

Triangle 2 = Vert 2, 3, 4

Quad 1 = Vert 1, 2, 3 ,4

Probably only matters if you are storing a large collection of models and/or keeping version history. Doesn't matter once binarized. I hate looking at triangulated models, squarized is just easier on my eyes.

There is no face count limit in ARMA, 10K triangles is just a sensible number. The limit is 32768 vertices as DirectX counts them. That's a bit tricky since what Oxygen considers a point != DirectX vertices, I don't know all the rules, but if buldozer fails to draw your model and you see a "Too many vertices" error msg, that is the reason. Often what we consider as a single mesh actually gets split up into different parts at runtime, which means more vertices than you saw reported as points in Oxygen.

As an example, start O2 and Buldozer, create a sphere with the value 64 used in all 5 parameters. Copy it 4 times so you have 5 spheres in O2 and in Buldozer. 9930 points and 10240 faces is what you should see. Triangulating this model should not matter to Buldozer.

But now sharpen all edge, and note that buldozer stops drawing the model.

Where people get confused is that they make the assumption that vertex 2 of poly one is implicitly the same logical vertex as an identical coordinate vertex in poly two. That's not the case when rendering.

Full-model mesh-based modeling programs, such as oxygen, often give false impressions that this is the case. From a strictly wireframe perspective, perhaps. But once you begin rending faces as sections, the rules change. The reason is that you need to describe the coordinates of a face, and that face is exclusive of other faces. As a result, the vertex count in face rendering can be substantially different from the vertex count in the wireframe reference.

It's much clearer to see this distinction in face-based modeling programs (ie gtk-radiant) that have a raw-text model format.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×