Quads OR Triangles?

So I was going to start modeling for UE4 and was wondering, which gives the best performance over all?

Use triangles; they’ll end up as triangles when rendered anyway.

Use quads and avoid triangles.

Engine doesn’t care and will convert everything to triangles. However, things will be significantly easier for you if you decide to increase level of details in your model later. Triangles don’t subdivide nicely, and various loop-based tools won’t work on triangular soup.

The only exception is if you’re going after very old school look. I’m talking about pre-quake1 stuff here, like “alone in the dark 1”.

And that is the reason why you should use triangles. The engine does indeed perorm a triangulation on quads (and n-gons for that matter), but you have no control over how the engine decides to do that.
Every quad can be split two ways. And the triangles themselves can be constructed many ways with the same vertices…

Observe: Both polytopes are identical vertex-wise (just rotated by 90 deg):
There are clearly at least two ways to triangulate here… Obviously one of them is not intended :slight_smile:

But how should the engine know what you want? :stuck_out_tongue:

So, to avoid surprises… use triangles :smiley:

PS: Im not the screenshot srtist here, its actually from Epic. :stuck_out_tongue:
The engine is a bit outdated, but that part about static meshes still holds for UE4
https://udn.epicgames.com/Three/FBXStaticMeshPipeline.html

No, you’ll be shooting yourself in the foot and limiting reuse of your model by locking yourself out of edge loop tools.

The model you showed uses pentagon. Quad has 4 vertices in it. It is also, in almost all instances, almost completely flat.

You won’t be using this kind of low-poly geometry in any project these days. We are not in the 90s anymore.

See attachment for proper quad topology example.

I personally use both. I start modelling using quads and only use tris when necessary, if you look at the picture of a creature in the link posted as an example its mainly made of quads but if you look at the shoulder there are a few tris, that’s basically how my models start but once I am happy with the mesh I triangulate it so I don’t get any issues like the pic KVogler posted shows and if there are any small issues I can fix them before exporting, doing it that way has saved me a few head aches:).

I reuploaded the picture to better demonstrate the topology on the face, so the shoulder is no longer visible.

However, there are zero traingles in the model. No tris on the shoulder or anywhere else.

No, quad verts or more may or may not be on the same plane, and more often than not a quad’s verts are not on a plane. A triangle however is always planar.

[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]

[FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]Actually there are as many triangles in the scene as the mesh can be split into. Just because it’s not rendering the edge splitting the quad, doesn’t mean it isn’t rendering as triangles.

Yes there is.

tris.jpg

having the odd tri here and there is almost unavoidable on certain types of meshes.

That’s not my model, and I have no control of what they did with their content. Also, it is avoidable.

Which is why I said “almost”.

No offense, but this is getting ridiculous. Google “edge flow”.

The reason why it is a good idea to use quads in modeling program, because it will allow you to use more powerful tools and subdivide model easily during modeling phase. Not because of “performance”. Triangles will cause a mess when subdivision is involved and edge loop tools won’t properly work on them. “Edge loop tools” means that you can click one edge on the arm, it will select the whole circle that goes around the arm, and you’ll be able to scale/move/rotate it, dissolve it (remove edges, while preserving geometry), and slide it up and down across surface of nearest polygons. That is not gonna work with triangles.

While GPU does render everything using triangles, that is not relevant to the issue.

Frankly, just model a high-poly human surface (human head, armor, etc), and you’ll see it yourself.

I never said it was your content.

well have to agree to disagree on that.

Just to clarify: Im talking about the exported geometry.
Of course, during the design process I use quads and n-gons as well.
But before exporting them, I triangulate the model in the 3D application.

If it’s avoidable, make me a geodesic sphere mesh using quads*.

Edge loop tools should probably be using triangle strips.

*It’s mathematically impossible - all angles on a quad average to 90 degrees - if four of them meet at every corner, you wont have the required 720 degree deficit to make a closed sphere; You need eight three-way vertices to get it to close.

Which not only applies to spheres, but also all topological derivatives of a sphere with any face anle less than 90 deg. Capsules, chamfered boxes, cones, etc…

(-_-)

…Seriously?

Hexagon perfectly converts to quads by adding one vertex in the middle. So you can make geodesic sphere with quads. See attachment.

Now, give me a reason to have SPECIFICALLY geodesic sphere in the game engine instead of modeling objects created by your art team. You don’t deal with mathematical primitives in games. You deal with objects from the real world.

Not gonna work. You have directional ambiguity. 3 sides. If you select one of them, there’s no way to know where the loop should go.

Here’s why you use quads:
https://www.dropbox.com/s/k66aoyl0ub2cacn/quads.avi?dl=0

By the way, the movement in the video is not “x axis restricted” it is restricted to the surface of underlying polygon.

I also added quad based sphere example in the attachment.

P.S. Seriously, guys, what the hell. This is getting to the level of “anti-bsp” thread. I expect you to have basic understanding of modeling, 2d art creation (both traditional and digital), computer programming and 3d mathematics. Instead I see synthetic examples made up to shoot down good modeling practice that is recommended by pretty much every modeler in the world. Don’t make me disappointed.

is right; I believe it’s mathematically unavoidable . But, it IS possible to model by working with only quads and use tris for the unavoidable minority. MakeHuman have a char template with FULL quad , not a single tri http://www.makehuman.org/index.php ]
I don’t believe there is anything ‘technically’ wrong with tris , just not very good with the human aspect of modification.

A whole load of relatively newer tools such as SwiftLoop , and graphite tools in max don’t detect tris as well as quads. I’m not sure if they even detect explicit tris at all.

My 2cents , avoid N-gons whenever humanly possible. Quads and tris are fine as long as your quads are co-planars ( 2 of the edges parallel ) . This is very important as not all quads are created equal . You will ruin your extrude and smoothing if you don’t have proper co-planar. There are scripts to let you revert to all co-planar. Quads and NGons are merely ‘grouped’ tris. They help to keep things manageable.

Let’s not be technical elitist and swear by one type where both have so much use.
This is where I’m going to disagree with in regards to “Use triangles; they’ll end up as triangles when rendered anyway.” This is like saying to everybody to code in assembly language/machine because it’s all going to be understood that way by CPU anyway. The same reason why you paint in layers in photoshop though engine don’t take layers.

1 Like

One would expect people giving advice to others to be at least somewhat educated in the manner of which they speak.

Using triangles is ridiculous. Go ahead and give a triangle character to a rigger and / or an animator and see how quickly you’ll get laughed at (rightfully). You can’t properly bend an elbow unless you have proper edge loops, and only an idiot would try to make edge loops with triangles.

That being said, being a zealot about it doesn’t quite work in a production environment either. The odd triangle won’t make the whole model unusable and in many cases it’s just faster than to retopologize a good deal of the surrounding geometry to wire everything up for proper quad topology. Having a few triangles in places where e.g. the arms meet the armpits or such won’t have any detrimental effect on your mesh when it comes to rigging and animating it.

However, it goes even deeper than that. It’s equally stupid to not use all the tools at your disposal, and triangles are a tool just like any other. At the end of the day if you’re making a very generic static mesh that will never animate, the toplogy really doesn’t matter. We’ve used ZBrush’s ZRemesher for rocks, statues and such things that we know will just sit there in the scene. The ZRemesher is horrible, creating edge spirals and whatnot, but it gets the job done quickly, which is often times much more important than something which is in the end just for the artist’s peace of mind.

Last but not least, when you’re creating LODs, every single mesh reduce that’s worth its salt will spit out results in triangles, safe for edge loops that you as important (i.e. elbows, places where your mesh bends, you don’t want to triangulate those areas or your animations will go to hell).

tl;dr - Quads. Don’t be stupid, and more importantly, don’t give people misleading advice.

I agree with everything DamirH said.

Also, I’d like to add that while programming tasks usually requires precision and creates desire to have “perfection”, that does not really apply for 2d/3d art, where one way to work is to make a mess and then clean it up (desire to get everything right on the first try pretty much belongs to the trash bin when trying to do any kind of art tasks). When people bring mathematical primitives into argument, it pretty much only means they haven’t modeled much, because there’s no need for perfect anything - no need for perfectly uniform spheres made out of quads, perfectly flat quads, etc.

“Use quads” is fairly solid advice similar to C++ advices given to beginners: “don’t use macros”, “avoid raw pointers”, “never use goto”, “follow rule of the three”, “use standard containers when possible”, etc.
It is solid advice that will make life easier, but there are edge cases where it does not apply.

The point of quads is that they allow mess management (quickly add/remove detail), also they work better with tesselator, and as DamirH said, joint deformations work better with them.

It would be more accurate to say that a quad is almost always non-planar. not a quad is almost always planar.

I know what edge flow is, it has nothing to do with quads, tris, or ngons. It’s to do with flow of the edges of polys. It doesn’t matter what you’re using, edge flow is an essential part of modeling. Really edge flow has nothing to do with my comment talking about how it’s actually still triangles. I was just making sure people understood that even if you’re using quads when making models the pc is still rendering it in tris. Which I thought your reply “There are zero traingles in the model. No tris on the shoulder or anywhere else.” was insinuating that it was tri-less even in rendering.

I wasn’t saying to use triangles when modeling, I was just clearing up vague information. Making sure people understood what i said above.

I believe this is nitpicking and this degree of precision is useless for people who are interested in modeling.

Let’s just say that

  • I did not have the impression that you’re trying to clear the information,
  • found your attempts to clear things up mislieading,
  • they weren’t really necessary because it was explicitly stated in the 3rd post of this thread that engine converts everything to triangles.

And leave it at that.

All the necessary info was provided in the link in the 3rd post and for some reason it went downhill from that point, into the land of silliness. Which is disappointing and reminds me of that rather unpleasant anti-bsp thread I saw before.

The useful info is available in link to the blog in 3rd post and DamirH’s answer.

There’s nothing to discuss beyond that.