Get Firefox
Best viewed with the free Firefox browser. Minimum Screen Resolution: 1024 x 768

Friday, November 14, 2008

3D Mesh Topology Tip: Quads vs. Triangles

So, what's the big deal about whether you use quads or triangles in your 3D mesh? It's really a very simple issue but, it does cause some confusion for beginning modelers. Let's take a look at some of the issues.

First, let's make sure we understand the terms.

A triangle, of course, is a polygon that consists of three sides. In 3D modeling, you also have to consider that those three sides (called Edges) are connected by three vertices.

A quad is a polygon, but with four sides and vertices.

In 3D modeling, the issue with using quads or triangles revolves around subdividing, edgeloops, and smoothing. Generally, this would include organic-type modeling (faces, bodies, animals, etc.), things that have potential for movement (bending and flexing) or are designed with an organic aspect to their style (sport cars, overpriced uncomfortable furniture, etc.). These are generally modeled with mostly quads.

Subdividing

This one's easy. You can see the issue in basic math.

Quads: Four divided by Two equals Two. Very nice. Balanced.

Triangles: Three divided by Two equals One-and-a-half. Yuck. Unbalanced. How do you resolve the half-part that's left over?

This becomes an issue with 3D modeling because the purpose of subdividing a mesh is to allow for more detail to be added to the model. This is much easier to do when you have quads because the results are predictable. With triangles, subdividing can become tricky because the balance of the flow of vertices gets interrupted. A particular flow of vertices in a mesh is called an edgeloop.

Edgeloops

Edgeloops in a mesh allow you to control how things bend and fold when the mesh is animated. They also provide the foundation for adding mesh details like wrinkles, skin folds, muscles, edge sharpness, etc.

Normally, you can expect to be able to follow an edgeloop until you return to where it began. However, when a triangle is encountered, the edgeloop must terminate because there is no corresponding vertex to allow it to continue.

This isn't always a bad thing. Triangles can play an important part in modeling, but their use should be sparse and, if possible, hidden in an area where they won't cause problems when animating the mesh or smoothing the surface.

Smoothing

Triangles will often create visible anomalies on the mesh surface when smoothing (using Set Smooth) and when using a Subsurf modifier. It all comes down to the fact that a triangle has an odd number of vertices. When placed in the midst of quads (even number of vertices), the triangles cause a "blemish" on the surface and when animating the mesh, they often cause pinching effects. This is why it's best to try and eliminate or hide any triangles in your organic modeling.

Exceptions

Of course, there are exceptions to the general preference of quads over triangles such as low-poly game models, "hard" surface models, architecture, etc. These types of 3D models generally won't need to be animated across the surface of their mesh like a character's face so, a lot of the potential problems that triangles can cause are not encountered.

Conclusion

Keep it simple. Four verts good, three verts bad...usually.

You usually won't be able to entirely avoid triangles, but it's good practice to simply stick to quads as best you can. However, balance that out with learning to recognize when using a triangle is the best solution. They're not all bad.

Study as many wireframes as you can. You'll start to see patterns of mesh topology after awhile. As you get better at modeling, return to some of your past efforts and you'll begin to immediately see issues that need fixing. It makes a great exercise. Also, download .blend files and study the meshes and practice "fixing" them.

Study everything at this following website, starting with this thread on Poles.
(Yes, it will take awhile before it really sinks in. Stick with it.)

Remember to keep it fun.

technorati tags: , , ,

8 comments:

Dudy said...

Wow... thanks again for these posts. I've never delved into poles... never understood there was such a science behind this. Thanks a lot. I feel like such a newb now that I've read this, but that forum link you gave is just the ticket... deep, dense, and fast. I hope that you guys can keep it light and fluffy, but put some hard core links on every post here. Keep up the good posts, once again!

*highfives all around*

siraniks said...

Wow another blenderbies (shortcut for Blender Newbies)help us out blender.

I'm also a blenderian.
Nice post for cleaning the extra faces for the circle. That's what I need for.

"Two Thumbs Up"
Keep it up bro!

and oh thanks for visiting my blog!

siraniks said...

wrong post... sorry... But some of text there are for you... :D

abe said...

Finally, I've heard this tip a few times and it was driving me nuts because I couldn't figure it out just by using blender, since I would convert my meshes to triangles after I would finish modeling them.

Anonymous said...

Thanks for answering my previous posts question about quad/tris difference, with this excellent explanation and link!

Kit said...

great link! highly theoretical. just what I needed :)

Anonymous said...

I need help!! Im making a palm tree using blender but how can I bend the shapes to make it look like bent leaves? I dont want the leaves to just be sticking out without bending down like a curve....you know what i mean??

If you do please help! Its urgent! :)

Kernon Dillon said...

Well, there are several ways you could approach it. The simplest and most direct way would be to start at the base of the leaf and select some vertices across the width of the leaf and move/rotate them into position. Continue towards the tip of the leaf until the entire leaf is shaped the way you want it. It's less work than it seems. I would suggest using the transform widget (Ctrl-Spacebar) to make things easier.

You could also do just one leaf and then duplicate it (Shift-D) to create the other leaves.

Post a Comment

Comments are always appreciated, thanks!