17
$\begingroup$

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.

enter image description here

$\endgroup$
4
  • 3
    $\begingroup$ Not sure this is a duplicate? The other question is relating to character animation. $\endgroup$
    – ideasman42
    Aug 23, 2015 at 23:38
  • 3
    $\begingroup$ Not a duplicate IMO, highly related yes, but that question is asking about the problems with tris. Not the potential advantages. $\endgroup$
    – gandalf3
    Aug 23, 2015 at 23:41
  • 2
    $\begingroup$ I find this to be a good read on this and other topics: blog.digitaltutors.com/modeling-with-quads-or-triangles $\endgroup$
    – user1853
    Aug 24, 2015 at 3:09
  • $\begingroup$ i'm not sure either anymore, but it seems that the answers and links on the proposed duplicate cover most (if not all) that can be said ( even outside of the character animation scope) $\endgroup$
    – zeffii
    Aug 24, 2015 at 7:32

3 Answers 3

20
+50
$\begingroup$

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

enter image description here

and then you try to select one of the edges,

enter image description here

it will stop at the triangle. The same thing happens for both Tris, Poles, and N-Gons.

So, advantages to using tris

  1. Can keep topology simpler in certain situations.
  2. Much more effective at controlling shading on low poly models
  3. Stops edge loops
  4. Controls how the surface will be cut up, instead of allowing it to be randomly done at render time.

Disadvantages of tris

  1. Can be harder to work with at times
  2. Can cause issues with deformations and subserf
  3. Stops edge loops

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.)

$\endgroup$
3
  • 3
    $\begingroup$ the bit in your answer, about Tris giving the user control of how a surface is cut up, in my opinion, is a major advantage, and belongs in your summary of advantages. $\endgroup$
    – brasshat
    Aug 24, 2015 at 2:58
  • 2
    $\begingroup$ They are also not handled well by subsurf (though they're not as bad as n-gons). $\endgroup$
    – PGmath
    Aug 24, 2015 at 3:04
  • 4
    $\begingroup$ Agreed. And as for an advantage to tris, I have found cases while modeling rocky terrain where quads made the terrain look too grid-like and fake, but tris on the other hand made for more natural-looking mountains, etc. Since terrain isn't something you'd deform (except in maybe large-scale disaster special effects) there was no reason not to use tris. The geometry subsurfed and displaced in a less uniform, less predictable way, and looked much better. $\endgroup$
    – Mentalist
    Aug 24, 2015 at 6:11
3
$\begingroup$

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)

enter image description here enter image description here

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.

$\endgroup$
0
$\begingroup$

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:

enter image description here

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:

enter image description here

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?

enter image description here

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:

enter image description here

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

enter image description here

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.