View Full Version : Does it make sence to support quads?
01-15-2004, 08:11 PM
In a 3D world where triangles are king, does it really make sence to support quads? Say your making a game that has plenty of square surfaces like the inside of a building.
01-16-2004, 01:56 AM
It can make sense to use quads instead of triangles. If you send a quad to your gfx-card, then you'll only send 4 vertices instead of 6 vertices if you send two triangles that make up the quad. But I'd go for triangle strips in that case, cause the gpu doesn't need to triangulate that kind of primitive first.
01-16-2004, 02:04 AM
GL_QUADS is an independent primitive and many quads can be sent in one batch. GL_TRIANGLE_STRIP or GL_POLYGON don't support that.
Quads and quad strips are neat when displaying geometry in flat shaded mode. Looks cleaner than triangle strips.
01-17-2004, 07:19 AM
I can see now that quads have to be used if you want an environment shaded with gouraud shading. A square room of gouraud shaded triangles doesn't look that good. I'll have to see how it looks with quads.
01-18-2004, 01:06 AM
It'll look the same with quads. Almost all implementations rasterize quads as a pair of tris.
My tuppence worth: it makes sense to support quads because quads make sense. http://www.opengl.org/discussion_boards/ubb/smile.gif
Everything may be a bunch of triangles in the end, but compiled applications are just a bunch of ones and zeros. Why do we use an abstraction like a programming language? Because humans find it easier to read "int i = 12" than "010110001010100". In the same way, quads are really easy to visualise and forcing the user to draw a square grid using triangles is just silly - why should a programmer have to explicitly triangularise everything when the card/drivers can do it for him?
*All* abstractions to do with computers cost something, be it processing time, memory or whatever. Some abstractions are worth paying for, like GL_QUADS.
01-18-2004, 08:15 PM
Please see this article as to why quads are
Btw I still use them because I am too lazy to change the code, but there is no reason not to breakdown everything into triangles.
Also, dealing with just triangles, and maybe triangle strips, is much better than dealing
with a variety of primitives.
[This message has been edited by maximian (edited 01-18-2004).]
Originally posted by maximian:
Please see this article as to why quads are
*scratches head*. Naa, nothing there convinces me, I'm afraid. http://www.opengl.org/discussion_boards/ubb/smile.gif
Really, complaining that large areas of white mess up CRT beam voltage as a reason for avoiding quads is just silly... And clipping problems are just about as bad with triangles as with quads - excepting that you can't get a polygon from a triangle clip.
01-19-2004, 06:40 AM
Sigh, it ain't evil, what utter tosh. Quads are useful, I sometimes use them, just be aware that they are pretty much always rasterized as a pair of tris. I do know that implementors often discuss improving this situation. One day it may happen as hardware improves.
Several things on that page are woefully out of date or just wrong. Shading is perspective correct on all PC hardware today. Even if it weren't it'd be wrong with quads AND tris so it's not a case against quads.
Arguing that tris are more useful than quads so use tris is ridiculous. If quads fit your purpose you can use quads. The only concern would then be impelmentation performance which you can easily measure.
[This message has been edited by dorbie (edited 01-19-2004).]
01-19-2004, 08:42 AM
One of the things which can go wrong when using quads or polygons is to specify non-planar positions in worldspace or colors in colorspace. This cannot be solved with linear interpolation, so it can break up during clipping. Keep your data planar in all spaces and quads will work for you.
This cannot happen with triangles because they are always planar.
02-04-2004, 12:06 PM
Relic does have a point. Quads a nice to visualise but, frankly they can be more trouble than their worth. Particularly in animation where nice planar quads can suddenly become non-planar and mess up your nice shading. Yea, i know you can avoid these problems, but personally I like my triangles :-) (hehehe)
02-04-2004, 03:33 PM
It's well documented that quads and polygons *must* be planar. If you don't understand that, well, use tris.
Quads are most useful for particle systems and otherwise large groups of impostors. Without quads, you can do two things:
1)glBegin, four (or six) vertices, glEnd. Ouch.
2)use indices. A lot better, but if index traffic can be avoided (and it can be, with quads), why not pick the low hanging fruit?
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.