Voxels - how feasible?

edited 2013 Dec 17 in General
Hello guys

I have been playing Doom and its related games for the first time recently and I have enjoyed Doomsday Engine enormously, and if there is one feature I would love to see added it would be voxels. I have to say I can't stand the look of modern lighting and 3D models in Doom, but I think that the voxel project captures the aesthetic of the 2D sprites perfectly.

I took a look at the issue and from what I have gathered the engine would need to turn the voxel information into a mesh to display with OpenGL. I know that the Polymost renderer by Ken Silverman for Duke Nukem 3D is OpenGL accelerated and supports voxels (there is a voxel pack for Duke 3D as well), so it is possible to display voxels, the question is "how". From what I understand the voxel information needs to be used to build a 3D mesh that can then be used like any other 3D model mesh, and since Doomsday already supports 3D models the meshing itself is the tricky part.

I have found two articles on that topic:
http://0fps.wordpress.com/2012/06/30/me ... raft-game/
http://0fps.wordpress.com/2012/07/07/me ... ft-part-2/

The article discusses four algorithms. The first one is pure brute force, each voxel becomes a cube (six quads) and the second one uses occlusion to hide voxels on the inside, both algorithms are not very good.
The third one is no more than factor 8 times worse than the best possible mesh, it uses a greedy sweepline algorithm to find the smallest mesh in each dimension, reducing the one 3D problem to three 2D problems. The results are pretty good and it still uses quads. The fourth algorithm (second article) uses polygon triangulation, so there are no quads. If that's a good thing or a bad one I can't say. There is also a web demo to compare algorithms:

The next problem is the texture. The way it's solved in the article is to simply treat each colour as its own voxel model, but then the mesh will have more faces than it would if everything had the same colour. The voxels from the voxel pack make heavy use of dithering, just like the sprites did, so this would yield results similar to the brute force algorithm. A better idea would be to treat the voxel model as one shape and then use the result to somehow construct a texture that's then applied to the mesh.

What do you guys think?


  • I think there's a certain Minecraftian charm in voxel objects. It does seem to suit the low-resolution/low-detail Doom maps nicely: http://www.youtube.com/watch?v=4tQIf__O7ik

    However, at the moment I haven't got a clue what would be the best approach to the sprite-to-voxel conversion. I have a feeling that manual work would provide the best results.
  • I didn't mean converting sprites to voxels automatically, that's impossible anyway if you want the model to look good from all sides, I meant displaying already existing voxel packs, like this one:
  • Displaying them is already possible. Its simply a matter of converting them to MD2/DMD and then writing the necessary definitions as this person has done: https://www.google.co.uk/url?sa=t&rct=j ... 7247,d.ZGU

    Personally, if I were going to implement a dedicated voxel renderer then I would be doing so for things like dynamic geometry deformation and soft body simulations.
  • Cool, does this mean we (I?) should ask the creators of the voxel pack if they can convert the voxels to 3D meshes? Though personally I think doing the conversion on the fly by the engine would be more flexible, otherwise each time the voxel pack is updated someone has to convert it all over again. Of course only if the conversion algorithm is fast enough, that's why I wanted to hear the opinion of the developers.

    EDIT: just to clarify, I was only talking about voxels for replacing the static objects like pickups and stuff like pillars or switches, not dynamic geometry or deformable terrain. Basically like this:
  • Converting a typical voxel model to an MD2 model takes mere seconds. It is not something I would worry about personally. Also, it makes far more sense to do the conversion once and distribute the result rather than require everyone to convert every single time they want to use those models.
  • edited 2022 Oct 4
    sorry for bringing this very very old thread back to live.... but it looks like there is a new DOOM project regarding voxels

    Voxel Doom 1.0

    Youtube Channel

    Compared to the older ones the author is also creating replacements for the monsters, gibs, corpses etc. The voxel dor DOOM are done and he is currently working on the DOOM II stuff.

    I'm wondering if the current or future doomsday renderer could / would make use of this mod....

  • I pretend to work on that if there isn't anyone already doing it, I will probably convert the voxels to MD2 since there's no reason to use the kvx format if not on software renderer on low resolutions, both things that DE doesn't support.
Sign In or Register to comment.