So I am noticing that a lot of the professionals out there show triangles rather than polygons. I understand that one polygon is made up of two triangles, and I know that game engines deal with tris better than polygons. Therefore, what happens in the modeling process when modeling in polygons then ending up in triangles. I know to some this may sound like a dumb, noob question but I'm curious. I'm just looking for more information.
Replies
Always better to triangulate the model yourself before export so you have more control of where the splits happen.
Also a polygon can have more than two sides, normally referred to as a N-Gon once the polygon exceeds four edges.
Like Ark said everything gets triangulated in the end so keep that in mind. Some programs like max allow you to flip the non visible edges which in some programs and engines will be flipped to always face one way which might not be the way you intended. So those edges need to be made visible and the easiest way to do that is to triangulate the model. In max you can toss a "turn to poly" modifier on top of your stack and set the number of sides to 3, export and then delete the modifier so you go back to working in quads. Or most exporters do it automatically.
but when it gets in game all those quads get split into tris so dont be afraid to use them, but for all the things you can do they are hardly ideal.
Artists work in quads because they're easier to manage, model, animate, UV and read out with your eyes, period, there is no dud or cheating or anything else, it's as simple as that.
You're still working with triangles, but under a pseudo quad interface so that it's easier for the artist to manage visually, you can at any time see the triangles on your mesh in your software.
Engine/Renderer will triangulate it outright and show that only, because that's how code works, and because it is much, MUCH easier to calculate a triangle than a quad, especially if optimization is concerned (people aren't going to play a game to look at your wireframes and thus require a half-face cull or whatever the thing is called for the engine). Using the Pythagora's algorithm, triangles are, and will always be faster, in the current math engines are using.
Two non-continuous triangles arranged as a quad has six vertices. 50% more.
So by using quads, we promote continuity and that's always a good thing because it means less data and faster drawing.
Non-planar quads are the ones you need to be careful about and can lead to unexpected results. Unless you're using predictable tessellation, you may find that in-game the non-planar quad is triangulated in one of two ways to resolve it's topology. This can be especially noticeable on low poly characters where skinned quads are undesirably deformed on high interest areas such as shoulders and knees. I'd suggest triangulating these appropriately beforehand.
Not really. A quad is just two triangles with the edge hidden.
Quads will not save you any vertices, the vertex count is the same regardless of quad, ngon, or triangle. You will save an insignificant amount of memory on storing the unique indices, but this is totally irrelevant to performance. Many modern GPUs can't even handle quad indices, so its basically moot.
Plus, a video card doesn't know how to draw a "quad", only triangles, if you manually split up your quads or ngons into triangles (triangulate) or not, by the time it gets to a game engine or to your GPU drivers its a triangle mesh one way or the other.
Smoothing groups/hard edges, uv seams, and material splits do affect vertex count, however.
Sorry, but yes really. When we're talking about vertex load and complexity, a quad that is treated as such in maya or max or whatever will be treated as two optimized triangles in game with four vertices, two of which are shared. Even if you triangulate this quad, as long as you preserve it's continuity it'll still have the same four vertices.
However, breaking continuity by splitting any normals, vertices, uvs or materials on these shared vertices will increase the vertex count up to two when it get's in game and is totally relevant concerning performance.
So it's not moot, it's very important especially on PS3 where we have independent vertex and fragment shader pipelines, so it can be very easy to get vertex bound.
If you want to go deeper, how these triangle strips fill up vertex caches also plays a part in performance, but that's super boring and not relevant here, but it does serve to illustrate that a lot more goes on than is usually assumed.
Did you get past the first line of my post before writing this up?
^ Which is more or less the same concept as you're trying to explain here.
You seem to be operating under the assumption that you have a single quad, and then two detached or non-continuous triangles, which is just a really odd way to look at it and not relevant to much of anything, unless your model is flat shaded and you've got split vertices for every face (which virtually never happens in games).
Again, triangulating your mesh will not increase vertex count, though it may increase the number of unique indices your mesh has (which is basically moot). Your post seems to suggest otherwise, and is really confusing to someone who doesn't understand the technical side.
I'm using this to illustrate that triangles and quads can be quite different in game, even though in the DCC app they can appear similar in result.
My posts, like yours, are trying to explain that continuity, or rather the lack of continuity causes performance degradation, and this can stem from a lack of understanding of how geometry is arranged.
So quads are not just two triangles, they are two optimized triangles, which is a good thing. It's also the reason why the diagonal edge in a quad can be hidden.
Our posts are saying the same thing more or less.
Some tools/techniques start to break down if triangles are used. Simplest example would be to subdivide a triangulated cube. Same vertex count as an all-quad cube (assuming proper smoothing groups, etc.) but it'll end up looking like a lumpy wad of gum rather than a neat sphere.
In very low poly situations triangle edges matter if a quad is bent too much, causing the application to draw that invisible triangle edge from one corner to the other, often choosing the shortest distance which may not be what the artist wants. If this added triangle edge doesn't land on a seam, smoothing border, or material ID, border, the vertex count is not affected.
I believe the most optimal thing to display would be vertex count, however the numbers shown in Max and Maya do not take the various types of edge splitting into consideration and are therefore incorrect in a lot of circumstances.