
Simple voxel explanation - Mongark
Hi everione! Can someone explain to me how in the h<i></i> works a voxel engine?? I&#x27;m a razonable programmer, but if you could explain in details wold be great. Thank you!
======
angersock
So, instead of dealing with flat triangles with get rasterized to picture
elements (pixels), a voxel engine deals with volume elements (voxels).

The crudest form of this would be something like Minecraft, where the world is
literally made out of cubes. More advanced work would be something like what
Ken Silverman did back during the Build engine days, a modern example of which
can be seen here:
[http://advsys.net/ken/voxlap/pnd3d.htm](http://advsys.net/ken/voxlap/pnd3d.htm)
.

The current state of the art appears to be something like voxel quest (
[http://www.voxelquest.com/](http://www.voxelquest.com/) ) or Atomontage
Engine ( [http://www.atomontage.com/](http://www.atomontage.com/) ).

~

If you want to learn a bit about voxel engines, Flipcode had a decent series
on landscape engines:
[http://www.flipcode.com/archives/Realtime_Voxel_Landscape_En...](http://www.flipcode.com/archives/Realtime_Voxel_Landscape_Engines-
Part_1_Introduction.shtml) .

Basically, the main problem is raycasting into a scene. To learn more about
that, I'd look into octrees as a start (
[https://en.wikipedia.org/wiki/Octree](https://en.wikipedia.org/wiki/Octree)
).

------
munificent
Voxels are the 3d equivalent of pixels: little cubes in space. A voxel engine
renders a lot of cubes quickly. When everything you are rendering is an
aligned cube of the same size, there are a lot of easy options you can apply,
like not rendering faces of cubes that are next to each other.

That's the basic gist. Everything beyond that is optimization.

~~~
derrasterpunkt
"A Pixel Is Not A Little Square, A Pixel Is Not A Little Square, A Pixel Is
Not A Little Square! (And a Voxel is Not a Little Cube)"

From: Technical Memo 6 Alvy Ray Smith, July 17, 1995

Link:
[http://alvyray.com/Memos/CG/Microsoft/6_pixel.pdf](http://alvyray.com/Memos/CG/Microsoft/6_pixel.pdf)

~~~
munificent
Voxels, in most voxel engines, _are_ cubes and not points in 3-space.
Likewise, in most modern retro-styled pixel art games, the intent really is
for the pixels—from the game engine's perspective, not the display's—to be
squares. Often a game's pixel is rendered using a square grid of multiple
display pixels per engine pixel.

------
forgotmypassw
You might want to take a look at Craft[0] which is a simple clone of Minecraft
implemented in C, that should get you the basic idea of a voxel engine since
the codebase is quite minimal for the available features.

[0] [https://github.com/fogleman/Craft](https://github.com/fogleman/Craft)

------
Mongark
Very thank you to all of yours!

