Hypothetical non polygon based 3D?

You can talk about almost anything that you want to on this board.

Moderator: Moderators

User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Hypothetical non polygon based 3D?

Post by Drew Sebastino »

That Doom video I posted had got me thinking about different techniques for drawing 3D graphics and how, disregarding lighting, they have been about the same since about Quake, (well, hardware rendering instead of software rendering) despite there being exponentially more processing power to work with. I thought about how in Adobe Illustrator and similar programs you can create vector drawings with curves alongside lines, and wondered, could the same idea be applied to 3D graphics? For example, if you were to model a sphere, you could use six vertices, one for each end of each axis. How computationally expensive would this hypothetical method be, if possible at all? Many 3D models I have seen have so many vertices in order to appear smooth that it seems like there has to be a more efficient way of making things appear rounded.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Hypothetical non polygon based 3D?

Post by rainwarrior »

Espozo wrote:there has to be a more efficient way of making things appear rounded.
There's a lot of ways.

In terms of lighting, one idea is per-pixel lighting, which lets you "interpolate" the shape of the surface between vertices:
https://en.wikipedia.org/wiki/Phong_shading

Another lighting idea is using a texture map to indicate the surface shape:
https://en.wikipedia.org/wiki/Normal_mapping

You can also interpolate new vertices between those of a lower-poly model, producing a more rounded silhouette:
https://en.wikipedia.org/wiki/Subdivision_surface

If you're talking about trying to render 2D curves and shapes specifically, there's many ideas for that too:
http://wdobbie.com/post/gpu-text-render ... -textures/
User avatar
pubby
Posts: 583
Joined: Thu Mar 31, 2016 11:15 am

Re: Hypothetical non polygon based 3D?

Post by pubby »

This kinda exists today... except it's still triangles all the way down.

You send a small amount of data to the GPU (e.g. 6 vertices), and then the GPU can generate all the triangles it wants from it. Doing things this way can be a good optimization because memory transfers are slow.
adam_smasher
Posts: 271
Joined: Sun Mar 27, 2011 10:49 am
Location: Victoria, BC

Re: Hypothetical non polygon based 3D?

Post by adam_smasher »

Have a look at Ecstatica, a computer game sent to us from an alternate dimension where polygons do not exist (video in Polish for maximum otherworldliness).
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: Hypothetical non polygon based 3D?

Post by Drew Sebastino »

rainwarrior wrote:There's a lot of ways.
Normal mapping doesn't quite replace more polygons, as the edges of an object are still as jagged, and subdivision is part of the problem, as it just adds more vertices.
pubby wrote:This kinda exists today... except it's still triangles all the way down.

You send a small amount of data to the GPU (e.g. 6 vertices), and then the GPU can generate all the triangles it wants from it. Doing things this way can be a good optimization because memory transfers are slow.
Or maybe it doesn't. :lol: Any particular reason why modern GPUs are "adamant" on using triangles? Isn't a modern GPU kind of like a massively parallel, limited instruction set CPU, and as such, drawing triangles is done "in software"?
adam_smasher wrote:Have a look at Ecstatica, a computer game sent to us from an alternate dimension where polygons do not exist (video in Polish for maximum otherworldliness).
Reminds me of this: https://www.youtube.com/watch?v=IzvPVkb5_08
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Hypothetical non polygon based 3D?

Post by rainwarrior »

Espozo wrote:Normal mapping doesn't quite replace more polygons, as the edges of an object are still as jagged, and subdivision is part of the problem, as it just adds more vertices.
I am not quite clear about what you want, then, but here's another try...

You can use a texture with an alpha mask to cut curves off of polygons. You can render a sphere as a single quad with a normal map and a circular alpha cutout, for example.

(This is sort of a combination of the 4th thing in my previous post, i.e. using textures to draw curves across polygons, and the 2nd thing, using textures to provide surface shape for lighting.)


There's lots of tricks for producing busy-volume objects with few polygons, typically used for things like trees, hair, etc.

For example, maybe for a tree you just have two quads (like an X from above) but use alpha to coverate to blend away the face that's currently more edge-on from your viewpoint.


Your question about what you have CPU/GPU resources to do is not easily answerable. Depends on the situation. Sometimes it's better to throw more polygons at the model. Sometimes subdivision surfaces perform very well. Sometimes too much stuff in your pixel shader is worse than too many polygons. It's not really something that's easy to speculate on, but lowering polygons is far from the only way to try and improve GPU performance (and how much it can affect it really depends on the nature of the system we're talking about).
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Hypothetical non polygon based 3D?

Post by Oziphantom »

Espozo wrote:Or maybe it doesn't. :lol: Any particular reason why modern GPUs are "adamant" on using triangles? Isn't a modern GPU kind of like a massively parallel, limited instruction set CPU, and as such, drawing triangles is done "in software"?
Yes. Triangles are FLAT 100% dead flat every time, can't bend a triangle. This makes lighting easier, two triangles that have 2 matching vertices will share a 100% aligned side so there will be no cracks in the model. If you want to see where this goes wrong, look at a Saturn it uses Quads, and you see all the cracks, lighting issues and other problems with them in about 5mins of a 3D game on a Saturn, or Tomb Raider 1 ( and possibly 2 as well ) on the PS1 as it still uses Quads. Also any other primitive can be made out of triangles where as quads tend to force things to be squarish, hence TR on Saturn has a software Triangle Renderer to render Lara because you can't do a face in quads or boobs for that matter.

The PSP has hardware Bézier patch rendering and I think I was the only person to ever use it on the device, but I'm sure there are other instances of it being used probably in 2D games though. In global lighting its nice, anything else and ohhh artefact city and then the Continuity problems, models crack, texture warping.. lovely idea just not so easy to control.

There was a really old PC game, Ballz or something like it that use spheres for rendering as it was "faster" for the PC to render them, but its hard to make a solid shape out of spheres.
Alone in the Dark uses Ellipses and that is what gives it its distinctive look, for arms and legs top notch for the jacket and skirt not so much. I think Little Big Adventure also used ellipses but it might have been spheres.

Yes we now are back to software rendering, and not hardware rendering. Hardware rendering is DX8 fixed pipeline or ES1.1 on the early Phones. Now with Shaders we are Hardware Accelerated Software Rendering.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Hypothetical non polygon based 3D?

Post by thefox »

Oziphantom wrote:If you want to see where this goes wrong, look at a Saturn it uses Quads, and you see all the cracks, lighting issues and other problems with them in about 5mins of a 3D game on a Saturn, or Tomb Raider 1 ( and possibly 2 as well ) on the PS1 as it still uses Quads.
Let's clarify that "cracks" are fundamentally not an issue of quads, they're an issue of the rasterizer (or some problem, e.g., lack of precision, in calculating the vertex coordinates). It's perfectly possible to have a quad-based 3D model where each edge is shared.
Espozo wrote:Isn't a modern GPU kind of like a massively parallel, limited instruction set CPU, and as such, drawing triangles is done "in software"?
The triangle rasterization is still done in specialized hardware. The programmable part comes into play in shading (doing vertex operations and calculating the pixel color).
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
Bregalad
Posts: 8055
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Hypothetical non polygon based 3D?

Post by Bregalad »

adam_smasher wrote:Have a look at Ecstatica, a computer game sent to us from an alternate dimension where polygons do not exist (video in Polish for maximum otherworldliness).
The technique for rendering graphics looks very similar to Final Fatansy 7 (also 8, 9, Chrono Cross) : Pre-rendered background and 3d polygonal objects..

I belive we *could* use that technique with actual sprites in order to have "3d without polygons", but you'd have to pre-render sprites in all possible angles of view so it'd be a lot of work.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Hypothetical non polygon based 3D?

Post by tokumaru »

Bregalad wrote:The technique for rendering graphics looks very similar to Final Fatansy 7 (also 8, 9, Chrono Cross) : Pre-rendered background and 3d polygonal objects..
Yeah, but the main point I guess is that all polygons in Ecstatica are spheres/ellipsoids, while traditional 3D usually goes with triangles or quads.
I belive we *could* use that technique with actual sprites in order to have "3d without polygons", but you'd have to pre-render sprites in all possible angles of view so it'd be a lot of work.
Resident Evil on the GBC?
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Hypothetical non polygon based 3D?

Post by rainwarrior »

Followup to the approach I was mentioning, i.e. putting a "3D" shape on a quad, is that it didn't usuall handle geometry intersection well. The problem was that the depth buffer value was determined by the geometry before the pixel shader, so no matter what fake shape you put on the quad, it still intersects other stuff like a flat card.

I think with DX11 era, though, we can change depth in the pixel shader now, so the capability is there, but delaying the depth test until after the pixel shader is a bit of a performance hit by itself.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Hypothetical non polygon based 3D?

Post by rainwarrior »

Oh yeah, I also forgot to mention "parallax mapping", which is like putting a heightfield in a texture and having a mini-raytracer in the shader.
https://www.youtube.com/watch?v=6B-5a2HWqpw

Sort of taking the normal map idea to a further extreme.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Hypothetical non polygon based 3D?

Post by tepples »

Is parallax mapping the same as the "voxel" (really height map) renderer in Comanche, except on the GPU?
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Hypothetical non polygon based 3D?

Post by rainwarrior »

tepples wrote:Is parallax mapping the same as the "voxel" (really height map) renderer in Comanche, except on the GPU?
Well, there's a lot of variations of the technique, but there's similarities, yes. The big difference is that you are rendering each pixel independently; I think most voxel engines are instead rendering each voxel shape individually, different order of operations, different stuff is being batched for efficiency, etc. The naive way is more like a raytracer technique.
93143
Posts: 1715
Joined: Fri Jul 04, 2014 9:31 pm

Re: Hypothetical non polygon based 3D?

Post by 93143 »

Oziphantom wrote:The PSP has hardware Bézier patch rendering and I think I was the only person to ever use it on the device
Oh hey, it does.

I know NURBS was a buzzword for a while, but clearly it never really took off. Didn't the PS2 make a big deal over it, and then it turned out it sucked so no one used it?
Post Reply