The idea for this came more or less before I even really knew how to program, barely even knowing how to type.
From what I remember, I came up with the idea when we learned about slope in algebra. I asked about flipping X and Y and doing run/rise instead of rise/run. They said that was calculus-level math, which confused me because of how simple it felt.
The idea stuck with me. Whenever I was bored in class, my go-to thought was to imagine a line going through a graph, passing through the gridlines until one of them was full. I even tried (and failed) to implement it in Pico-8 once!
I also pondered upon a 3D version of this idea, a light ray traversing through cubes. This idea coincided with me thinking about how my project at the time, Interactive Blockscape, could really benefit from a 3D environment, and how I didn't have many other good options to render it.
I worked on a little raycaster in a "raycast" folder in there. It was slow, but it worked, though I realised I couldn't figure out how to use WebGL2 properly and then went on a little sidequest to learn it.
About a year or two later, I then revisited the idea, now knowing a fair amount more of WebGL, though also burned on classes, I made the original version of this!
I really pushed my ability to create, doing some things that felt "wrong", but in the end I created something that I prior could only dream of, definitely one of the glowing pillars of my web portfolio. By this point I had my fill, however I did come back a few more times to add things like stereoscopy.
That leads to recently, where voxels fascinated me again. I wanted to do less if conditions so that the GPU could handle it better, and I came up with the idea of flipping the world so the ray travelled positively on each axis. This time was really exciting, because I liked the idea of how fast and clean it would be, although I also wanted to take this opportunity to do something else that interested me, volumetric fog!
The idea was simple; Because the ray was travelling through voxels, just make some of them semi-transparent, so it obscures what is behind it. Based on how much the ray travelled through the volume, it would get more obscured.
When implementing that, it looked as good as I imagined, and I knew that justified coming back to VoxEngine to use the new renderer.
And so now in the voxel function, you can set voxels to partial alpha values to change how visible they are.
Note: I was not the first person to come up with this idea, but I did come up with it independently. It is more commonly known as Voxel Ray Traversal and traces back to John Amanatides and Andrew Woo's paper from 1987.
Hope you enjoy -Kadin
kadincool.github.io