Live data from Hacker News

Voxel Space (2017)

s-macke.github.io

51–60 of 74 posts

Re: Voxel Space (2017)

#51
post #44
post #9

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.

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!

Re: Voxel Space (2017)

#52
post #42

Earlier quoted context omitted.

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…

> 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…

> 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.

Re: Voxel Space (2017)

#54
post #19

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 t…

The 286 didnt have an integrated floating point unit so you would have been using a software floating point library that came with your compiler. That would have been very slow indeed!

Re: Voxel Space (2017)

#55
post #4

If you render columns instead of rows you can render near-to-far without a Y-buffer and with zero overdraw. :)

It does render columns though. Maybe we are talking about different things but the algorithm is essentially: for x = 0 to 319 draw_vertical_line(x, height). The detail there though is whether you cast a ray for each column or do what this does and go from far plane to near plane drawing the columns.

Re: Voxel Space (2017)

#56
post #22
post #4

If you render columns instead of rows you can render near-to-far without a Y-buffer and with zero overdraw. :)

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).

You might be thinking of unchained VGA modes but in unchained modes you want to draw columns because that means you only have to switch which memory plane is active four times instead of every four pixels, ie select plane 0, draw column 0, 4, 8, etc then select plane 1 and draw columns 1, 5, 9, etc etc

Re: Voxel Space (2017)

#57
post #22

Earlier quoted context omitted.

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).

You might be thinking of unchained VGA modes but in unchained modes you want to draw columns because that means you only have to switch which memory plane is active four times instead of every four pixels, ie select plane 0, draw column 0, 4, 8, etc then select plane 1 and draw columns 1, 5, 9, etc etc

This is what I was thinking of, thanks.

Re: Voxel Space (2017)

#58
post #22

Earlier quoted context omitted.

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.

This was part of it as well. At least - as I recall - with the early flat (MarioCart 1 inspired) versions I made. But in that case, the closer "terrain" pixels always became multiple on-screen pixels so my lookup table for each of the 360 degree viewpoints contained only a single byte to add to each x and y coordinate, plus a single byte for each length.

Had to keep the memory use down and multiplication was really computationally expensive.

Re: Voxel Space (2017)

#59
post #9

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.

Technically you could say that it is volumetric pixels though, no? The height map and prisms are an _implementation detail_. What is being rendered is pixels with volume.
Post reply on HN