Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Quads vs. Triangles


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Vincent_M   Members   -  Reputation: 295

Like
0Likes
Like

Posted 10 November 2011 - 03:45 PM

My environment modeler was telling me that the engines she's used, such as Unity, accept geometry in batches of quads instead of triangles. I've always thought models were stored a in triangle lists. She also uses Headus to UV unwrap textures onto our OBJ models, but again, it only loads OBJ files as quads. This appears odd to me as most models should be stored as triangle lists or triangle strips. OpenGL supports quad rendering, but I do not think it's that efficient on most GPUs, and OpenGL ES doesn't support quads.


Which are better support-wise and performance-wise?

Ad:

#2 Krypt0n   Members   -  Reputation: 1377

Like
0Likes
Like

Posted 10 November 2011 - 04:48 PM

for tessellation it makes sense to have quads, but in general you have rather just triangles, my engines also always 'support' triangles (like you said, loading .obj), but I convert them into triangles on load.

is there any reason that would prevent you from splitting a quad into two triangles?




#3 MJP   Moderators   -  Reputation: 5415

Like
1Likes
Like

Posted 10 November 2011 - 06:55 PM

How artists author meshes and how you render them are independent. An artist can author with quads, and then you can just split those quads into triangles during export or mesh processing. You're almost always going to want to render with triangles, since that's what GPU's natively support.

#4 dpadam450   Members   -  Reputation: 534

Like
0Likes
Like

Posted 10 November 2011 - 07:13 PM

Tessellation doesn't need quads, it can slightly better than using triangles in some cases, but your GFX card will split quads to triangles in the end. I don't know what the overhead is in instruction cycles to split quads to triangles, but if you send triangles it won't need to split them up. Most likely the splitting takes almost 0 time anyway, but again its still something.

#5 Vincent_M   Members   -  Reputation: 295

Like
0Likes
Like

Posted 11 November 2011 - 03:02 AM

I've thought about supporting more than triangle faces where faces can have over 3 defined triangles, but I'm a terrible with writing text parsing code. We can just re-drop it into 3DS Max and go from there.

#6 Krypt0n   Members   -  Reputation: 1377

Like
0Likes
Like

Posted 11 November 2011 - 06:42 AM

How artists author meshes and how you render them are independent.

that's not fully the case, you have always two ways to split a quad. imagin a plane with all vertices in diagonal from top left to bottom right, splitting the quads also along the topleft-bottomright border will give you one straight bump, splitting topright-bottomleft will give you a lot of peaks.
It's differently solved between content tools, I had it implemented based on what I saw in 3dsmax, but as the artist in my company used maya, they complained about quite some cases where it looks odd.
simplest solution is of course to triangulate in the content tools.

Tessellation doesn't need quads, it can slightly better than using triangles in some cases

.it can improve quality quite a lot if you use quads. the problem isn't just the pure triangle vs quad tessellation, but the usual smoothing that you apply. with just 3 'anchor' points, you won't have the smoothing of the mesh curvature like with 4 per primitive.you can of course try to use the same smoothing informations (e.g. based on nurbs data that you pass as constants), but then you end up with twice as many source primitives.

I don't know what the overhead is in instruction cycles to split quads to triangles, but if you send triangles it won't need to split them up. Most likely the splitting takes almost 0 time anyway, but again its still something.

from my experience it was faster to use quads than triangles if you don't use smoothing. if you use smoothing, it's faster to use triangles than quads, because you evaluate just 3/4 the data for triangles. but if you try to reach the same quality in both cases, you have more work on triangles and you end up way slower.


that's a sample of the quality difference you can get when tessellating with quads vs triangles
quadsvstri.jpg

the problem is not that triangles were inferior, but if an artist creates tessellation content with quads, they don't validate it with triangles, this can have unpredicted results.







Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS