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

Discussion in 'Console Technology' started by Npl, Dec 11, 2014.

Thread Status:
Not open for further replies.
  1. blastingthosejets

    Newcomer

    Joined:
    Dec 9, 2014
    Messages:
    29
    Likes Received:
    2
    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
     
  2. Nesh

    Nesh Double Agent
    Legend

    Joined:
    Oct 2, 2005
    Messages:
    12,457
    Likes Received:
    2,766
    Ahm right. I think thats a discussion for another thread
     
  3. function

    function None functional
    Legend Veteran

    Joined:
    Mar 27, 2003
    Messages:
    5,342
    Likes Received:
    2,802
    Location:
    Wrong thread
    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.
     
  4. blastingthosejets

    Newcomer

    Joined:
    Dec 9, 2014
    Messages:
    29
    Likes Received:
    2
    For Saturn's basically improvised 3D capable GPU... It did the job very well.
     
  5. Nesh

    Nesh Double Agent
    Legend

    Joined:
    Oct 2, 2005
    Messages:
    12,457
    Likes Received:
    2,766
    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.
     
  6. Shifty Geezer

    Shifty Geezer uber-Troll!
    Moderator Legend

    Joined:
    Dec 7, 2004
    Messages:
    43,577
    Likes Received:
    16,028
    Location:
    Under my bridge
    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.

    Edges don't mean squat.

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

    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.
     
    RecessionCone, HTupolev and Nesh like this.
  7. see colon

    see colon All Ham & No Potatos
    Veteran

    Joined:
    Oct 22, 2003
    Messages:
    1,626
    Likes Received:
    488
    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.
     
    Nesh likes this.
  8. blastingthosejets

    Newcomer

    Joined:
    Dec 9, 2014
    Messages:
    29
    Likes Received:
    2
    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?
     
  9. Sonic

    Sonic Senior Member
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    1,894
    Likes Received:
    109
    Location:
    San Francisco, CA
    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.
     
  10. Exophase

    Veteran

    Joined:
    Mar 25, 2010
    Messages:
    2,406
    Likes Received:
    430
    Location:
    Cleveland, OH
    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.
     
    #30 Exophase, Dec 12, 2014
    Last edited: Dec 12, 2014
    Shifty Geezer likes this.
  11. Infinisearch

    Veteran Regular

    Joined:
    Jul 22, 2004
    Messages:
    739
    Likes Received:
    139
    Location:
    USA
    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.
     
  12. Dominik D

    Regular

    Joined:
    Mar 23, 2007
    Messages:
    782
    Likes Received:
    22
    Location:
    Wroclaw, Poland
    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.
     
    Grall and TheWretched like this.
  13. blastingthosejets

    Newcomer

    Joined:
    Dec 9, 2014
    Messages:
    29
    Likes Received:
    2
    Something like that... I am not good at explaining since english ain't my native language afterall.

    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...
     
  14. Dominik D

    Regular

    Joined:
    Mar 23, 2007
    Messages:
    782
    Likes Received:
    22
    Location:
    Wroclaw, Poland
    What's there about quads that boosts performance? I'd say: nothing at all.
     
  15. blastingthosejets

    Newcomer

    Joined:
    Dec 9, 2014
    Messages:
    29
    Likes Received:
    2
    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?
     
  16. Nesh

    Nesh Double Agent
    Legend

    Joined:
    Oct 2, 2005
    Messages:
    12,457
    Likes Received:
    2,766
    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.
     
  17. blastingthosejets

    Newcomer

    Joined:
    Dec 9, 2014
    Messages:
    29
    Likes Received:
    2
    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...?
     
  18. Nesh

    Nesh Double Agent
    Legend

    Joined:
    Oct 2, 2005
    Messages:
    12,457
    Likes Received:
    2,766
    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.
     
  19. Dominik D

    Regular

    Joined:
    Mar 23, 2007
    Messages:
    782
    Likes Received:
    22
    Location:
    Wroclaw, Poland
    Doesn't matter if fixed or not - there are quite a few disadvantages that have been mentioned in this thread.

    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.

    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.
     
    Billy Idol likes this.
  20. Laa-Yosh

    Laa-Yosh I can has custom title?
    Legend Subscriber

    Joined:
    Feb 12, 2002
    Messages:
    9,568
    Likes Received:
    1,455
    Location:
    Budapest, Hungary
    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.
     
Loading...
Thread Status:
Not open for further replies.

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...