# Why are quads used in filmmaking and triangle in gaming?

In film school, in the classes of 3D modeling, I was told that when we model something for films we maintain topology of 4 edged polygons. Any polygon which has more or less than 4 edge/vertex is considered bad and should be avoided. Whereas if the same model is used in games, it is triangulated.

Although I'm not majoring in 3D modeling, the question is still in my mind. Why is 3 edged polygon used in gaming? Does it render faster? Then why not is it used in film renderings?

• A triangle is simpler math wise. All 3 points are coplanar so all the points inside the are in the same plane which makes interpolation simpler. For quads I wouldn't know why to prefer that, unless it's to do with LoD. – ratchet freak Aug 4 '17 at 22:12
• @ratchetfreak if you begin form a parametric curve and then extend it into a planar definition you end up with something that has a four sided topology, Now as time has gone forward the same problem is still there. – joojaa Aug 6 '17 at 14:00

For 3D modeling, the usual reason to prefer quads is that subdivision surface algorithms work better with them—if your mesh is getting subdivided, triangles can cause problems in the curvature of the resulting surface. For an example, take a look at these two boxes:

The left one is all quads; the right one has the same overall shape, but one corner is made of triangles instead of quads.

Now see what happens when the boxes get subdivided:

Different, yeah? Note the way the edge loops have changed from being roughly equidistant on the left box to a more complicated, pinched-and-stretched arrangement on the right. Now let’s turn off the wireframe and see how it’s getting lit.

See the weird pinching in the highlight on the right box? That’s caused by the messy subdivision. This particular one is a pretty benign case, but you can get way more messed-up-looking results with more complex meshes with higher subdivision levels (like the ones you’d usually use in film).

All of this still applies when making game assets, if you’re planning to subdivide them, but the key difference is that the subdivision happens ahead of time—while you’re still in quad-land—and then the final subdivided result gets turned into triangles because that’s what the graphics hardware speaks (because, as mentioned in the comments above, it makes the math easier).

As @Noah Witherspoon correctly, says triangle subdivision does not work as well as quad subdivision. Although, in the beginning triangles could not be subdivided at all. However, he does not really explain why that is the case. Which is useful information and explains why quads are preferred and how to use them.

First, observe that a triangle does gets subdivided into 3 quads in many schemes. Since you now have a all quad mesh, clearly keeping the subdivision all quad is not in itself the requirement. There has to be a more profound reason than just being four sided.

Image 1: You can subdivide a triangle into 3 quadrangles

The reason lies in what has become called edge loops. The person doing the modeling have to anticipate how the subdivision happens as the subdivision is going to be the final shape. Unfortunately humans are only really good at deciphering the shape of the object along the edges of your primitives edges. By formulating the shape into continuous multi edge long loops helps us predict the shape after subdivision and importantly after deformation by bones etc.

A triangle has a nasty way of terminating the loop so we do not understand what happens with the shape within and out of that shape. The subdivided mesh thus has a tendency to behave uncontrollably, causing undesired bumps. Note: It is possible to subdivide triangles in a way that this does not happen, they are just harder to work with and working with quads were well known by then.

Now this is not actually the original reason, only it happened in roundabout way. The original reason what that the geometrical patches that they did use a as parametric primitives are square in shape. As extending a line into a surface naturally takes a square shape if you just extrude out. Having a triangle causes one edge to be degenerate and have a singularity. But this is very much related to the subdividing reason as it can be shown that a subdivision surface is just a general case of a spline patch.

Image 2: Original parametric surfaces were extensions of curves, not arbitrary meshes and these shapes naturally tend to be square.

One thing i see most people forget is in film making it's mostly about quality not speed. That's cause film making is concerned more with Offline rendering where as in Video games it's all real time so performance/speed is much more crucial than quality.

Hence when it comes to video games people try to find the best way to "approximate" or "fake" the look of a real thing. When it comes to different calculations and speed triangles are much more easier than polygons. Like @ratchet freak mentioned as all the 3 points are coplanar and it simplifies intersections and other calculations. That's one of the main reasons triangles are used in video-games.

However in film making rendering one frame can take hours or even days, hence speed isn't that much of an issue. What Noah said is correct, i just wanted to share this point of view as well.

I know this is old but game engines/graphics cards run in "triangles" because that is how they calculate mesh. They do not calculate mesh in quads. That was something created to allow all of the features mentioned above to happen in 3D modeling. All quads are two triangles in the "engine". They are propagated that way to allow you to work with them efficiently. Essentially, all engines triangulate in the final process. The first answer here explains it correctly: https://gamedev.stackexchange.com/questions/66312/quads-vs-triangles/66314#66314

• To me, the first part of your answer reads a little bit like "they do it because they do it". From the link you provided, I can see what you are intending to say (computationally more effective), but maybe you should clarify it a little bit more. – wychmaster May 28 at 6:56

Even film/animation speeds are something that 3D content creation teams and studios try to increase. Of course they don't mind adding minutes per frame if the output is much nicer, whereas games can add so much to graphics processing before FPS rates drop below an acceptable level, which I think coinsides with the point you are making.

This difference isn't the reason that film/animation works in quads though. Quads are easier to work with when creating rounded and organic shapes. In the end though, it is in fact triangulated, at rendertime. The renderer just creates a new line, per quad, from opposite corners to cut the quad into 2 triangles. This doesn't happen to your model, but do the data streamed to the renderer. The reason is that if your quad's 4 points are not coplanar, and on a larger percentage of your quads in many models, they won't be, you will have nonmanifold geometry. The calculation of the area is basically undefined. If you slice the quad into two tris, that solves the issue as any 3 points are always coplanar.