Procedural ExamplesThis project highlights how to create procedural content in Unity. See how in ten simple sample scenes - with all scripts included. | ![]() |
About
Being able to create geometry on-the-fly is a really cool Unity feature. And Unity's scripting engine is fast enough that you can even do it from JavaScript. This project contains 10 examples, as well as 2 useful base functionality providers you can drop into your existing projects.
Base Functionality
These are located in the Plugins folder of the project and they are used extensively in these examples. They are read for easy inclusion within your existing projects.
- MeshExtrusion
- Extrude aritrary meshes thorugh a range of transformations
- Perlin
- A useful base class for generating Perlin noise
Examples
This project contains 10 procedural examples in all.
Perlin Noise
Here are the procedural examples involving Perlin noise:
- Perlin Noise
- Perlin noise is incredibly useful when you want to have randomness that is smoothed as you 'zoom' in.
- Fractal Textures
- Generates a hybrid Perlin multifractal texture on the fly.
- Lightning Bolt
- Generates a lightning bolt particle system connecting points. Each particle is offset from the direct line using Perlin noise.
Meshes
Here are the procedural examples involving mesh manipulation:
- Crumple mesh modifier
- A mesh deformed by Perlin Noise
- Sinus curve modifier
- A mesh deformed by Sinus functions
- Extrusion
- Shows how to use the exrusion script by etxtruding two objects along a physics-defined path
- Sculpt Vertices
- Sculpt a sphere using the mouse.
- Tron Trail
- And example of how to generate meshes that looks like the racing trails from Tron.
- Twist
- And example of how to generate meshes that looks like the racing trails from Tron.
