Today’s videogames
Videogames use polygons as the basis for most 3D modeling today, with the most simple one being the triangle. They create the illusion of curves, but in reality, they are composed of triangles. This is because, for a computer, it is easier to optimize triangles than real curves; it’s simple and more efficient.
Videogames have evolved very quickly. We can compare the first videogame ever created in 1958, called Tennis for Two by William Higinbotham, to current games like Baldur’s Gate III or Horizon Zero Dawn. Videogames are illusions; they attempt to simulate our world or a different one in a virtual format. Taking into account the things we know, they provide a gateway to escape this reality for some time, allowing you to experience another life or the one you desire. However, most of them are made for entertainment.
And in this case, we can clearly see the evolution of the 3D modeling using polygons in the Lara Croft’s series.
It’s also important to consider that videogames can change a mindset or teach valuable lessons. Some of them are even able to help the mental health of some people. What I would like to emphasize is the influence on the real world. For example, when the Notre-Dame Cathedral burned in 2017, the videogame Assassin’s Creed helped with the reconstruction due to the highly detailed model they used in the game.
What is a voxel?
A voxel is also known as a 3D pixel. In fact, the word voxel is derived from ‘volume’ and ‘pixel.’ But what is a pixel, then? In a 2D plane, they are the ones we can see every day through our computer, cellphone, or TV. If you zoom in enough, you will be able to see tiny squares of different colors positioned on an invisible 2D grid.
The easiest way to understand is that pixels exist in a 2D grid (X, Y), and Voxels exist in a 3D grid (X, Y, Z). But keep in mind that each voxel has its own color and grid, just like pixels. We can think of voxels as subatomic particles that imitate our reality. The voxel can act like matter but in a virtual way (volumetric).
Conversely, a pixel is the smallest unit of a 2D image. To go from pixel to voxel, you’d essentially be adding a dimension, turning the 2D information into a 3D representation. Think of it as moving from a flat image to a stacked set of images to create a 3D effect or vice versa. It’s all about the dimensionality.
Why polygons and no voxels?
As we mentioned before, the more voxels we use, the more realistic it will look. Since each voxel is individual, we can create physics and a dynamic environment. However, the more voxels there are, the less efficient it becomes, causing a computer crash. It’s not able to render that amount of data, leading to lower quality when using voxels nowadays (the optimization is not the issue, but instead the rendering).
This is mostly because the game industry has invested more funds and research in the polygon way to create models for video games. Believe it or not, polygon models are illusions most of the time. For instance, imagine a beautiful wall with carvings; they usually use something called textures. With the help of lighting, they don’t have to create the carvings themselves in the volume. The newest technology in the lighting part is a program called ‘Lumen’ for Unreal Engine 5.
Why change years of work on polygons now?
Most developers interested in voxels don’t want to scrap everything and start from the beginning. They want to help develop voxels so they can create the perfect combinations of voxels and polygons in a video game. They see the future of gaming as more dynamic, more realistic, more immersive, etc. This way, we can imitate the way the real-world acts—with deformations, physics, interaction, etc.
Development in the voxel camp
Euclideon Unlimited Detail 3D Engine: This project has been in development for some time, and it is now being called a scam. However, I would like to look at what they were offering and the idea they had. The project was based on a scan of the real world, using a lot of voxels to compose an object, building, or world material. Like a tree created with millions of atoms or voxels. The idea was more based on the creation of an engine that can support the density of rendering every single voxel.
The company only released some images and a YouTube video of the program working. But, as we can see in the video, they lack general lighting, volumetric effects, and shadows. Not taking into consideration the environment interaction. The Euclideon technologies that are mostly used for the voxel scan are Euclideon Geoverse and the Solidscan software.
Automontage Voxel Project: This project is the most promising one and has kept receiving updates, being very open and honest about their work. The team at Automontage is creating an engine that uses microvoxels to unlock a universe of use-cases not possible with the current 3D simulation and rendering processes.
Automontage can be used in different fields, with video game development being one of them. It also offers a scan that can help with the way we can virtually recreate architectural projects.
- Scan Professional
- Bioimagining Expert
- Sculptural Artist
- Game Developer
John Lin’s Voxel Engine: A lot of voxel developers base their algorithms on their rendering capabilities. If you can rasterize (dual contouring), ray-cast (Voxlap), splat/frustum trace (Euclideon), sphere march (SDFs/isosurfaces), ray trace (sparse voxel octrees), or somehow get billions of voxels from memory to pixels on your screen, then the most important part is done, right? Let’s briefly consider what additional capabilities a voxel engine should provide to create a game:
- Lighting
- State serialization and synchronization across a network
- Physics/collision detection
- AI features
- Dynamic objects
These are all systems that operate on the existing data. This doesn’t even include the building and modification of the game world. To create anything resembling reality, the world usually also needs:
- Terrain with interesting features
- Trees
- Vegetation
- Water
- Artificial structures
Perhaps most importantly, people tend to expect or look forward to voxel engines with the following features:
- Creating anything
- Destroying everything
- Procedural generation
- Physical interactions on a per-voxel level
- Alternate simulations (anything else that interacts with voxel data, e.g. vegetation growth, door responses, “logic” like Minecraft’s redstone and pistons, and so on)
- Voxel characters
And these are just core features. While not strictly engine-related, there’s still gameplay to integrate that provides the user with a fulfilling way to experience what the engine can do. There’s also art direction, sound design, atmosphere and tone, and other architectural details like system compatibility, performance, codebase management, scalability, the developer experience, mod support, and more. It’s important to think about these things because the engine needs to be sufficiently designed to achieve these goals.
It’s All About the Data
While writing an awesome voxel renderer is certainly no easy feat, we can see that it’s only a small part in the grand scheme of systems that need to work together. We need to choose a voxel format that can be rendered efficiently, but how can we make sure it works for everything else as well? Sparse voxel octrees might be able to hold a couple billion voxels worth of data that we can cast primary and shadow rays against, but how well do they work for collision detection? Global illumination? Pathfinding? Adding new per-voxel attributes besides just albedo and normal? Dynamic objects? It’s important to answer these questions ahead of time because most of the systems we build need to incorporate the format into their designs. As it turns out for sparse voxel octrees, storage and rendering are the only things they are acceptable (not even great) at. Moreover, if systems are built on top of the general volume design and that design changes, then a lot of time is going to end up spent updating the entire codebase to work with it.
Some Technical Explanation
A sparse voxel octree (SVO) is a 3D computer graphics rendering technique using a raycasting or sometimes a ray tracing approach into an octree data representation. The technique generally relies on generating and processing the hull of points (sparse voxels) which are visible, or may be visible, given the resolution and size of the screen. There are two main advantages to the technique. The first is that only pixels that will be displayed are computed, with the screen resolution limiting the level of detail required; this limits computational cost during rendering. The second is that interior voxels (those fully enclosed by other voxels) need not be included in the 3D data set; this limits the amount of 3D voxel data (and thus storage space) required for realistic, high-resolution digital models and/or environments.
An octree is a tree data structure in which each internal node has exactly eight children. Octrees are most often used to partition a three-dimensional space by recursively subdividing it into eight octants. Octrees are often used in 3D graphics and 3D game engines.
Final thoughts
Building a voxel engine is a complex task that goes far beyond just rendering. It’s about creating a comprehensive system that can handle a variety of functionalities seamlessly. Choosing the right voxel format is indeed crucial because it becomes the backbone for various game systems. Sparse voxel octrees might be great for storage and rendering, but their limitations in other aspects, like collision detection and global illumination, mean that a careful consideration of trade-offs is necessary. It’s like crafting a delicate balance between efficiency and versatility, and in aspects like gameplay integration, art direction, and system compatibility. A voxel engine is not just a technical tool; it’s the foundation for a player’s experience. Things like procedural generation, physical interactions, and alternate simulations add layers of complexity that contribute to the richness of the game world. Thinking about these aspects early on is crucial because it sets the direction for the entire development process. Flexibility and scalability become paramount, especially when you’re dealing with a dynamic environment where players can create and destroy. It’s a symphony of data management, system integration, and creative vision that comes together to deliver a compelling gaming experience. So, in essence, it’s not just about rendering voxels; it’s about orchestrating a harmonious blend of technology and creativity to bring a virtual world to life.
Research Links
- https://www.megavoxels.com/learn/what-is-a-voxel/
- https://www.aps.org/publications/apsnews/200810/physicshistory.cfm#:~:text=In%20October%201958%2C%20Physicist%20William,Brookhaven%20National%20La
- https://www.gameinformer.com/b/features/archive/2011/11/22/exploring-unlimited-detail.aspx?PostPageIndex=1boratory%20open%20house.
- https://www.euclideon.com/
- https://www.cinemablend.com/games/Euclideon-Unlimited-Engine-Destroys-Unreal-CryEngine-With-Voxel-Atoms-37291.html
- https://hothardware.com/news/game-engine-company-teases-unlimited-detail-voxel-engine–but-can-it-deliver-
- https://www.youtube.com/watch?v=Kb_HFqvVXoA
- https://www.youtube.com/watch?v=gM6QkPsA2ds
- https://www.atomontage.com/
- https://www.youtube.com/watch?v=J62z_7JaYMw
- https://www.youtube.com/watch?v=nr5JqYYye3w
- https://www.youtube.com/watch?v=8ptH79R53c0
- https://www.youtube.com/watch?v=1R5WFZk86kE
- https://voxely.net/blog/the-perfect-voxel-engine/