During the 1990s, the video game
industry had two competing methods for visualizing and building the virtual
world of a game: voxels and polygons. Both had their upsides and downsides, but
at the end of the day, polygons won out and now nearly every single modern game
uses polygons to represent characters, objects, and the environment. But what
are polygons and voxels, why did polygons win, and are voxels coming back into
use?
 |
Voxels on the left, Polygons on the right. |
In order to define a voxel, we need
to also define what a pixel is. A pixel is short for Picture Element, and they
are used to represent a single point in an image. A computer monitor is divided
into tens of thousands of pixels, arranged in columns and rows. There are very
many pixels in any given monitor; you would be quite hard pressed to find a
specific pixel. In monitors, each pixel generally stores some kind of color
value, generally of the RGB type. A voxel is then short for Volume Pixel, which
is essentially a 3D pixel. Voxels are generally represented by a cube, and each
cube is one small part of a whole 3D image. Voxels together are used to
simulate volume and give an image a quantifiable depth. Polygons, however, are
quite different. First you start with at least three lines which connect a
series of coordinates together. Each coordinate would have, depending on the
type of game, an x, y, and z portion, which determine the shape of the polygon.
You can then apply polygons to a wire frame skeleton of the object you with to
model, then apply phong shading or a texture map to the shape to get a final
object that a play can interact with.
So now that we all have a basic
idea of what each type is, why did polygons beat voxels when it came down to
designing a game world? The answer can be narrowed down to two reasons: memory
and visual fidelity. When it comes to memory, polygons beat voxels with almost
no effort. Since polygons are usually wrapped around a wire frame model, each
object that uses polygons is completely hollow. We do not need to know what is
inside the object, so the game generally does not bother putting anything in
there, which saves memory. Voxels, on the other hand, are present throughout an
object. Each of the voxels, from the ones representing the skin of the object
to ones in the middle of it is held in memory. Each when an object is
manipulated, each individual voxel needs to have its position updated, which
take a lot of processing power to do just for a single object. Just imagine a
game where a hundred voxel based boxes get thrown around by an explosion, each
and every voxel will have to be updated constantly. The issue of visual
fidelity also ties somewhat into the memory issue. When creating a person,
polygons, through a number of texture maps, shading techniques, and
anti-aliasing, can create a surprisingly realistic model with very low
overhead. But in order to match that with voxels, we will have to create many
extremely tiny voxels to simulate the non- uniform surface of a person's body,
which is difficult to maintain due to memory and processor constraints. As time
went by, we began to see a phasing out of voxels as a medium to display video
game worlds.
 |
This is just one of the many creations made by user the players of Minecraft: CVN 65, The USS Enterprise. |
While this may sound like a bleak
outlook for voxels, they are still being used in a number of ways. In medical
fields, voxels are being used to render 3D models that are created during MRI
scans. Doctors use these static models to essentially examine the body from the
inside-out. We are also seeing a bit of a resurgence of voxels in the video
game industry. One of the most well-known sandbox games on the market,
Minecraft, uses voxels to represent terrain. Voxels are being used to represent
meter-sized cubes of dirt, wood, rock, etc. that players can pick up and place,
creating vast sculptures. The game even gets around the memory issue by only
storing the values of voxels near the player character in memory, and loading
and unloading more voxels as the player character moves around the environment.
So while the voxels are nowhere near as prevalent as polygons, they have still
found their own niche in the realm of computer graphics.