Hypothetical non polygon based 3D?
Moderator: Moderators
- Drew Sebastino
- Formerly Espozo
- Posts: 3496
- Joined: Mon Sep 15, 2014 4:35 pm
- Location: Richmond, Virginia
Hypothetical non polygon based 3D?
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.
- rainwarrior
- Posts: 8731
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Hypothetical non polygon based 3D?
There's a lot of ways.Espozo wrote:there has to be a more efficient way of making things appear rounded.
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/
Re: Hypothetical non polygon based 3D?
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.
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.
-
- Posts: 271
- Joined: Sun Mar 27, 2011 10:49 am
- Location: Victoria, BC
Re: Hypothetical non polygon based 3D?
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).
- Drew Sebastino
- Formerly Espozo
- Posts: 3496
- Joined: Mon Sep 15, 2014 4:35 pm
- Location: Richmond, Virginia
Re: Hypothetical non polygon based 3D?
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.rainwarrior wrote:There's a lot of ways.
Or maybe it doesn't. 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"?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.
Reminds me of this: https://www.youtube.com/watch?v=IzvPVkb5_08adam_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).
- rainwarrior
- Posts: 8731
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Hypothetical non polygon based 3D?
I am not quite clear about what you want, then, but here's another try...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.
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).
-
- Posts: 1565
- Joined: Tue Feb 07, 2017 2:03 am
Re: Hypothetical non polygon based 3D?
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.Espozo wrote:Or maybe it doesn't. 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"?
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.
Re: Hypothetical non polygon based 3D?
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.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.
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).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"?
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Re: Hypothetical non polygon based 3D?
The technique for rendering graphics looks very similar to Final Fatansy 7 (also 8, 9, Chrono Cross) : Pre-rendered background and 3d polygonal objects..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).
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.
Re: Hypothetical non polygon based 3D?
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.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..
Resident Evil on the GBC?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.
- rainwarrior
- Posts: 8731
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Hypothetical non polygon based 3D?
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.
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.
- rainwarrior
- Posts: 8731
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Hypothetical non polygon based 3D?
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.
https://www.youtube.com/watch?v=6B-5a2HWqpw
Sort of taking the normal map idea to a further extreme.
- rainwarrior
- Posts: 8731
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Hypothetical non polygon based 3D?
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.tepples wrote:Is parallax mapping the same as the "voxel" (really height map) renderer in Comanche, except on the GPU?
Re: Hypothetical non polygon based 3D?
Oh hey, it does.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
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?