# Topology Questions

#1

What does it mean when someone says their pipeline doesn’t support triangles?

Why do games “support” triangles while productions don’t?

#2

Typically, you want to avoid triangles when you’re doing subdivision modeling, but it’s really not much of an issue, to me, if using a triangle gives the result you want then it’s OK. There may be some studios that have some guidelines for their modelers which includes building all in quads and that might just be something you have to stick to.
Internally, all 3D software works in triangles, for games they just don’t hide it since it helps to show things more clearly for what they are. There may also be some real-time performance impact in trying to hide triangles and display quads

#3

Game engines typically use triangles because of the way the data is optimized for GPUs. While it takes three vertices to make a triangle, it only takes one more vertex to make an adjacent triangle. This allows triangles to be arranged into “t-strips” which allow the triangles of successive strips to be defined with a minimum of additional vertices.
Animators are told to avoid triangles because edge loops are important for setting up things like facial morphs. It doesn’t matter that the quads are converted to triangles at render time, but it would make animating the character harder to work with triangles from the beginning.
Some subdivision algorithms return quad meshes no matter the starting topology, but I’m not sure if the real time tesselation used in games does this or not.

#4

avoid triangles when you’re doing subdivision modeling

Correct : irregular faces (non-quads) add performance overheads in the Catmull-Clark subdivision algorithm, both CPU or GPU implementations. The odd triangle or pentagon in strategic places will typically not break the piggy bank, but it does require a fair bit of logic to work around, so studios with proprietary tools often decide it’s not worth the effort and simply tell artists to only use quads in the mesh. This is doubly true if they use Ptex textures.

Game engines typically use triangles because of the way the data is optimized for GPUs

Hardware rasterizers in GPUs can only manipulate triangles, points and lines. Even though OpenGL has a quad primitive, it is typically converted behind the user’s back in the driver. Triangle connectivity optimization is often handled via hardware memoization these days, which make algorithms like Forsyth optimization less relevant to game engines on PC (most still do it though).

Some subdivision algorithms return quad meshes no matter the starting topology

Catmull-clark subdivisions indeed will convert triangles into 3 bi-variate patches, pentagons into 5 patches. Those have 4 edges, but they aren’t planar and technically shouldn’t be called “quads”. Loop subdivision surfaces however require control meshes made up of triangles exclusively and use patches with 3 edges only. There are other more exotic subdivision schemes out there, but they are mostly variations of these 2.

real time tesselation used in games does this

Hardware tessellation (as defined by the Microsoft & Khronos specs) is completely independent from subdivision algorithms. The spec describes 2 forms of patch tessellation : one for triangular patches (3 edges), one for rectangular patches (4 edges). For example, the latest version of OpenSubdiv shows how to use the latter type of tessellation to implement Catmull-Clarck subdivisions in real time. This particular type of hardware tessellation may however be obsolete if “mesh shading” gains more traction…

#5

Is this generally assumed to be advice for character/creature modelers or modelers in general? I associate “proper topology” with character modeling. Is it considered important for rigid objects, too? Do the people who work on archvis and walk-throughs worry about topology to the same extent?

#6

Is this generally assumed to be advice for character/creature modelers or modelers in general?

I think it’s pretty safe to say that these days, topo hygiene is mostly only relevant for hero characters and “deformables”. AFAIK, the vast majority of M&E assets created are polys, not subdivision surfaces ; even for VFX, because path-tracers only work with triangles (and this stuff is increasingly out-sourced to 3rd. parties because quality control is not so much of a factor anymore).

With that said, there are still some studios that care : IMHO every artist should go take a look at some WoW assets.

#7

I should think that for pipelines that require complex UV maps as standard that quads will remain common.
Just easier to deal with.

FYI Some Cloth engines perform better with triangles. Qualoth and Marvelous Designer come to mind.
Although the results usually get ‘converted’ or used as deformers for the final quad meshes for final output.
But its the the ‘uniformity’ and ‘bend-ability’ of the triangles can help with solving complex collisions, wrinkles and performance.