TerraScape - Procedural Terrain Generator & Erosion Tool
TerraScape v1.1 – Technical Documentation
This document covers the internal mechanics, parameters, and design choices of the TerraScape Geometry Nodes and Shader systems.
1. Getting Started
- Open the 3D Viewport.
- Open the Terrain tab located in the N-Panel (press N to open the sidebar).
- Click Generate Terrain.
A new object named Terrain will be created with the TerraScape Geometry Nodes modifier attached. All global parameters are exposed in the Modifier Properties tab.
Note on Presets: The Preset dropdown switches between different underlying procedural generators (Mountain, Canyon, Landscape, Peaks, Range). To modify the specific noise and Voronoi generation settings for a specific preset, you must open the Geometry Nodes editor, locate the respective sub-group node for that preset, and adjust its exposed sockets directly.
2. Global Geometry Controls
TerraScape generates a perfectly square procedural grid. This is an intentional design choice to maintain uniform topological density for the erosion simulation.
- Vertices X&Y: Sets the resolution of the terrain grid. (Default: 256).
- Size: The physical size of the terrain in meters. Scaling this adjusts the boundaries of the heightfield accordingly.
- Scale: A global scale multiplier applied via a Vector Math node at the very beginning of the node tree. Any scale parameters exposed inside individual Preset sub-groups are multiplied after this global scale.
- Height: A global Z-axis multiplier applied to the final calculated heightfield data before it is converted to geometry.
3. Custom Textures (Heightmaps)
You can bypass the procedural generation entirely by feeding a grayscale heightmap into the system. The Erosion system works exactly the same on custom textures.
- Custom Texture (Toggle): Forces the modifier to use the image input instead of the procedural presets.
- Texture: The image datablock for your heightmap.
-
Falloff: Applies a mathematical Power function (
Heightfield ^ Falloff) to the texture data. The default is 1.0 (linear). Lowering or raising this value allows you to dynamically adjust the contrast and smoothness of the imported heightmap without editing the image file.
4. Particle Erosion System (v1.1)
The erosion system simulates roughly 6,500 particles dropped onto the terrain at the default particle density of 0.15 to carve channels based on slope and gravity.
Note: In v1.1, particle density calculation has been decoupled from the vertex count to prevent unwanted visual artifacts when changing mesh resolution. This slightly increases calculation times but provides stable, resolution-independent carving.
- Erosion (Toggle): Enables the simulation loop.
- Iterations: The number of steps/loops the simulation runs.
- Particle Count: The density of the particles instantiated across the terrain.
- Particle Size: The radius of the individual particle. Larger sizes carve wider, deeper channels, though excessively high values may cause the terrain to look unnatural.
- Multiplier: A global multiplier that dictates the final Z-depth of the carved erosion data. (Default: 0.5).
- Flow Intensity: Controls the downward force of the particles.
-
Technical Note: This is not a physically accurate gravity simulation. For performance reasons, each iteration moves particles down by 1 discrete unit (where
unit = terrain size / vertex count) multiplied by this Flow Intensity value. Because of this, the flow behavior is somewhat dependent on mesh resolution. Decoupling this for pure time-step physics is planned for future updates.
-
Technical Note: This is not a physically accurate gravity simulation. For performance reasons, each iteration moves particles down by 1 discrete unit (where
- Softness: Applies a blur attribute to the final erosion data, smoothing out sharp, jagged lines left by the particles.
- Seed: Randomizes the initial spawn coordinates of the particles.
5. Foliage System (Trees)
A lightweight scattering system for distant foliage.
- Trees (Toggle): Enables tree scattering.
- Tree Density: Probability multiplier for point distribution.
- Tree Size: Scales the instanced geometry.
- Slope Bias: The system uses slope angle as a mask to prevent trees from spawning on cliffs. This parameter offsets that calculation, allowing you to force trees into steeper valleys or restrict them purely to flat ground.
- Technical Note: The default "trees" are simple mesh planes instanced on points, driven by an alignment node that forces them to constantly point toward the active Scene Camera.
6. Smart Material System
TerraScape assigns two default materials (Terrain and Trees) which can be overridden in the modifier panel. The default Terrain shader is a complex, biome-aware setup.
- Texture Scale: A global mapping scale applied to all underlying Noise and Voronoi textures in the shader.
- Colors: Base color inputs for Rock, Edge Highlights, and Grass. (Snow is hardcoded to white.)
AO and Masking (Important)
The material heavily relies on Ambient Occlusion (AO) to generate masks for edge wear, crevices, and grass placement.
- AO Distance: Because AO relies on World Space data, if you increase the global scale (e.g., if Terrain Size goes from 200m to 400m, multiply AO distance by 2) to maintain the same stylized look.
- Edge Wear Radius: Controls the spread of highlights on convex edges.
- Edge / Crevice Highlight Intensity: Multipliers for the brightness of the AO-driven masks.
Biome Blending
- Grass Expansion: A math add/subtract bias applied to the grass mask.
- Grass Falloff: Controls the gradient spread between the grass mask and rock base.
-
Snow Coverage: Sets the slope threshold required for snow to appear. A value of
1.0will cover nearly the entire mesh.
PBR Multipliers & Bump
- Roughness / Specular Multipliers: Global modifiers for the respective PBR channels.
- Bump Height: The global distance multiplier for the Bump node.
- Individual Bump / Roughness Controls: You can individually adjust the roughness and bump intensities for the Rock, Grass, and Snow layers.
- Strata Flow Bump: Controls the bump strength of the procedural erosion lines/strata generated in the shader.
Advanced Diffuse/Normal Textures
The material exposes individual tuning parameters (Scale, Detail, Roughness, Lacunarity, and Distortion) for the specific Noise and Voronoi nodes that generate the base rock, snow, and grass textures in the shader tree.