Why did GPUs abandon quads in favour of triangles (and will quads make a comeback?) *spawn

Status
Not open for further replies.
Nesh is right about the legacy of old game assets. In the days of Quake 3 I think it was around 800 triangles per character and the modeler had to be pretty clever to make the most out of that, especially in getting reasonably curved silhouettes from every possible angle. It's kinda hard to find good images nowadays, but Paul Steed* had an ongoing 3D character column on loonygames where he showed a lot of actual assets and explained processes.
doom236.jpg

You can see here how the mesh was carefully optimized down as much as possible while maintaining a more or less curved silhouette. The usual method was to start with a quad mesh like a very simple cylinder, push and pull vertices to get a good shape, and then decimate it down a lot.
You can also see that the low number of polygons helps to keep the wireframe display clean and how you could assign skin weights down to the specific vertex level. Today with an 50-100k mesh the display gets messy and unreadable, and most of the skin weighting is done using brush based painting tools. Here, a mostly quad mesh works much better. But modelers still use triangles here and there to terminate or add detail.

* I've basically learned low poly modeling from Steed's articles, it was an invaluable resource. May he rest in peace...

Thanks for the info... Well written. :)

This video shows that Saturn was a 3D beast also despite having a stigma/myth of "sucking" at 3D...

Last Bronx was the peak
 
Saturn used hardware evolved from its sprite scaling arcade hardware to draw polygons, iirc. Polygons were quads because they were basically distorted sprites. Might even have been one texture mapped to one quad. It could look very good, but it was limited in some ways.

Last Bronx, the Saturn game in the second vid, did the high res, perspective correct floor [and roof in another stage] and the sky and the background layer(s) without rendering any polygons. It looked great for a 32-bit game, but it was really playing to the hardware's strength, and actually filling most of the screen with pseudo 3D and not quad rendering.

I think the Model 2 and Model 3 hardware might have used quads. Now those were beasts.
 
Saturn used hardware evolved from its sprite scaling arcade hardware to draw polygons, iirc. Polygons were quads because they were basically distorted sprites. Might even have been one texture mapped to one quad. It could look very good, but it was limited in some ways.

Last Bronx, the Saturn game in the second vid, did the high res, perspective correct floor [and roof in another stage] and the sky and the background layer(s) without rendering any polygons. It looked great for a 32-bit game, but it was really playing to the hardware's strength, and actually filling most of the screen with pseudo 3D and not quad rendering.

I think the Model 2 and Model 3 hardware might have used quads. Now those were beasts.
For Saturn's basically improvised 3D capable GPU... It did the job very well.
 
And since now this is a separate thread, allow me to reply properly to the above. The Saturn didnt exactly suck at 3D.
Certainly it wasnt a beast. It was just good. Just not as good as competition in general terms.
I find it quite strange that you use Last Bronx as an example. I played a lot of that game at a friend's. The Saturn version saw a huge downgrade and didnt have much to talk about. The arcade version had some nice shading, proper shadows and 3D backgrounds. I think the characters were made out of more polys too.
But even if we ignore the arcade version the Saturn game itself lacked in many areas. The backgrounds were 2D planes whilst basic shading and lighting were absent. At least though it was 60fps.

Me and a friend have done some retrospective visit of the multiplatform games and revisited some of the console's exclusives a few years back. The Saturn versions (minus a few 2D games) in most cases fared worse. Ugly transparencies, lower polygons, reduced resolution, absent or paired down lighting etc.
The Saturn was starting to show its capabilities with games like Panzer Dragoon Saga and Sonic R but the PS1 at that point has already reached and probably surpassed them.
 
In 3D polygonical games
How so? Trees can be made out of any number of polygons. Modern games, for those of us not stuck in the 90s, are made of lots.

Applying texture to objects, 2 triangles versus 1 quad... If you have a simple box then you have 12 triangles or 6 quads...
Textures are applied to fragments, not polygons. For those of us not stuck in the 90s. If rendering the same texture to a number of faces, that texture sits in cache and is applied per-pixel. It makes no odds what the geometry type is.

Yes, now count how many polygons/lines does it need and I already did it....
Edges don't mean squat.

A well rounded circle has 24 triangles to avoid being too edgy...
24 triangles to look round is probably a pretty good number, for the 90s.

This video shows that Saturn was a 3D beast also despite having a stigma/myth of "sucking" at 3D...
This explains a lot. ;)

There are plenty of reasons to prefer triangles. They always exist in a plane, whereas four vertices can have a third dimension. A triangle always subdivides to another triangle, and a new polygon can always be created by adding just one more vertex to two others, whereas a quad can be subdivide into a quad and a triangle, while you have to add two vertices in the same plane to create a quad. Every other polygon can be expressed as triangles, but quads can't express all polygons - how many quads do you need to express a triangle or heptagon? To create triangles, you have to overlap two quad vertices which is making it a triangle! Triangles are easier to work with in the realtime engine, more mathematically 'atomic', and focussing performance on pushing triangles means accelerating all geometry to the same degree.
 
Given the Saturn's development history, I'm not sure it should be used for an advocate for or against using quads as a rendering primitive. On that topic, though, Last Bronx is certainly a decent looking game, especially when you consider the resolution it runs at, but I personally think VF2 looks better, and Dead or Alive tops it as probably the best looking Saturn 3d fighter. But all of them lose out to Tekken 3 on PSX because of the better lighting and effects, and that's really the story of the Saturn's 3D capabilities right there. You can get 60fps, high res, and pretty high poly objects if you can use VDP2 to fill most of the screen up with with scroll planes to make it look "full", but when you start adding lighting and other effects, you end up with something like Fighting Vipers or Megamix.... Low res, low poly, and not very good looking lighting. Fast at the basics, slow at the complex, while PSX and 64 had much more robust feature sets that took much less of a performance hit to add some extra bells and wistles.
 
How so? Trees can be made out of any number of polygons. Modern games, for those of us not stuck in the 90s, are made of lots.

You never heard/read of a term/word "example" did you?

You state an obvious thing then you proceed to make a out of touch assumption (indirectly) about me despite the discussion being about Saturn, triangle and quad rendering. Yet you didn't bother to read by seeing what you wrote thus you didn't grasp the motive/theme of discussion...


Textures are applied to fragments, not polygons.

You just said what I have described in a different way, when I said 12 triangles and 6 quads which I basically said that they are fragments. I said basically what you said...

Better and correct way would be a piece or faces or surface rather than fragment which would mean it isn't part of the mesh/model...


For those of us not stuck in the 90s.

Again you proceed to make a out of touch assumption (indirectly) about me despite the discussion being about Saturn, triangle and quad rendering. Yet you didn't bother to read by seeing what you wrote thus you didn't grasp the motive/theme of discussion...

If rendering the same texture to a number of faces, that texture sits in cache and is applied per-pixel. It makes no odds what the geometry type is.

...And? Textures are applied to faces that have varying angles thus the engine/GPU needs to calculate how to apply to each face. Having a texture in cache means faster calls/draws, the shorter the more you can apply.

Edges don't mean squat.

What edges? Its was about amount of polygons for a object in triangle and quad rendering...

24 triangles to look round is probably a pretty good number, for the 90s.

Again you proceed to make a out of touch assumption (indirectly) about me despite the discussion being about Saturn, triangle and quad rendering. Yet you didn't bother to read by seeing what you wrote thus you didn't grasp the motive/theme of discussion...

This explains a lot. ;)

There are plenty of reasons to prefer triangles. They always exist in a plane, whereas four vertices can have a third dimension. A triangle always subdivides to another triangle, and a new polygon can always be created by adding just one more vertex to two others, whereas a quad can be subdivide into a quad and a triangle, while you have to add two vertices in the same plane to create a quad. Every other polygon can be expressed as triangles, but quads can't express all polygons - how many quads do you need to express a triangle or heptagon? To create triangles, you have to overlap two quad vertices which is making it a triangle! Triangles are easier to work with in the realtime engine, more mathematically 'atomic', and focussing performance on pushing triangles means accelerating all geometry to the same degree.

You mention modern games yet with amount of detail that they are pushing could be made of quads entirely and since quads haven't been used in games since Saturn, I doubt there was any effort to create an efficient way of rendering quads in this day and age.... For all we know quad's could match triangles in performance. Yet Ethatron pointed out that Tesselation with quad's has almost no impact to performance thus Quad Tesselation Rendering has potential to outperform Triangle Tesselation Rendering

If you use the tesselator to do quads, you would almost get it for free in comparison to triangle tesselation.

For all we know Quad Rendering has already done calculations that is being done in tesselation since it has no real impact of rendering quads thus tesselation and quads function similarly?
 
Both VF2 and Last Bronx suffered from having their 3d backgrounds neutered into 2d backgrounds for the Saturn releases. They both used the high res option for the Saturn which limited the lighting in many ways. Fighting Vipers used a lower res mode for betting lighting. Fighters Megamix uses the Fighting Vipers engine I think.

That Saturn video sure brought back some memories. But yeah, Tomb Raider Saturn suffered from lower framerates and less detail than the PS1 Tomb Raider, even though Saturn was the initial platform being developed for. This was the case with most 3rd party games. Really only SEGA themselves and Tecmo were able to get the most out of Saturn's 3d capabilities. Burning Rangers is a good example of what the Saturn was truly capable of, quads and all.
 
Triangles are preferable because setting up interpolation gradients is straightforward. Because the interpolation is linear in unprojected space the gradients are constant for the triangle. And there's only one way to interpolate, so the result is never unexpected. It also means the polygons are always convex which avoids complications or unexpected results in rasterization.

Nintendo DS supports quads natively (and higher order polygons, if they get clipped). It does this by doing two-fold linear interpolation, where it interpolates top to bottom then left to right for every scanline. This is a lot less efficient, results in non-coplanar and/or concave quads getting warped if they're not aligned with the x axis, and (at least with how DS hardware works) causes the interpolation to look all jittery because of roundoff error each scanline. Annoyingly, the last issue is more prevalent on triangles, which didn't need that implementation in the first place.

Saturn did quads a different way, and it also had a ton of problems. Unlike most other 3D hardware I know of, Saturn used a sort of "forward rendering", where it mapped lines from a sprite to stretched lines in screen space (the norm, "backwards rendering", maps pixels in screen space back to the texture, and marches through the screen one at a time). This technique suffered from a serious amount of internal overdraw, where pixels in the same quad are drawn on top of each other. This happens for two reasons. Because the line algorithm suffers from integer roundoff at the edges, adjacent lines would normally leave some gaps between them, so the lines are drawn thicker by inserting an extra pixel where they change slope. And, when the two control edges of the quad are not the same size, multiple lines from the sprite naturally overlap.

This overdraw results in wasted fillrate. Especially if you drew triangles (as degenerate quads) in the wrong way, resulting in a ton of overdraw as every line converged on the same point. It also makes the 50% blended draw mode very glitchy, because the overdraw pixels get blended multiple times. That's why very few 3D games use it, instead opting to use the garish mesh mode.

Saturn's quads also had another major problem: because they were drawn by distorting sprites, the source texture had to be an axis aligned rectangle (where the width is a multiple of 8 pixels no less). This restricted how you could apply textures to meshes. It also made it so that you basically couldn't freely clip or tessellate the quads. This wasted fillrate (although it did at least reject lines that were entirely outside the clip rectangle), and if your transformed coordinates happened to exceed the limited vertex coordinate space you were screwed, so you'd have to be careful with your quad sizing and camera angles to prevent this.

Had they gone with mapping arbitrary quads as textures the implementation would have been far more expensive.

The line based redrawing also just plain resulted in more visible interpolation roundoff error inside the quad because of how the errors stack. There's a Saturn vs PS1 comparison video of Grandia where the difference seems apparent to me (although in other ways Grandia runs better on Saturn)

There was one advantage its quads gave vs PS1 though (outside of being more efficient for geometry sometimes). While the quads still weren't perspective correct, ones that project rectangles (like say, floor tiles) would at least be drawn with much less noticeable distortion than they would had they been drawn as two triangles. And a side-effect of the line by line approach meant that some concave quads would have kind of a curved look to them instead of correctly matching an inflection point, although I think in the real world this would be difficult to utilize for much.

Saturn had a bunch of other weaknesses in 3D vs PS1, but they weren't related to quads so I won't go on about them here.

Incidentally, 3DO had a "forward" style quad renderer too, and it seemed to avoid some of the problems Saturn's had. But even after reading the documents a few times I still don't really understand the finer details of how it works.
 
Last edited:
How so? Trees can be made out of any number of polygons. Modern games, for those of us not stuck in the 90s, are made of lots.

Textures are applied to fragments, not polygons. For those of us not stuck in the 90s. If rendering the same texture to a number of faces, that texture sits in cache and is applied per-pixel. It makes no odds what the geometry type is.

I had thought he might be referring to billboards and imposters in the first case.
In the second case I thought he's under the impression that you set the texture once per triangle vs once per quad (i.e. a state change for each primitive, implying that quads have half the amount of state changes).

Then I read his response to you.
 
If you use the tesselator to do quads, you would almost get it for free in comparison to triangle tesselation.
This makes no sense whatsoever. Tesselation deals with subdivision based on the face at hand and its adjacency information. Computation gets harder the more adjacent faces you have, so quad tesselation is definitely not better than tris tess.

As for the "why not quads" in general: because HW doesn't have infinite precision, which is required in order to rotate and scale quad in space and keep vertices coplanar. Look at the mesh of cuboid around 2:15 here:


The moment you don't have enough precision, renderer drops to triangles to compensate for the inevitable bump. Furthermore this bump can go in one of two directions and you have no control over it. Quads are just bad primitives. Mostly because they aren't primitive (as in: basic) enough.
 
I had thought he might be referring to billboards and imposters in the first case.
In the second case I thought he's under the impression that you set the texture once per triangle vs once per quad (i.e. a state change for each primitive, implying that quads have half the amount of state changes).

Then I read his response to you.
Something like that... I am not good at explaining since english ain't my native language afterall.

This makes no sense whatsoever. Tesselation deals with subdivision based on the face at hand and its adjacency information. Computation gets harder the more adjacent faces you have, so quad tesselation is definitely not better than tris tess.

As for the "why not quads" in general: because HW doesn't have infinite precision, which is required in order to rotate and scale quad in space and keep vertices coplanar. Look at the mesh of cuboid around 2:15 here:


The moment you don't have enough precision, renderer drops to triangles to compensate for the inevitable bump. Furthermore this bump can go in one of two directions and you have no control over it. Quads are just bad primitives. Mostly because they aren't primitive (as in: basic) enough.

Good point though if you can get more performance/detail with quads, you could have triangles for any distortion...

In games they combine various rendering to get higher performance...
 
We only witnessed 3DO, Saturn and DS using Quad Rendering...

Three separate tries at quads...

Would quad rendering work as well as triangle rendering on a fixed function GPU?
There is nothing that would have stopped anyone from making their games/engines use quads if they were efficient. But for many practical reasons pointed earlier attempts on quads were abandoned.
Considering that developers are looking for ways and tricks to maximize efficiency in real time graphics, quads would have been used already after 20 years of experience in 3D gaming if they were indeed a good solution. Exophase mentioned that quads have some practical and efficiency issues on the DS as well which is a lot more recent than the 3DO and the Saturn, so I wonder why you still have hopes for its practicality, at least with the current state of affairs. Shifty Geezer and some others also made clear why quads arent that practical.
You also had the impression that the Saturn was a 3D powerhouse and hence an indication that quads were a good solution which was false. 3D artists work with quads, so it should have been a no brainer to also use quads in games when their assets are imported. But they still prefer tris. That should give you a hint.
 
There is nothing that would have stopped anyone from making their games/engines use quads if they were efficient. But for many practical reasons pointed earlier attempts on quads were abandoned.
Considering that developers are looking for ways and tricks to maximize efficiency in real time graphics, quads would have been used already after 20 years of experience in 3D gaming if they were indeed a good solution. Exophase mentioned that quads have some practical and efficiency issues on the DS as well which is a lot more recent than the 3DO and the Saturn, so I wonder why you still have hopes for its practicality, at least with the current state of affairs. Shifty Geezer and some others also made clear why quads arent that practical.
You also had the impression that the Saturn was a 3D powerhouse and hence an indication that quads were a good solution which was false. 3D artists work with quads, so it should have been a no brainer to also use quads in games when their assets are imported. But they still prefer tris. That should give you a hint.
I get the hint...

Triangle rendering were used since early 1960's and quad wasn't used/tested until late 1980's.

Developers are not always open armed... That's why x86 is still here as are triangle rendering...

There haven't been any real effort to work on quad rendering and its performance, nowhere near in light years compared to triangle rendering that had a constant push since late 1980's.... Didn't that ever pop out in your thoughts? Not even once...?
 
Rendering using quads already happens. Thats how I build my own models. Thats how many artists have been building their models for many years. Quads are already part of 3D graphics. Which means they are way too close into using in games than what you may thing. Yet they are not chosen for games, although real time sculpting use them. Instead they are being converted. If such efficiency existed it should have already been checked as many developers are looking for inventive ways to maximize fidelity without killing performance. The models are quad ready.
 
Would quad rendering work as well as triangle rendering on a fixed function GPU?

Doesn't matter if fixed or not - there are quite a few disadvantages that have been mentioned in this thread.

Developers are not always open armed... That's why x86 is still here as are triangle rendering...

No, it's not all about inertia. It's about what actually gets the job done and well. Quad rendering have been tried and abandoned because it's not a terribly sound idea. It doesn't solve any of the existing problems triangle-based rendering has. On top of that it does introduce new problems: stability of representation, interpolation complexity, suitability for tesselation (or lack thereof), potentially quite a few others. Quads solve absolutely nothing, none of the problems developers face today.

Didn't that ever pop out in your thoughts? Not even once...?

What pops into my mind is that you think of rendering as sort of black magic, faith-based exercise that people do. If only they had enough imagination, surely something would come out of that!

No, it wouldn't. It's not a sound idea. It was attempted several times in the past only because it made it possible to overcome some of the limitations of triangles that existed back then. Technology progressed (the raw kind: raw power, memory capacity, bandwidth) and none of the problems quads were trying to solve matter anymore. Quads are dead not because people love triangles and have shrines in their name. They are dead because they suck.

It's a completely different issue than, say, voxels have, which makes them suitable for certain tasks. But that's because voxels are very much different than triangles and have different properties (like volume). Quad is just two coplanar triangles. Unles this coplanarity solves something, it's pointless to use them. But the sheer fact that quad *needs* coplanar vertices is actually a hindrance, not a liberation.
 
Nesh you're not rendering those quads, they get converted to triangles. Even in zbrush when you look at a very low poly object, you can see the diagonal triangle edges.
 
Status
Not open for further replies.
Back
Top