Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: Quad vs Tri ??

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2008
    Posts
    13

    Quad vs Tri ??

    Hello,

    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/...erization.htm]

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

    thank you very much

  2. #2
    Advanced Member Frequent Contributor scratt's Avatar
    Join Date
    May 2008
    Location
    Thailand
    Posts
    556

    Re: Quad vs Tri ??

    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.

  3. #3
    Senior Member OpenGL Pro Ilian Dinev's Avatar
    Join Date
    Jan 2008
    Location
    Watford, UK
    Posts
    1,261

    Re: Quad vs Tri ??

    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.

  4. #4
    Junior Member Newbie
    Join Date
    Nov 2008
    Posts
    13

    Re: Quad vs Tri ??

    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 ???

    btw,
    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

  5. #5
    Junior Member Regular Contributor
    Join Date
    Aug 2005
    Posts
    148

    Re: Quad vs Tri ??

    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.

  6. #6
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,609

    Re: Quad vs Tri ??

    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

  7. #7
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Quad vs Tri ??

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •