Planet with lots of trees

Main menu with overview of saved planets

Introduction
PCG systems do not have to be very complicated for smaller games, but in many cases they are large and complex systems, created for specific purposes within a specific game. This means, if you want to have procedurally generated content in your own game, you often have to rely on your own - or your teams - ability to create the desired tool. This can be limiting for newer game developers and small teams, as seemingly unconventional uses for PCG are ruled out, leading to certain types of gameplay not being considered when designing games.
One usage of PCG that may not be considered when designing games, is for generating planets. More specifically, a world in the form of a planet, that contains enough details to allow a player character to explore its surface and interact with the environment, while also having the ability to be looked upon from afar. This has been done a few times before, e.g. in Spore, No Man's Sky, Star Citizen, and Super Mario Galaxy, but it is rare to come across this type of world in smaller games. The reasons why this is could be that the PCG systems required to generate such worlds seem not only unconventional, but also daunting, since this type of content is often associated with more extensive games like No Man's Sky. There is also a lack of such tools online, meaning you or your team would have to develop one yourself, with a lack of material online to help you in the process. (Extract from thesis)

Spore gameplay

No Man's Sky gameplay

Therefore, this study aims to explore how a tool can be developed to generate and design worlds in the form of planets, being versatile enough to be utilized by different game developers for different games. The purpose of this is to gain experience and knowledge on a personal level, share the acquired knowledge with others in a similar pursuit, and inspire game developers by widening their view of potential game concepts. The study will attempt to evaluate how useful the tool and its generated content is, to determine whether or not the artifact is a viable solution to the problem.  (Extract from thesis)

Terrain generation using layered 3D noise

Terrain generation
At the moment the terrain is generated using layers of customizable noise. This in itself can yield great looking terrain with a very wide expressive range, assuming the user has some knowledge of how to effectively bias and layer noise. However, I am planning to implement a more controlled way for the use to define the terrain!

Zones and forests
Most recently I've been working on letting the user define zones using a brush. Zones are independent of the radius of the planet, meaning they are not affected by changes to the terrain. Zones are currently only used by forests but might have other use cases in the future. A forest populates the surface with trees, or any other object for that matter, with adjustable density and randomness.

Terrain texturing
To texture the terrain, I created a shader graph that takes in a set of textures for each type of terrain; a color map with a color multiplier, a normal map, and an occlusion map. The shader compares the normal of the surface, relative to its position on the sphere, to determine whether or not to override the grass or sand with rock, creating somewhat realistic cliff sides. Sand vs grass is determined by the magnitude of the pixel, relative to the ocean level. Similarly, snow is placed on the pixels that exceed a certain magnitude, overriding all other types of terrain. All thresholds are adjustable, and two layers of noise are applied to alter the normal vector of the surface, or magnitude of the pixel, which blends the terrain types nicely!

Close-up of terrain texturing using shader graph

Expressive range
Planet Designer can be used to design generate a wide variety of planets. Below are a some examples, featuring earth-like planets, a moon, and more experimental planets. There is even an asteroid!

Examples of planets designed and generated with Planet Designer

For the latest version of the tool check out my GitHub!

You may also like

Back to Top