Technically this is not related to voxels ("volumetric pixels", so to say), which split the 3D space equally along all three axes. This is just a height map, a set of prisms, not entirely unlike a Doom map. Every prism has a regular fixed-size square base.
This is a vague statement. Are you suggesting each column can can have multiple layers of terrain, air, terrain? IIUC, the article disputes this:
> Such maps limit the terrain to “one height per position on the map” - Complex geometries such as buildings or trees are not possible to represent.
FWIW I'm working on a voxel sandcastle game. People usually seem particularly surprised by this style because they're so used to such games being rendered by height maps which don't allow tunnels or arches or overhangs.
No? Each pixel on a height map corresponds to a column of voxels of the specified height. You could represent the same height data with a fully general octree and it would look exactly the same.
It's kind of weird to call them "columns of voxels" when the columns can't have gaps and the "voxels" below the topmost are ignored completely. Which is to say, they're just columns...which is (definitionally) just a height map.
In fact, an octree for this approach would be _meaningfully worse_ because finding "the topmost voxel" in each column is O(logn)—or maybe worse?—versus O(1) for a height map. With no benefits, because you never look at any other voxels.
> It's kind of weird to call them "columns of voxels" when the columns can't have gaps
No, it's not weird. The columns don't have gaps because they are columns represented by a height map, which can't display arbitrary voxel geometry (unlike octrees), but that doesn't mean they can't display voxel geometry at all.
> Which is to say, they're just columns...which is (definitionally) just a height map.
Yes. A height map is representing voxel data without overhangs.
> In fact, an octree for this approach would be _meaningfully worse_
That's irrelevant. The fact remains that rendering the same height data using an octree would look exactly the same. If the latter displays voxel geometry, the former does too.
> A height map is representing voxel data without overhangs.
A height map can represent voxel data if the columns are integer heights, in the same way an integer can "represent" an infinite number of countable things. It's like saying the number 7 is "related" to a group of 7 ducks. The relationship is kind of meaningless.
But more importantly height maps can use also floating point heights in which case there's no reasonable mapping between the two. So your statement isn't generally true.
Your argument comes down to the meaning of "voxel", then. Voxels have volume, and they are represented with polygon faces. If you think that applies here, I guess more power to you.
Louis Castle developed a "voxel plus" software renderer for Westwood Studios' 1997 Blade Runner. It used "voxels" (with scare quotes) for character animation, not just terrain.
madmoose on May 28, 2018 | parent | context | favorite | on: How Voxels Became ‘The Next Big Thing’
Blade Runner didn't actually use voxels, they used a rather unique technique that they called "slice animations".
The 3D models were sliced from bottom to top into a couple of hundred slices (depending on desired quality) by intersecting the model with a horizontal plane and storing the resulting polygons.
The engine can only rotate the models around the vertical axis.
I made a hacky javascript version of the renderer a long time ago:
Seems that the people that developed the game considers it voxel based.
madmoose on May 28, 2018 | parent | next [–]
The page you linked quotes Louis Castle:
> What we are using is not voxels, but sort of 'voxels plus.'
So "not voxels". Louis Castle probably called it voxel-like because he didn't want to get too technical in an interview. Their technique has not been described in detail in the press but see http://deadendthrills.com/future-imperfect-the-lost-art-of-w... [Dead URL -- I tried to rewrite it with archive.org but it's down for me and apparently everyone else now -- can anyone else get through? -Don] for an article that calls it a "slice model"-technique.
I'm not an expert on voxels but I've reverse engineered and reimplemented most of the Blade Runner rendering engine and in my opinion it doesn't count as voxels. For one, you're never going to be able to rotate the models around any axis other than the vertical.
LouisCastle on May 28, 2018 | root | parent | next [–]
Fun! Yeah, we stored our data as slices for space and restricted rotation to the Y axis. Both were optimization since each frame of an animation was a full model there was no need to rotate them. The renderer could render them from any angle though so I still consider them voxels. More like voxels lite then voxel plus. We also used a lot of sprite cards with zdepth and a quick normal hack for lighting. You had to cut corners where you could back then!!
madmoose on May 28, 2018 | root | parent | next [–]
Hello Louis!
I've certainly had a lot of fun figuring out how you did what you did, so thank you for that, no matter what you call it :)
You certainly crammed a lot of tech into one engine! Full screen 15 BPP videos with full z-buffer with smaller alpha-channeled videos rendered on top, character models with lighting. Even the UI is looping videos.
Once I get proper path finding working Blade Runner will be a lot more playable in our ScummVM engine.
I've probably rewatched the opening scene of the game a thousand times while working on it...
I only wished that you had used a scripting language for your game code instead of compiling it to DLLs. I know you optimized heavily for speed but it would have made our task a lot easier :)
DonHopkins on May 28, 2018 | root | parent | prev | next [–]
So that's why you didn't include the Deckard -vs- Pris scene where she rotates around the X-axis! ;)
pjtr on May 28, 2018 | root | parent | prev | next [–]
Fun indeed!
Can you talk about how the artists authored the original models? Was it an automated conversion from a standard polygon model or from a full voxel model? Or was it all drawn in this special slice format directly somehow?
madmoose on May 28, 2018 | root | parent | next [–]
Not Louis, but the article I linked above says they used 3D Studio Max and converted it to the slice model format.
When this was first posted I made a game with a port of this approach to AGS Engine. Nowadays AGS is much faster since we have improved a lot of things, but this wasn’t the case at the time, so I had to make a few little tricks to make the rendering work well with the engine at the time.
The game originally used a "voxel" engine [1], but the final release switched to affine texture mapping (with a heightmap-based terrain, still).
The voxel-style engines tend to feature a longer draw distance (due to it being cheaper to render, as you can easily use various hacks to eg. halve texture accesses far away).
For a detailed look into the rendering of Magic Carpet, start from Slide 8 of [2].
Off topic: The very first assignment in this game is called “oil tank holiday”: fly the chopper to unguarded oil tanks, shoot and watch them burn, and then fly home. No enemies. Just learn to fly and shoot.
I apply this in testing code. After you write some code, try to think of the absolute minimal test to prove that your code does anything at all without crashing. These are my “oil tank holiday” tests. It is always humbling to see those fail.
Reading Voxel always takes me back, way back.. I played Comanche for hours and read up on Voxel tech in various magazines of the day; so clever and easy to implement. Nice demo and thanks for the trip down memory lane.
First thing that comes to my mind is the procedural generation in Rescue on Fractalus! (Behind Jaggi Lines) 1984 by LucasFilm Games which blew my mind on Atari 6502.
Author here. Yes, it is integral. I chose this approach to first show how to draw it from back to front, because the code is easier to understand this way.
I think it's worth noting that you can tilt with this method, but not roll.
Great for a helicopter game, Less so for general flight sim.
That was a large part of how games were designed back in the day. Start with what you have the ability to do, find the game that matches what you can do.
Notice the demo video from Comanche also shows roll.
Edit: To support roll, the renderer essentially rendered the voxel terrain into a frame buffer and then applied camera transformations that gave the appearance of a fully rotating viewpoint. The terrain itself was not being raycast through a true 3D voxel volume.
Reverse painters algorithm is still painters algorithm. You trade off the cost of a full screen clear before the frame, in return for eliminating overdraw
that's what the y-buffer is that the article mentions in the front-to-back rendering section.
it tracks how tall each columns write is so you can use it to only write the diff between it and the voxel behind it, skipping writing anything at all if the voxel behind is shorter than the current height.
So once you're done rendering front-to-back, you've got a y-buffer of highest-writes you can slap your blue sky across from highest-to-screentop on each line, avoiding the need to clear by write the sky to the full screen before starting the render.
I remember figuring all this out as a self-taught teenager (pre-internet) with some books, a whole lot of time, and only a high-school level understanding of trigonometry. I built different versions - first in Pascal, then C, then Assembly.
Figuring out the algorithm was hard, but one of the optimizations I was most proud of was inventing (or so I thought) lookup tables to get around the slow floating point multiplication of my 16MHz 80286 CPU. I also remember "inventing" (ha!) the old bit shift + add technique.
There was something immensely satisfying about squeezing every last drop of performance out of a machine.
Nothing ever came of it. It was more or less a demo, but man did it make me feel like I accomplished something magical. I'd give anything to have a look at that source code today, but this post is the next best thing. So thanks for sharing. This made my day.
> I remember figuring all this out as a self-taught teenager (pre-internet) with some books, a whole lot of time […] but man did it make me feel like I accomplished something magical.
As a parent with kids in college, high school, and middle school, I lament (worry about?) how many obstacles youth now have reaching this dynamic. That thread of curiosity, discovery, struggle, and sense of accomplishment (or just learnings) is so profoundly formative. I’ve had mixed success creating space for it across my kids, but I sure miss the “pointless” threads I followed b/c of empty time when I was a kid.
I remember how groundbreaking Comanche was. Now I learned that it was a result of the programmer's experience in the medical industry (CT/MRI scanning): https://en.wikipedia.org/wiki/Voxel_Space
I vaguely remember there was something about the VGA architecture of the day that made this approach much slower, but I might be misremembering. My recollection of it is fuzzy. I'm hoping someone will chime in to remind me what I might be thinking of.
It might also just have been that this approach didn't work well with my lookup table optimization (see my other post).
I would love to see somebody code this up to run in the browser -- it's from 2003, so I bet it could now run really fast with lots of voxels. It will steal your face right off your head. Happy Halloween!
1,367 views Jul 31, 2009: A prototype user interface for browsing volume data. Presented at IEEE VIS 2003 by Michael J. McGuffin, Liviu Tancau, and Ravin Balakrishnan. For more information, see
This rendering approach reminds me of a project I saw a while back that explored what the world would look like from the perspective of a 1D or 2D being. Someone actually built a interactive demo based on that exact premise.
Technically this is not related to voxels ("volumetric pixels", so to say), which split the 3D space equally along all three axes. This is just a height map, a set of prisms, not entirely unlike a Doom map. Every prism has a regular fixed-size square base.
For 1992, this was mind-boggling though.
Still, it was called voxel rendering back then. Not technically correct, sure, but it sounded as cool as it looked!
Playing it on a decent PC in 2992 was mind blowing.
OMG - you need to write an article on what’s a decent PC nearly a millennium in the future!
I bet
This height map contains vertical elements though.
This is a vague statement. Are you suggesting each column can can have multiple layers of terrain, air, terrain? IIUC, the article disputes this:
> Such maps limit the terrain to “one height per position on the map” - Complex geometries such as buildings or trees are not possible to represent.
FWIW I'm working on a voxel sandcastle game. People usually seem particularly surprised by this style because they're so used to such games being rendered by height maps which don't allow tunnels or arches or overhangs.
No? Each pixel on a height map corresponds to a column of voxels of the specified height. You could represent the same height data with a fully general octree and it would look exactly the same.
It's kind of weird to call them "columns of voxels" when the columns can't have gaps and the "voxels" below the topmost are ignored completely. Which is to say, they're just columns...which is (definitionally) just a height map.
In fact, an octree for this approach would be _meaningfully worse_ because finding "the topmost voxel" in each column is O(logn)—or maybe worse?—versus O(1) for a height map. With no benefits, because you never look at any other voxels.
> It's kind of weird to call them "columns of voxels" when the columns can't have gaps
No, it's not weird. The columns don't have gaps because they are columns represented by a height map, which can't display arbitrary voxel geometry (unlike octrees), but that doesn't mean they can't display voxel geometry at all.
> Which is to say, they're just columns...which is (definitionally) just a height map.
Yes. A height map is representing voxel data without overhangs.
> In fact, an octree for this approach would be _meaningfully worse_
That's irrelevant. The fact remains that rendering the same height data using an octree would look exactly the same. If the latter displays voxel geometry, the former does too.
> A height map is representing voxel data without overhangs.
A height map can represent voxel data if the columns are integer heights, in the same way an integer can "represent" an infinite number of countable things. It's like saying the number 7 is "related" to a group of 7 ducks. The relationship is kind of meaningless.
But more importantly height maps can use also floating point heights in which case there's no reasonable mapping between the two. So your statement isn't generally true.
Your argument comes down to the meaning of "voxel", then. Voxels have volume, and they are represented with polygon faces. If you think that applies here, I guess more power to you.
Louis Castle developed a "voxel plus" software renderer for Westwood Studios' 1997 Blade Runner. It used "voxels" (with scare quotes) for character animation, not just terrain.
https://en.wikipedia.org/wiki/Blade_Runner_(1997_video_game)
https://news.ycombinator.com/item?id=17171287
madmoose on May 28, 2018 | parent | context | favorite | on: How Voxels Became ‘The Next Big Thing’
Blade Runner didn't actually use voxels, they used a rather unique technique that they called "slice animations".
The 3D models were sliced from bottom to top into a couple of hundred slices (depending on desired quality) by intersecting the model with a horizontal plane and storing the resulting polygons.
The engine can only rotate the models around the vertical axis.
I made a hacky javascript version of the renderer a long time ago:
http://thomas.fach-pedersen.net/bladerunner/mccoy_anim_13_fr...
EDIT: Let me also plug our WIP Blade Runner engine for ScummVM:
https://github.com/scummvm/scummvm/tree/master/engines/blade...
digi_owl on May 28, 2018 | prev [–]
https://en.wikipedia.org/wiki/Blade_Runner_%281997_video_gam...
Seems that the people that developed the game considers it voxel based.
madmoose on May 28, 2018 | parent | next [–]
The page you linked quotes Louis Castle:
> What we are using is not voxels, but sort of 'voxels plus.'
So "not voxels". Louis Castle probably called it voxel-like because he didn't want to get too technical in an interview. Their technique has not been described in detail in the press but see http://deadendthrills.com/future-imperfect-the-lost-art-of-w... [Dead URL -- I tried to rewrite it with archive.org but it's down for me and apparently everyone else now -- can anyone else get through? -Don] for an article that calls it a "slice model"-technique.
I'm not an expert on voxels but I've reverse engineered and reimplemented most of the Blade Runner rendering engine and in my opinion it doesn't count as voxels. For one, you're never going to be able to rotate the models around any axis other than the vertical.
LouisCastle on May 28, 2018 | root | parent | next [–]
Fun! Yeah, we stored our data as slices for space and restricted rotation to the Y axis. Both were optimization since each frame of an animation was a full model there was no need to rotate them. The renderer could render them from any angle though so I still consider them voxels. More like voxels lite then voxel plus. We also used a lot of sprite cards with zdepth and a quick normal hack for lighting. You had to cut corners where you could back then!!
madmoose on May 28, 2018 | root | parent | next [–]
Hello Louis!
I've certainly had a lot of fun figuring out how you did what you did, so thank you for that, no matter what you call it :)
You certainly crammed a lot of tech into one engine! Full screen 15 BPP videos with full z-buffer with smaller alpha-channeled videos rendered on top, character models with lighting. Even the UI is looping videos.
Once I get proper path finding working Blade Runner will be a lot more playable in our ScummVM engine.
I've probably rewatched the opening scene of the game a thousand times while working on it...
I only wished that you had used a scripting language for your game code instead of compiling it to DLLs. I know you optimized heavily for speed but it would have made our task a lot easier :)
DonHopkins on May 28, 2018 | root | parent | prev | next [–]
So that's why you didn't include the Deckard -vs- Pris scene where she rotates around the X-axis! ;)
https://youtu.be/e9t5ikxjAQ4?t=1m9s
pjtr on May 28, 2018 | root | parent | prev | next [–]
Fun indeed!
Can you talk about how the artists authored the original models? Was it an automated conversion from a standard polygon model or from a full voxel model? Or was it all drawn in this special slice format directly somehow?
madmoose on May 28, 2018 | root | parent | next [–]
Not Louis, but the article I linked above says they used 3D Studio Max and converted it to the slice model format.
C++ version of this game, using exactly the same original Comanche map and rendering algorithm: https://codeberg.org/Lew_Palm/voxelcopter
When this was first posted I made a game with a port of this approach to AGS Engine. Nowadays AGS is much faster since we have improved a lot of things, but this wasn’t the case at the time, so I had to make a few little tricks to make the rendering work well with the engine at the time.
https://github.com/ericoporto/i_rented_a_boat
I used this approach in one of my demos: https://www.youtube.com/watch?v=xjbDxvboOjo. Plot twist: the highmap is dynamically-generated.
Previous discussion (2017): https://news.ycombinator.com/item?id=15772065
Is this the same algo used for Magic Carpet (1994)? The style looks very familiar, and I always wondered how they pulled it off.
https://en.wikipedia.org/wiki/Magic_Carpet_(video_game)
The game originally used a "voxel" engine [1], but the final release switched to affine texture mapping (with a heightmap-based terrain, still).
The voxel-style engines tend to feature a longer draw distance (due to it being cheaper to render, as you can easily use various hacks to eg. halve texture accesses far away).
For a detailed look into the rendering of Magic Carpet, start from Slide 8 of [2].
[1]: https://tcrf.net/Prerelease:Magic_Carpet_(DOS)#1993 [2]: https://web.archive.org/web/20180330004301/http://www.glennc...
Brings back memories. Comanche was incredible when it came out, running on (IIRC) our family’s 386SX-16.
I tried to replicate the effect in Visual Basic, albeit with very limited success at the time.
It's interesting that the color maps seem to have shadows "built in", so that you get a 3D bevel effect from just looking at the color map.
Off topic: The very first assignment in this game is called “oil tank holiday”: fly the chopper to unguarded oil tanks, shoot and watch them burn, and then fly home. No enemies. Just learn to fly and shoot.
I apply this in testing code. After you write some code, try to think of the absolute minimal test to prove that your code does anything at all without crashing. These are my “oil tank holiday” tests. It is always humbling to see those fail.
What I'm hearing is that the smoke in smoke tests comes from the oil tanks!
Was this also how the flight sim that used to be hidden in EXEL.EXE had been built, I wonder.
Reading Voxel always takes me back, way back.. I played Comanche for hours and read up on Voxel tech in various magazines of the day; so clever and easy to implement. Nice demo and thanks for the trip down memory lane.
First thing that comes to my mind is the procedural generation in Rescue on Fractalus! (Behind Jaggi Lines) 1984 by LucasFilm Games which blew my mind on Atari 6502.
[Edit] ah ok they clarify later as a performance enhancement. I think it was pretty integral to the algorithm, but ok.
Wait why do they say painter's algorithm. Comanche and other such voxel terrain engines went front to back and never had overdraw.
Author here. Yes, it is integral. I chose this approach to first show how to draw it from back to front, because the code is easier to understand this way.
I think it's worth noting that you can tilt with this method, but not roll.
Great for a helicopter game, Less so for general flight sim.
That was a large part of how games were designed back in the day. Start with what you have the ability to do, find the game that matches what you can do.
Notice the demo video from Comanche also shows roll.
Edit: To support roll, the renderer essentially rendered the voxel terrain into a frame buffer and then applied camera transformations that gave the appearance of a fully rotating viewpoint. The terrain itself was not being raycast through a true 3D voxel volume.
Reverse painters algorithm is still painters algorithm. You trade off the cost of a full screen clear before the frame, in return for eliminating overdraw
You could avoid a full screen clear by using the y-buffer to draw in sky segments after rendering terrain.
You still need to have some sort of mask to tell you which pixels have not yet been written this frame
that's what the y-buffer is that the article mentions in the front-to-back rendering section.
it tracks how tall each columns write is so you can use it to only write the diff between it and the voxel behind it, skipping writing anything at all if the voxel behind is shorter than the current height.
So once you're done rendering front-to-back, you've got a y-buffer of highest-writes you can slap your blue sky across from highest-to-screentop on each line, avoiding the need to clear by write the sky to the full screen before starting the render.
yes, I guess you can get away with only clearing the y buffer, rather than the whole screen
Looking back even further, games like Koronis Rift did a lot with much less. Still, both are impressive and brilliant.
This sure brings back memories.
I remember figuring all this out as a self-taught teenager (pre-internet) with some books, a whole lot of time, and only a high-school level understanding of trigonometry. I built different versions - first in Pascal, then C, then Assembly.
Figuring out the algorithm was hard, but one of the optimizations I was most proud of was inventing (or so I thought) lookup tables to get around the slow floating point multiplication of my 16MHz 80286 CPU. I also remember "inventing" (ha!) the old bit shift + add technique.
There was something immensely satisfying about squeezing every last drop of performance out of a machine.
Nothing ever came of it. It was more or less a demo, but man did it make me feel like I accomplished something magical. I'd give anything to have a look at that source code today, but this post is the next best thing. So thanks for sharing. This made my day.
> I remember figuring all this out as a self-taught teenager (pre-internet) with some books, a whole lot of time […] but man did it make me feel like I accomplished something magical.
As a parent with kids in college, high school, and middle school, I lament (worry about?) how many obstacles youth now have reaching this dynamic. That thread of curiosity, discovery, struggle, and sense of accomplishment (or just learnings) is so profoundly formative. I’ve had mixed success creating space for it across my kids, but I sure miss the “pointless” threads I followed b/c of empty time when I was a kid.
I remember how groundbreaking Comanche was. Now I learned that it was a result of the programmer's experience in the medical industry (CT/MRI scanning): https://en.wikipedia.org/wiki/Voxel_Space
If you render columns instead of rows you can render near-to-far without a Y-buffer and with zero overdraw. :)
You just store the last highest Y value as you iterate near to far?
This is true.
I vaguely remember there was something about the VGA architecture of the day that made this approach much slower, but I might be misremembering. My recollection of it is fuzzy. I'm hoping someone will chime in to remind me what I might be thinking of.
It might also just have been that this approach didn't work well with my lookup table optimization (see my other post).
I imagine that far map squares are more than one pixel wide so that read is amortized. Not so if going vertically.
I would love to see somebody code this up to run in the browser -- it's from 2003, so I bet it could now run really fast with lots of voxels. It will steal your face right off your head. Happy Halloween!
https://www.youtube.com/watch?v=9SplEU05z64
Using Deformations for Browsing Volumetric Data
1,367 views Jul 31, 2009: A prototype user interface for browsing volume data. Presented at IEEE VIS 2003 by Michael J. McGuffin, Liviu Tancau, and Ravin Balakrishnan. For more information, see
https://profs.etsmtl.ca/mmcguffin/research/#mcguffin_vis2003
https://profs.etsmtl.ca/mmcguffin/research/volumetricBrowsin...
Obligatory link to mars.com: https://chaos.if.uj.edu.pl/~wojtek/MARS.COM/
hello
This rendering approach reminds me of a project I saw a while back that explored what the world would look like from the perspective of a 1D or 2D being. Someone actually built a interactive demo based on that exact premise.
edited, I found it: https://www.reddit.com/r/gamedev/comments/m19vl2/1d_game_pro...
I really love this kind of articles, so much to learn.