Tris are things you would avoid when it comes to shading, and good Topology, so do Tris do any good?
Also I am currently working on Game Asset Creation and I would like to know if Tris are actually something I want definitely to avoid.
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
There's a big misunderstanding regarding tris. A lot of people say that you should never use tris, and they're somewhat right. But the main reason behind not using tris, is because they can be harder to work with, and they can cause issues with deformations. Although, before exporting/baking your model for use in games, it's advisable that it's triangulated anyway.
The thing is, people tend to go to overly extreme lengths to avoid tris, when in reality, adding a tri is a lot better than trying to work around having one.
One other thing to keep in mind, is that all faces are converted to triangles at rendertime anyway. You aren't speeding up rendertimes (If I'm not mistaken, some of the optimizations that are being added to blenders viewport are actually for quads only) but by using tris, but you are controlling how the faces are cut up (this is the big thing that effects shading).
Tris also cut off edge loops. So if you do something like this
and then you try to select one of the edges,
it will stop at the triangle. The same thing happens for both Tris, Poles, and N-Gons.
So, advantages to using tris
Disadvantages of tris
In games however, There is a stage in the process where triangulation is often unavoidable and should be carefully embraced.
There is a point in the video game workflow where your game model should be completely triangulated, because most game engines will robotically do this for you if you don't, with often undesired results. Some concave surfaces will become convex and vise versa, while some unwanted/useless loops form from the resulting triangulation. You'll want to triangulate it before you export, and DEFINITELY before you bake normals. Here are two big things that can go wrong if you don't.
surface/color baking, especially normal baking, where you transfer details from Hi-res objects onto low res objects are very dependent on how a model has been triangulated. Rays cast from the high res surface to the low, virtually filling in low res gaps with information. So that if you export a model and it's map out to a different program, the triangles may be automatically cut differently to how they were in the other program, resulting in unwanted artifacts.
Surprising deformations/shape, The way that you animated/modeled the object may appear different because of the engine's method of triangulation, 'what you see is what you get' should be the aim. (this may need a better explanation.)
Tris can also be a benefit to make sure all faces are the exact same. For example, today while sculpting, I started from a cube, blender automatically triangulated the faces when I clicked "dynamic topology", and, unfortunately for me, it didn't triangulate them symmetrically. When I was dome with my sculpt, looking over to make sure everything was symmetrical, look at the error that one little misplaced tri turned into! the entire side of the head is different (it still looks cool)
Now, I plan to re-topo this before using in a game, so it won't cause me much trouble, but you can see the potential error that could have been avoided by manually dividing the faces into tris before I sculpted, rather than leaving it to the helpful, but clueless blender.
We don't use quads because they are easier to work with. I mean, they are easier to work with, but we do a lot of things that aren't easy to make things look good, and if tris looked better (when tris look better), we would (we do) use tris.
Nor do we use quads directly because they deform better. They don't. They deform exactly the same. Now, their normals don't deform exactly the same....
We use quads for two reasons. The first and most important is Catmull-Clark subdivision, which is a mathematically proven standard in 3D modelling that we use all the time, but which is mathematically proven only for the case of quad meshes containing only 4-poles. (Never mind for the moment that there's not really any such thing as an interesting mesh containing only 4-poles. We say, hey, it looks pretty good where that's true, and we'll try and put the other poles somewhere nobody notices them, or where they're planar enough that C-C subdiv doesn't do anything terrible with them.)
The second reason we use quads is for the calculation of smooth shaded normals on cylindrical shapes, where normals change smoothly, but differently, in 2 axes. The use of quads to calculate our face normals, and hence our vertex normals, gives us normals that interpolate more appropriately to these shapes. Our modelling abounds with shapes that are similar enough to cylinders for this to matter: cylinders and toruses, yes; also pipes and cables; also arms and legs.
These two issues are big enough that whenever we can take advantage of them, we don't want to use triangles. That's why most people just say "All quads!" even though they don't know why. However, there are cases where we're not using C-C subdivision, and where we're not modelling something with normals that change in two axes, or where we're don't even care about smooth shaded normals to begin with. The first case is routine with game engines, where the fact that dynamic tessellation is expensive enough that we rarely code quad support into the engine anyways, and that's the first place where we're going to see triangles all the time. (Would quads be better? For purposes of deforming normals on some shapes, yes, a quad engine would be nice, but it would cost performance as well.)
So, what kind of shapes don't have normals that change smoothly in two axes? A good example is a sphere, whose normals change smoothly in any axis, and we have the icosphere as a reasonable choice for spheres:
The singly-unsubdivided cube sphere on the right has more verts than the icosphere on the left, but the normals are not any better, and the silhouette is worse. (It should be said that the cube sphere may have other advantages however-- it's much easier to seam and unwrap a cube sphere than it is an icosphere, and it's easier to join the cube sphere to other topology that might have normals for which we want to use quad faces.)
What's an example of a mesh where we don't care about smooth shaded normals? Probably the most common is an emission mesh, where normals don't play any role in the shader whatsoever.
So let's say we have an emission mesh, for which we know we will never be using C-C subdivision. We could still use quads, but are there ever any situations under which triangles are better? Sure, when automatic triangulation of non-planar faces can lead to an uneven silhouette, we're best off triangulating the mesh manually:
Every mesh gets triangulated eventually along the rendering pathway, it's just a matter of when. Here, by triangulating the meshes on the right manually, I can control how the silhouette looks. And because I'm just using an emission shader, I don't care in the least that my normals will only be calculated from triangles instead of quads. (Honestly, my normals would look like dog poo here anyways.)
Okay, so what about deformation? People say that quads are especially important for it; then they turn around and say sometimes you want to make tris specifically for deformation purposes. And now I'm saying, deformation isn't a direct factor. What gives?
There are a few things that give. First, when we deform triangulated quads, we're not calculating face normals from the same faces as when we deform untriangulated quads. On shapes like cylinders-- again, think arms and legs-- this will give us some mildly apparent diagonalization in our normals. On a static cylinder, we could compensate for that with custom vertex normals from a quad version, but on deforming geometry, we can't-- there are going to be some vertices that play into some face's normal on the quad version, that don't on the triangle version, and that's going to be apparent when we deform the mesh.
Lets think about the vertex normal of the central vertex here. On which vertices does that vertex normal depend?
On all of the vertices I have selected. On adjacent vertices. And if I deform the vertex at pos 1,1, it will affect the central vertex's normal on the left, but not on the right.
Okay, but what about when we want tris for deformation? Again, this has to do with the silhouette. Those emission cylinders I made above are artificial as anything. But when we start deforming meshes, we really don't know what we're going to get. We're going to get concave faces, faces that are way out of plane. Our animator isn't inspecting every face to make sure it doesn't do anything weird. We might start with a quad and end up with this:
Once non-planar, does the quad perhaps create some concavity in its surroundings that shouldn't exist, just because of how it gets triangulated? By manually triangulating that quad, as we do on the far left, we can prevent that from happening. And so that's why you'll sometimes see triangles made specifically for deformation purposes, so that the modeller can control how they get triangulated under deformation.
I feel like I have to add one caveat here, which is that there are no rules, only guidelines; what you should do depends on what you want. If you want to render a mesh that looks like
then what you should do is make a cone and give it a single level of C-C subdivision. Don't worry that there are tris, an ngon, and a megapole. It does what you want. Don't try to make it out of quads and 4-poles. That'd be dumb.
Instead, when we talk about smooth shaded normals or C-C subdivision doing what we want, we're talking about what we usually want. What we usually want is smoothness. What is smoothness? It is continuously changing values along any geodesic-- a graph of positions is continuous, a graph of normals is continuous; and, the derivative of that is continuous; and, the second derivative is continuous-- etc. That's usually what we want, that's not necessarily easy to get, and that's what we're talking about when we talk about "good" topo. If you want that subdivided cone look, then it doesn't matter that the rest of us are usually chasing smoothness, and what we say about good topo doesn't matter.