I understand that voxels can't be done in the style of the original Build games in the hardware accelerated renderers. And honestly, I'm just kinda curious why that is.
Like, my understanding is that Build-style voxels are basically just a bunch of billboarded squares, one per voxel. Is it a performance issue, is there something about modern rendering techniques that would make using particles, or even just billboarded sprites, too inefficient?
Curiosity re: Voxels
-
- Posts: 274
- Joined: Mon Jun 06, 2016 11:26 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Widnows 11
- Graphics Processor: nVidia with Vulkan support
-
- Posts: 255
- Joined: Mon Jan 09, 2023 2:02 am
- Graphics Processor: nVidia (Modern GZDoom)
Re: Curiosity re: Voxels
It'd probably be too inefficient. You'd have to recalculate each particle's coordinates each frame and create new vertex buffer data for it. That would limit the amount of voxels you can do quite substantially. Not even Ken Silverman tried to render the voxels like this in Polymost.
Let's also not forget that a projected voxel is not 3D. This works to a degree with a renderer that does view pitching by shifting the viewport up and down, but with a true perspective projection would quickly fall apart.
Let's also not forget that a projected voxel is not 3D. This works to a degree with a renderer that does view pitching by shifting the viewport up and down, but with a true perspective projection would quickly fall apart.
-
- Posts: 274
- Joined: Mon Jun 06, 2016 11:26 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Widnows 11
- Graphics Processor: nVidia with Vulkan support
Re: Curiosity re: Voxels
Why would pitching affect them? Wouldn't you just billboard them both horizontally and vertically?
How were software engines able to track that many voxels. Were they just not tracked in 3D space at all?
How were software engines able to track that many voxels. Were they just not tracked in 3D space at all?
-
- Posts: 13793
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Curiosity re: Voxels
Both Build and ZDoom (their software renderers, respectively) rendered voxels to a buffer and rendered the buffer as a single sprite.
And with the algorithm used (since they used the same algorithm to do the buffer render) it actually is not possible to create a buffer big enough to store the voxel in the hardware renderer without using lots of GPU RAM which gets to be much greater of an issue when pitching at extreme angles. The more you pitch the view, the more horizontal (and possibly vertical) space you need - and that's problematic at extreme pitches such as 90 degrees up/down since the horizontal space needed would be infinite.
That particular algorithm also does not allow pitching at all - which means the billboarding would have to be Y-only, hence the need for a much bigger buffer (especially at extreme pitches). It worked well for the y-shearing effect of the software renderer because the outward horizontal angle never changed when pitching the view.
I don't know why people liked the old software rendered voxels so much. I never liked the way they looked. The cubes look better, in my opinion.
And with the algorithm used (since they used the same algorithm to do the buffer render) it actually is not possible to create a buffer big enough to store the voxel in the hardware renderer without using lots of GPU RAM which gets to be much greater of an issue when pitching at extreme angles. The more you pitch the view, the more horizontal (and possibly vertical) space you need - and that's problematic at extreme pitches such as 90 degrees up/down since the horizontal space needed would be infinite.
That particular algorithm also does not allow pitching at all - which means the billboarding would have to be Y-only, hence the need for a much bigger buffer (especially at extreme pitches). It worked well for the y-shearing effect of the software renderer because the outward horizontal angle never changed when pitching the view.
I don't know why people liked the old software rendered voxels so much. I never liked the way they looked. The cubes look better, in my opinion.
-
- Posts: 274
- Joined: Mon Jun 06, 2016 11:26 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Widnows 11
- Graphics Processor: nVidia with Vulkan support
Re: Curiosity re: Voxels
I agree the cubes look better, actually. As I said, I was just really curious about how it was done. Based on the prior person's reply, I was wondering if it was essentially "generate a sprite from the billboards."
I'm always just really curious about spots where something from an old engine is difficult to re-produce in modern rendering pipelines, and this one I had a little more difficulty understanding just reading things than I liked, so I figured I'd ask.
So, basically, the squares of the voxels get "taller" visually as you adjust pitch, making the buffer need to be larger, and at 90 of course that'd mean they go infinite?
I'm always just really curious about spots where something from an old engine is difficult to re-produce in modern rendering pipelines, and this one I had a little more difficulty understanding just reading things than I liked, so I figured I'd ask.
So, basically, the squares of the voxels get "taller" visually as you adjust pitch, making the buffer need to be larger, and at 90 of course that'd mean they go infinite?
-
- Posts: 13793
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Curiosity re: Voxels
Yeah - in order to create a buffer big enough to cover the entire top/down vertical horizon, it would have to be infinitely wide - which is not possible.
-
- Posts: 274
- Joined: Mon Jun 06, 2016 11:26 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Widnows 11
- Graphics Processor: nVidia with Vulkan support
Re: Curiosity re: Voxels
Makes sense. So the simplest breakdown is that reproducing their voxel technique accurately is mutually exclusive with being able to look up and down further than you can in those games. And anything else would just be an approximation of the original effect, of which the 3D model route is the one chosen (and also, arguably, what they were trying to emulate in the first place).
-
- Posts: 13793
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Curiosity re: Voxels
Yep - exactly.
-
- Posts: 309
- Joined: Tue Apr 10, 2018 8:14 am
Re: Curiosity re: Voxels
Also, Ken's hardware voxel code was written for OpenGL 1.1, so there weren't really other options available.
-
- Posts: 274
- Joined: Mon Jun 06, 2016 11:26 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Widnows 11
- Graphics Processor: nVidia with Vulkan support
Re: Curiosity re: Voxels
Thanks so much for explaining it to me. I've been curious about this for quite a while.