New to Terrain Spawner? Follow the step-by-step Terrain Spawner — Getting Started tutorial first.
Supported resource types
Terrain Spawner supports:How it works
When you click Spawn, Terrain Spawner processes each active Group in order:- Casts a ray downward from the stamper’s position to find the surface.
- Builds the box area from the result.
- Depending on the Group’s resource type, runs the appropriate spawn routine for that area.
Unity/GameObject and Terrain Object groups
For object-based groups, the spawner:- Generates a random seed if needed.
- Runs the scatter system over the box area to produce sample positions.
- For each sample, casts a ray downward to find the surface hit point.
- Selects a random prototype weighted by Success Settings.
- Evaluates filter fitness (Mask Filter or Simple Filter) at the hit point.
- Discards the sample with probability
1 − fitness. Samples withfitness = 0are always skipped. - Calls the shared spawn routine which applies Transform Components and Overlap Check Settings.
Unity/Terrain Detail groups
For terrain detail groups, the spawner iterates over every active Unity Terrain that intersects the stamper bounds. For each terrain and each active detail prototype, it:- Converts the box area into detail-map coordinates.
- Reads the existing detail layer.
- For each detail cell in the area, evaluates the Mask Filter fitness.
- Computes a target density:
- If Use Random Opacity is enabled: multiplies fitness by a random value before scaling to the density range.
- Otherwise: scales fitness directly to the density range.
- Applies a random failure check using Failure Rate.
- Writes the result back to the terrain detail layer.
For Terrain Detail, Terrain Spawner requires that the terrain’s detail prototypes are already configured in Unity’s Terrain Inspector. If no detail prototypes exist on the terrain, the spawner logs a warning and skips that terrain.
Shared systems
Per-group settings (Terrain Object and Unity/GameObject)
Per-prototype settings (Terrain Object and Unity/GameObject)
- Success Settings
- Overlap Check Settings
- Transform Components
Per-prototype settings (Unity/Terrain Detail)
- Spawn Detail Settings — controls detail density, opacity, and failure rate
- Mask Filters
Tool-level components
- Area Settings — defines the stamper volume and bounds.
- Stamper Tool Controller — controls visualization and auto respawn.
- Layer Settings — specifies which physics layers are used for raycasts.
Auto Respawn behavior
When Auto Respawn is on in the Stamper Tool Controller:- Changing any Group setting triggers a full respawn of that Group after the configured delay.
- Changing a Terrain Detail prototype setting triggers a respawn of only that specific detail prototype on the terrain, not the entire Group.
- Changing a non-detail prototype setting triggers a full Group respawn.
When to use Terrain Spawner
Terrain Spawner is best when you want:- a one-shot generation pass over a large area;
- a forest, rock field, or vegetation layout based on filters and scatter rules;
- terrain detail density passes (grass, mesh details) inside a selected zone;
- a workflow where the result is tied to a scene object rather than painted manually.
Notes
- Terrain Spawner does not support Unity/Terrain Texture. Use Texture Stamper for terrain texture passes.
- For object-based groups, the scatter system generates a random seed before each pass when Random Seed is set to auto-generate.
- For very large areas with Terrain Detail groups, consider splitting the stamper area or using multiple spawners to keep the operation manageable.
- Types (Groups) configured in Terrain Spawner are reusable assets. The same Group can be added to Advanced Brush and used for manual painting with the same filter and scatter rules.
