Procedural Planets by TimoFlesch - 1


a Unity script for procedurally generated 3D planets

Unity 2018.3.0f2Unknown LicenseUpdated 231 days agoCreated on March 10th, 2019
Go to source

procedural planet generator

procedurally generated 3D planets, implemented in Unity
scripts adapted from Sebastian Lague’s excellent tutorial series on procedural planets (

Project Structure

β”œβ”€β”€ auxiliary
β”‚Β Β  └── external
β”‚Β Β      β”œβ”€β”€ editor
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ConditionalHideAttribute.cs
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ConditionalHidePropertyDrawer.cs
β”‚Β Β      β”‚Β Β  └── PlanetEditor.cs
β”‚Β Β      β”œβ”€β”€ maths
β”‚Β Β      β”‚Β Β  └── MinMax.cs
β”‚Β Β      └── noise
β”‚Β Β          └── Noise.cs
β”œβ”€β”€ features
β”‚Β Β  β”œβ”€β”€ colour
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ generator
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ ColourGenerator.cs
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── ColourSettings.cs
β”‚Β Β  β”‚Β Β  └── shader
β”‚Β Β  └── shape
β”‚Β Β      β”œβ”€β”€ generator
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ ShapeGenerator.cs
β”‚Β Β      β”‚Β Β  └── ShapeSettings.cs
β”‚Β Β      └── noise
β”‚Β Β          β”œβ”€β”€ INoiseFilter.cs
β”‚Β Β          β”œβ”€β”€ NoiseFilterFactory.cs
β”‚Β Β          β”œβ”€β”€ noisefilters
β”‚Β Β          β”‚Β Β  β”œβ”€β”€ ridgeNoise
β”‚Β Β          β”‚Β Β  β”‚Β Β  └── RidgeNoiseFilter.cs
β”‚Β Β          β”‚Β Β  └── smoothNoise
β”‚Β Β          β”‚Β Β      └── SmoothNoiseFilter.cs
β”‚Β Β          └── NoiseSettings.cs
└── main
    β”œβ”€β”€ Planet.cs
    └── Sphere.cs


functions that implement planet object

  • main/Planet.cs
    defines planet object
  • main/Sphere.cs
    defines a sphere, consisting of six faces


functions that implement various helper routines

  • external/editor
    GUI elements
  • external/maths
    guess what…
  • external/noise
    noise generators (currently only simplex)


functions that implement parametrised feature dimensions,
such as colour and shape


Here’s an example with several layers of noise and a custom colour gradient:

Show all projects by TimoFlesch