Tech Analysis: No Man's Sky
Full dissection of Hello Games' use of voxels, procedural generation and more.
Five years in the making by indie developer Hello Games, No Man's Sky is a game of incredible scale from a relatively small team. Built on an in-house engine, the final product weighs in at a meagre 5GB on your hard drive - a tiny amount compared to any typical AAA release. This is far from ordinary, and with the game relying heavily on procedural generation, very little of the game's visual make-up uses pre-made textures or assets. Instead, the star of the show is the set of algorithms at its core - lines of code capable of generating terrain, plants and even unique wildlife on-the-fly.
Each detail is unique to countless millions of planets across a virtual galaxy. No Man's Sky achieves this not through an inflated budget or a large pool of staff, but through a smart use of technology. Visually, we're talking about a largely overlooked approach to graphics rendering that makes this level of variety possible. For No Man's Sky, we're talking about voxels.
Rather than concentrating solely on the polygons seen in 99 per cent of games made today, No Man's Sky's core utilisation of voxels makes this procedural generation - and also destruction - much easier. However, it also comes with several other pros and cons. Fundamentally, the difference between a polygon and a voxel is simple: a polygon is made up of three points or more in a 3D space, where each of these points is called a vertex. A triangle is made of three vertexes for example, and of course a square would be four. But in No Man's Sky's case, a voxel is a single point in 3D space, given a value for size, colour or opacity, much like a giant pixel.
One advantage to this approach is it's traditionally lighter on graphics hardware, and prior iterations of the technology have even shifted the emphasis to CPU. Older voxel-based titles such as the original Outcast took this path, though Housemarque's PS4 launch title Resogun saw a full GPU implementation in play, better suited to the console's hardware balance. Voxels also have the advantage of using less data, being a single point in space, rather than three, and can be given volume in a 3D space at little extra cost.
On the other hand, polygons have proven a better fit overall for rendering in modern games, simply because they give developers more options to animate. Being built from more complex meshes for characters and terrain made up of thousands, or millions of triangles, there's a flexibility that's hard to replicate with voxels. The one main downside here is calculating all these vertexes depends on a strong graphics card - and of course, the more polygons, the more powerful the GPU you'll need.
Voxels are an essential building block in generating No Man's Sky's huge planets. Their simplicity makes it all the easier for the engine to procedurally generate miles of terrain, and crucially lets you manipulate it as you please. It's the same technology we've seen in Minecraft in fact, though in a much more advanced form. On top of this, we suspect that Hello Games renders additional elements using standard polygons; space stations and the ship stand out as two obvious candidates here.
As remarkable as the end results are in No Man's Sky, voxels are hardly new technology - so why doesn't every game use them? After all, we've seen it in several PS4 games already, including the upcoming Dreams from Media Molecule (and even the CryEngine features a voxel brush tool to create terrain). Simply put, to create compelling looking objects and scenery - something that looks more exciting than basic blocks - involves a lot of them to chisel in finer details. To achieve this effect in No Man's Sky you need voxels in high volume, something that puts a lot more demand on system resources. It's a must for creating something of this scale, but there are also limitations on show. One main pitfall is that animations are limited compared to a typical polygon-based game, and to take one effect as an example, water in No Man's Sky stretches into the distance as a copy-pasted pattern, with no movement.
The same goes for geometry as a whole. A lot of deformable terrain has no properties for gravity, where blasting chunks out of a resource stack doesn't cause anything at the top to fall down. This isn't an issue with a specific planet, but a characteristic of materials seen across the game, always giving a sense that terrain has no weight. Textures are also generated on the fly too: another source of great variety, but the results often give low-res, soup-like look when you look down. On PS4, this isn't helped by a low quality texture filtering pass that creates blur at tight angles. It'll be interesting to see how the results look on PC here.
Viewed from a distance though, the results speak for themselves. All of this is created using an algorithm, with a set of rules by Hello Games. Within certain bounds to keep the game playable, what we're seeing is always unique - a huge landscape that manages to run at 30 frames per second on PS4. And that's not to say there's no animation at all; grass sways on flourishing jungle planets, we have Havok physics for flags, body ragdolls, and creatures are given moving limbs. Whether they're bipedal or quadrupedal, their movement is also worked out logically, much like the creature creator tool in EA's Spore.
It helps create a sense that each planet is alive. Sadly, terrain and most foliage is static, and there's a visible amount of pop-in while boosting around in a ship. It's a distraction, but the sheer variety is still impressive. To mix up the formula, Hello Games' algorithm factors in mountains, rivers, lakes, caves filled with stalactites, and even underwater caverns. There are plenty of dull planets out there, wastelands filled with nothing. But combined with atmospheric effects like rolling clouds, fog, dust or rain, each planet brings a distinctive twist over the last.
Other post processing effects help add to that variety. You get visual tricks like lens flare and bloom from spotlights, all rendered in post. Equally impressive is the manner in which shadows shift across the world, based on a planet's rotation and position to a sun, creating a proper night-day cycle. Sadly, nearby moons stay in a fixed position regardless of this cycle - a bit of a cheat bearing in mind the mathematical precision and correctness found in the game. But it's a rare example of a title simulating planetary bodies for its lighting, while roaming on the ground.
Some other parts of the game's prsentation we're less thrilled with. The resolution is set to a native 1080p on PS4, but the field of view is restrictive here. It limits your cone of vision to a narrow rectangle, and we hope the PC version gives us a slider to widen that peripheral vision. That's not helped by a vignetting effect either, a basic filter that darkens the edges of the screen. Film grain is also used sparingly meanwhile to give it a retro 60s sci-fi vibe, plus there's a touch of chromatic aberration to the top of your visor. Again, these are both divisive effects we wish we had toggles for.
Perhaps one of our bigger gripes on PS4 though is that despite running at 1080p, the anti-aliasing method here doesn't address all those jagged edges. Especially in space stations, we're seeing a lot of distracting pixel crawl on sharp lines across the ground. It's an issue on patch 1.03, though lead programmer Sean Murray has promised a more effective temporal AA solution is in the works, which might smooth these rough points.
No Man's Sky's has seen plenty of setbacks up to its release this week, and it's clear that updates are coming to further refine the experience. It's worth mentioning the game does have stability issues, and in putting together this analysis, we've suffered three crashes to the PS4 front-end - mostly after starting a new game. From a quality assurance perspective, it's understandable that a game with such a freeform design will be hard to filter through for bugs. But it's clear there's still work to be done here - but the potential for adding new variables to the formula is massive.
No Man's Sky is a rare breed of a game; an experiment in blurring the lines between indie and AAA title development, while putting lesser used rendering technologies in the spotlight. The turnout is often fascinating, even if the stitching holding it together is plain to see. Overlooking the limitations of its voxel-driven engine, Hello Games has crafted a sandbox with little competition in delivering this huge sense of scale. It brings out a childlike curiosity to see what's coming next, and if it becomes a success, you can expect to see a lot its technical choices finding their basis in many more future titles.