The Evolution of Voxels in Video Games

How do you represent objects and terrain in a 3D video game?  A partial list includes triangle-meshes (very common), geometric primitives (ROBLOX), and height maps (terrain).  Today I’m going to talk about another way of modeling objects and terrain – the voxel.

Voxels store information in a 3D grid.  In the simplest case, all of the 3D space in your video game is divided into a grid, and each cell in the grid is either empty (air) or full (ground).  To make the world look more realistic, each cell can be a different color or material.  Just like with your mega-pixel camera or HDTV – the more voxels, the more realistic the game world.

A naive voxel implementation requires enormous computing, rendering and storage.  A game world implemented as a voxel grid one million cells per side would contain 1,000,000,000,000,000,000 cells and require more storage than all of the world’s computers.  The good news is that in most voxel implementations many of the cells are identical to their neighbors, which leads to incredible compression.

Some notable voxel projects:

1986-1991 – Voxel Man is a medical surgery simulator that uses voxels to render and simulate a 3D human body.  Voxel Man can be used to simulate surgical procedures.  This video does a good job of showing how voxels can represent solid 3D data composed of different materials (bones and muscle in this case).

.

2000 – Voxlap Engine is a game engine/world created and rendered with voxels.  Ken Silverman wrote the Build Engine used in the game Duke-Nukem 3D.  In 1999 Ken started work on a voxel-driven engine called Voxlap.  What’s cool about the Voxlap engine is that the entire world is made up of reasonably small voxels.  In addition there’s a cool “destruction” effect that simulates some rigid body motion when you blow things up.

2007, 2008 – John Carmack, creator of the Doom Engine shows a tech demo of voxel-based game technology which is very cool, and later talks about it in an interview.

2009 – Inifiniminer was developed by Zachtronics Industries, and is credited as the inspiration behind Minecraft.  The game was originally developed using .NET technology and was soon hacked.  Here is a cool video of early voxel building in Infiniminer.

2009 – 2010 – Minecraft is one of the most popular indie games of the past decade, and shows cool innovation by using the the voxel grid to help create realistic physical and lighting effects. 

2011 – ROBLOX introduced an integrated Voxel/Physics system at the ROBLOX Rally and has continued to refine the system. 

Some innovations include:

  • Physics integration between voxels and moving parts.  Moving parts can collide with voxels, and parts can be joined to voxels.
  • Full Lua API’s to access both the moving part and voxel system.  For many operations, such as a hit test, the creator of a script does not need to bother doing two separate hit tests, one against moving parts and one against voxel terrain.  In a follow-up blog post we will look into some of the proceduraly generated worlds that users are creating with complex Lua scripts.
  • Integrated wedge shapes and terrain smoothing.  ROBLOX terrain voxels can be either box or wedge shaped.  This allows for autosmoothing functions on the ROBLOX terrain using a combination of block and wedge shaped voxels.
  • Integrated 1st and 3rd person creation using the same tools for voxels and parts.  Simple objects in the ROBLOX world such as grass can be sketched with the same tools used to insert complex part-based models such as mechanical doors.
  • Programmable studio tools for editing, painting and manipulating voxels.  All of the voxel tools in ROBLOX Studio are written in Lua against the ROBLOX API and can be inspected and modified.

The future of voxels is promising because voxels lend themselves to simple parallel computation for a wide range of terrain and environmental functions.  For example, aerospace engineers have used grid-based FEA simulation for quite some time to calculate moving airflow and simulate the peformance of aircraft.

Wind simulation in games will be common in the future and will be done using coarse voxel grids.  Simple thermal models will make it possible to generate functioning tornadoes inside games – all based on first principals.  Set up the initial conditions of your air voxels correctly (air density, temperature, velocity, pressure and moisture content), press go, and you should get a nice twister!

If you really want to get ‘deep’ into voxels, check out Stephen Wolfram’s book A New Kind of Science where Stephen postulates that maybe the entire universe is running on a grid as a cellular automata!

63 thoughts on “The Evolution of Voxels in Video Games

  1. A brief history on lighting in video games next?

    It’s good to see how long voxels have been around, I’ve always thought of them as a recently developed thing, though the use of them has expanded in the past couple of years, I see this as a result of better hardware.

    Soon we’ll be able to have incredibly detailed 3D enviorenments with “atom” based physics I do believe.

  2. Dude, LUA can do all of that already. For making Wind, you would have to put a BodyVelocity inside each leaf, then have a script to automatically move the leaves around, depending on the virtual wind speed.

    There is already a realistic day/night cycle, why add-on to it? Changing the Sky would basically need a complete re-programming of ROBLOX. The Sky is the main core element of the program.

  3. Well we see all the positive aspects and the Voxel roblox physics, BUT Most of these games shown have Dynamic lighting, I would love roblox to adopt dynamic lighting in there physics, If you continue to refine the physics engine why not add dynamic lighting. I think adding this would make roblox a better place for rpg’s and war games, Hard core games on roblox could finally be more dramatic and realistic, Eg. In a cave in roblox it is the same brightness as the shadows outside, We could make it so that in a cave it is darker the more you go inside, and the light fade.

  4. David, I love you for doing all this. You are awesome. Question: Does Terrain show up as Parts in Workspace? Will my Minimap script detect them and recreate them?

    • Unfortunately, no, the terrain appears as a Terrain element in the workspace and are not separate bricks, but a sort of ‘destructible’ mesh.

  5. Hey, I see I’m not the only Id groupie then. :P
    I think it’s a good idea, but don’t stray too far from the ROBLOX we know and love, we’re not an Infiniminer clone. We’re also not Id, we can’t make amazing game engines. ;)

    • Yeah,we don’t need humanoids that look (too) Realistic,I like the block figures,but go Roblox!!!

  6. Wow!I hope we could get more I didn’t know any thing here except Minecraft and Roblox.Go science!Woo Hoo!

  7. I seriously agree, it would make many things more realistic… Even though Dynamic Lighting can be created, just like the recent fog effect which is literally set to: on, off, darkness, color and all that… I think Dynamic Lighting would be great as a simple on, off, color change, distance effect and all that simple amazingness! GO ROBLOX!

  8. Well, ROBLOX improved a LOT since I started playing, however, the update I REALLY WANT to see is a DYNAMIC LIGHTING.
    That will be a great upgrade to ROBLOX.
    And yes, being a Minecraft fan, I don’t mind retro graphics or blocky structure, as long as you got that dynamic lighting, I’m fine with it.

  9. Sounds very technical, and I personally don’t understand much of it. But, I can’t wait to see how it improves roblox.

  10. You can’t really compare Minecraft and ROBLOX. While they both revolve around building, they’re two different games. ROBLOX is a MMO, while Minecraft is a first-person platformer, kind of. However, ROBLOX feels like becoming more like Minecraft ;)

  11. I’ve developed some games using voxels before. They were pretty simple, but could be improved. I just cant find the time.

  12. It seems that ROBLOX is getting up to speed with the technology out there, but what can make it better? Being an incredible fan of Minecraft, it seems that with dynamic lighting, ROBLOX would look infinitely better. Of course, we can mimic this effect with the new Fog Feature, but it seems MUCH more useful if we could create something that each individual player can see at a different standpoint. For example, right now, ROBLOX is like Classic Minecraft, it’s always day, and shadow/lighting don’t look very good. With dynamic lighting and the ability to place a number of lighting points around maps, we can implement a more “realistic” feel (it’s not too realistic when you’re blowing each other up with rockets and having your opponent’s arm hit your character’s head, but you understand very well what I mean, no?). I have to say, out of all of ROBLOX’s updates, dynamic lighting is something I’m looking forward to.

    -Virtualdarks

    • @Virtualdarks –
      Oh yes, that would be an amazing update.
      If any other ROBLOXias have notcied, but there is alot of complaint that ROBLOX is becoming to much as Minecraft. I believe the Dramatic Lighting would be an amazing update. Another update many will agree with is moving the, “Menu.” Most dislike the menu, so this could also be fixed.

      -Skinnypillow

  13. @CupCakesCanKill0mg They said that they would never be finished with Roblox™ because users are always coming up with new ideas and Roblox is always in Beta with all the new features.

  14. I think that the 3 most notable ones are Inifiniminer, Minecraft, and ROBLOX.

    I tried Inifiniminer after I found out it was Minecraft’s inspriation. Minecraft was – and still is, my favorite game aside from ROBLOX. However, ROBLOX has more physics integrated. For example, if a creeper or a block of TNT were to explode, there would just be a hole in the ground. With ROBLOX, if something explodes (and you script it to make bricks fly everywhere), the blocks actually look as if they’re flying and getting destroyed. I still think that these three notable games are great examples of voxels.

  15. It’s nice to see that ROBLOX has established that their terrain generation is different to Minecraft. They’re two completely different games, and to argue about copying from either is silly. Still, I enjoyed this article, good work dave!

  16. Yay we can comment again, anyway, Research to back up what you know? Smart Cookies Builderman :3

  17. The Voxels to me, is a very complex complementary Grid of the Universe 1.5.5×2.3.7 , in a Momental Pattern which turns with stars and planets. And keeps them in-place. I Deeply enjoy ROBLOX because of the graphics and freedom of which Users may Intercourse with creativity.

  18. Yeah i loved the terrain thing its great but wish you could change the material like change it into rock,ice etc…

  19. Hi, so does this mean Roblox is going to have weather, and unlimited terrain? :D can’t wait! keep up the great work.