How do pixels differ from voxels

There are two main ways to represent computer graphics: vector and raster.

Vector graphics describe an image using mathematical formulas, usually with things like straight lines, curves, and various geometric shapes.

Raster graphics represent an image as an array of colored dots arranged one after the other on a grid.

The second difference is the way computer graphics are represented in two-dimensional and three-dimensional space.

Vector graphics

In 2D vector graphics, each point on a line or figure is described by a vector with two components (x and y). In general, that is why two-dimensional graphics are called so.This is how 2D vector graphics build an image using 2D vectors.

It is built exclusively from two-dimensional polygons (triangles in this case). The image is called low-poly because of the relatively small number of constituent elements. That is why the triangles are easily visible.

Let’s add another dimension. In 3D vector graphics, everything works the same, but one more component is added – z. Three components – three dimensions.

But there is one trick to show 3D geometry in 2D. Just change the viewing angle or rotate the object.

Raster graphics

A bitmap two-dimensional image is represented by an array with a certain number of columns and rows.

Each cell in such an array is called a pixel (from the words picture element – pixel). In addition to its coordinates in the array, a pixel is defined by a color.

We have already learned that a low-poly vector image is made up of visible polygons. If we do the same with raster graphics and visible pixels, we get pixel art.

On a 2D pixel grid, you can draw 3D objects like the Lotus Esprit car or the X-Wing from Star Wars, but they are not 3D to render. They cannot be twisted and viewed from different angles, like a racing track or a car. In the same way, we cannot rotate the Uluru drawing – the image consists of polygons, but they are located not in three-dimensional space, but in two-dimensional.

So we’ve talked about 2D and 3D vector graphics and 2D bitmap graphics. The only thing missing is 3D bitmap graphics.

In 3D bitmap graphics, all space is divided into columns and lines in all three directions (height, width, and depth). As a result, three-dimensional space becomes a set of multi-colored voxel cubes (volume element – voxel, volume element). Each voxel is defined by a color and location.

That is, in a voxel image, the animation changes the color (or location) of certain small cubes, and in a pixel image, the color of pixel squares changes.

Vector displays and projection

The diagram above does not show the full picture. A two-dimensional vector image can be displayed immediately, without transformations. But it’s not that simple.

A 2D vector image can only be displayed directly on a vector monitor. They were, for example, used on some Atari arcade machines. Similarly, a 3D vector image is sometimes displayed.

First, a three-dimensional image must be displayed on a plane. This results in a two-dimensional vector image that can be displayed on a vector monitor.

Screening

You can hardly find a vector monitor outside of a museum these days. People use monitors that render… pixels!

Modern LCDs paint each individual pixel a specific color by turning on or off the small red, green, and blue liquid crystals per pixel. If anything, a similar mechanism worked in old CRT monitors: for each pixel, three multi-colored tubes ignited under the influence of a beam of electrons.

So, what do we do if we need to display a vector image on a bitmap monitor? For this, the technique of rasterization is used. Each polygon (most often a triangle) is mapped to an array of pixels.

Three-dimensional graphics are drawn on a flat monitor as follows: first, three-dimensional triangles are displayed on a plane and become two-dimensional polygons, and then the polygons are rasterized and become a set of pixels.

Triangulation

But what about voxels? Today they are most often represented as 3D vector cubes. We create a 3D model with triangles on each side of the voxel cube.

Just like last time, the 3D triangles are then mapped onto flat space and then rasterized into a 2D image.

Today, almost all voxel art is created in this way, most often with the help of the free program MagicaVoxel.

Results

Now pixel art is pretty boring. Players brand all pixel games as cheap indies, and not all developers work with pixels equally well.

From the only possible technical solution, pixel art has turned into a fashionable technique for independent studios, and now it has become an annoying routine.

Nevertheless, innovative techniques, such as those used in the already mentioned The Last Night and Replaced, give hope for a bright future for pixel art, which, in our opinion, is disliked completely undeservedly.