Quad vs Tri ??


in gl it’s not recommended to use quads to render, because a quad will decompose to two triangles, right? [from Q&A 14.080 of http://www.opengl.org/resources/faq/technical/rasterization.htm]

however, in most 3D modeling software, the quads domain it.
and why??

thank you very much

Do they? I am not that experienced with lots of 3D modellers being a dumb programmer, but I thought Triangle meshes was what most of them put out?

In any case your understanding is mostly correct.
On Open GL ES and OpenGL3.x onwards QUADS are deprecated. In any case AFAIK the HW always used to convert QUADs to Triangles even before that.SO even when we worked with QUADs they would be made into Triangles prior to rendering.

Switching to triangles on the client side doesn’t actually cost you any more in programming terms. It’s as simple as swapping a couple of Indices or vertices, but it does ensure that all the geometry produced is valid. It’s possible to make QUADs that are not planar, where as that is not the case with Triangles.

I suspect that if the modelling apps you use work with QUADs it’s a convenience to the designer, but it’s actually working in triangles and constructing the QUADs behind the scenes for you… But I am not an expert on modelling software. :slight_smile:

With quads it’s easy for the artist to subdivide. If you have a triangle among your quads, it can introduce nasty artifacts.
But also, when you bevel or extrude, you’d want to have coplanar multi-vertex polygons, optionally with holes in them.

In the end, it’s gotta be converted to triangles, or tris+quads and make sure the poly with 4+ points are coplanar or manually split them into tris.

in mudbox/maya, they use quads. and the subdivision surface algorithm for quads are more popular than triangles in modeling and animation.
an digital artist said they use quads only.
the reason is quad is more friend to texturing ???

does the bi-linear interpolation result of coloring the quad is the same as the result from two triangles split from the quad???

thank again

You can get a similar result with a geometry shader (lines_adjacency input for quad verts), by passing the 4 attributes (say colors) along with their respective barycoords to the frag shader, where your can perform a bilerp or some other higher order interpolation scheme.

however, in most 3D modeling software, the quads domain it.
and why??

I think cause quads easier for ppl to understand + has nothing to do with what the hardware uses underneath (though its only in the last few years that modeling programs have started to use 3d hardware anyways)

Also I believe a nvidia guy said that their hardware handles quads as well as tiangles.

Quads also look much nicer in wireframe as well

Like said Ilian, artists avoid triangle with subdivision algorithms because it introduces smoothing artifacts.
Well explained here : http://www.youtube.com/watch?v=k_S1INdEmdI
The quads are more like control cage than actually rendered quads.

Nothing to do with actual hardware, performance, etc.
Deep down the pipeline, everything is still a triangle.

BTW low-poly artists (getting rare nowadays) use triangle whenever it is needed, for performance reasons. Avoiding tris everywhere is costly in term of primitives to render.