What the code of No Man's Sky says about procedural generation

A programmer dissected the code of No Man's Sky to find out exactly how it procedurally generates planets full of unique content.

Greg of 3D Game Dev Blog took a few weeks to dig into the code of No Man’s Sky to try and figure out how the game engine created by Hello Games creates each element of an entirely procedurally generated game world. 

This blog post is definitely worth checking out if you’re a dev at all interested in the code that went into procedurally generating nearly every bit of content on a multi-planetary scale. 

The post splits its findings into three main categories: geometry, textures, and animation. The section on geometry is by far the most in-depth and talks mostly about how the game creates creatures, ships, and other models by combining multiple parts from assets with a predetermined chance value. 

A similar approach is used to procedurally generate the textures and color pallettes used for creatures and planets within the game. 

An example of randomly generated creatures using <i>No Man's Sky</i> assets in an external viewer.

“...except [for] designing different model parts, [the game artists] have also provided multiple different textures for each part. So traversing that file in the same fashion with the descriptor file, one can calculate the final diffuse texture of the procedural generated model,” he explains. “And here is the even better part. Even if two models are identical geometrywise, they can end up having completely different colors, marks, shapes, etc using those procedurally generated textures.”

The piece-by-piece way No Man's Sky generates all its content leaves the door open for Hello Games or modders to add additional model parts post-release and exponentially increase the procedurally generated possibilities. While this might not say much about the current state of the game, Greg explains that this way of content generation speaks volumes about the game engine itself.

"The mindblowing thing about this generation procedure is that if they had double the number of [artists] working exclusively on [models], the game content (just for the creatures) would be hundreds of times larger," he says. "And this fact alone shows me the capabilities and the potential that NMS game engine has."

The full post, which includes models rendered in a viewer and a more in-depth explanation of the code behind No Man’s Sky, can be found over on the 3D Game Dev Blog.

Latest Jobs


Hybrid, Cambridge, MA or Chicago, IL
Quality Assurance Lead

Bladework games

Remote (United States)
Senior Gameplay Engineer

High Fidelity, Inc.

Game Interaction Designer

Fred Rogers Productions

Hybrid (424 South 27th Street, Pittsburgh, PA, USA
Producer - Games & Websites
More Jobs   


Explore the
Advertise with
Follow us

Game Developer Job Board

Game Developer


Explore the

Game Developer Job Board

Browse open positions across the game industry or recruit new talent for your studio

Advertise with

Game Developer

Engage game professionals and drive sales using an array of Game Developer media solutions to meet your objectives.

Learn More
Follow us


Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more