Curiosity re: Voxels

DarkkOne
Posts: 268
Joined: Mon Jun 06, 2016 11:26 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Widnows 11
Graphics Processor: nVidia with Vulkan support

Curiosity re: Voxels

Post by DarkkOne »

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?
Professor Hastig
Posts: 236
Joined: Mon Jan 09, 2023 2:02 am
Graphics Processor: nVidia (Modern GZDoom)

Re: Curiosity re: Voxels

Post by Professor Hastig »

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.
DarkkOne
Posts: 268
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

Post by DarkkOne »

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?
User avatar
Rachael
Posts: 13613
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Curiosity re: Voxels

Post by Rachael »

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.
DarkkOne
Posts: 268
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

Post by DarkkOne »

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?
User avatar
Rachael
Posts: 13613
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Curiosity re: Voxels

Post by Rachael »

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.
DarkkOne
Posts: 268
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

Post by DarkkOne »

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).
User avatar
Rachael
Posts: 13613
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Curiosity re: Voxels

Post by Rachael »

Yep - exactly.
User avatar
Phredreeke
Posts: 295
Joined: Tue Apr 10, 2018 8:14 am

Re: Curiosity re: Voxels

Post by Phredreeke »

DarkkOne wrote: Fri Mar 03, 2023 2:00 pm 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).
Also, Ken's hardware voxel code was written for OpenGL 1.1, so there weren't really other options available.
DarkkOne
Posts: 268
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

Post by DarkkOne »

Thanks so much for explaining it to me. I've been curious about this for quite a while.

Return to “General”