Building paths
Terrain shaping
Understand the Terrain Compositor, the saved original terrain, hand edits, terrain settings, stamp priority and runtime rebuilds.
Roads, rivers and intersections reshape the terrain through the Terrain Compositor on the Wayshaper Terrain object. Each one is a stamp. The compositor starts from the original terrain and applies the stamps in order, so the result never depends on the order you edited things in.
The original terrain
The first time a path changes a terrain, the compositor saves the terrain as it was: heights, painted layers, details and trees. In the Editor the copy is saved as Assets/Wayshaper/Terrain Originals/<scene name>/<terrain data name> Original.bytes. When a path moves, the compositor restores the area it used to cover from that copy and stamps every path there again.
Sculpting and painting by hand
Sculpt, paint and plant on the terrain as usual. About a second after you stop, Wayshaper copies your changes outside the roads and rivers into the original, so the next rebuild keeps them. Under a road or river the path wins. Keep Hand Edits Now does the same at once.
Compositor buttons
| Button | What it does |
|---|---|
| Rebuild Pending Changes | Rebuilds the areas waiting for a rebuild, when automatic rebuilding is off |
| Rebuild All Terrains | Restores every terrain from its original and stamps every path |
| Keep Hand Edits Now | Copies sculpting, painting and planting outside paths into the original |
| Show Original Terrain | Writes the original back without any path, until the next rebuild |
| Start Again From Current Terrain | Forgets the originals. The terrain as it is now becomes the new original |
Turn off Rebuild Automatically on very large terrains to rebuild only when you press Rebuild Pending Changes.
Terrain settings
Every road and river profile has a Terrain tab.
| Setting | What it does |
|---|---|
| Shape Heights | Flattens the ground under roads and carves the bed under rivers |
| Blend | Raise and lower, lower only (cuttings and beds), or raise only (embankments) |
| Flat Margin | Extra width beyond each edge kept level with the path |
| Falloff and Falloff Curve | Distance and shape of the blend back into the original ground |
| Height Offset | Height of the ground relative to the path surface. Roads keep it slightly negative so the ground stays under the mesh |
| Max Raise and Max Lower | Limits on how far the ground moves. Beyond them the path is left above or below the ground, for bridges and tunnels |
| Edge Noise | Random variation of the falloff edge so cuttings look natural |
| Paint Layers, Core Layer, Edge Layer | Paints a layer under the path and a band along each edge, with margins, widths, opacities and noise |
| Clear Details, Clear Trees, Clear Grass | Removes terrain details, terrain trees and Kiwi Grass along the path, with Clear Margin and Tree Clear Margin |
Layers that the terrain does not have yet are added to it automatically.
Priority
Stamps apply from low to high: rivers start at 0, roads at 100 and intersections at 200, and Terrain Priority is added to that. A tributary stamps after the river it flows into unless you change their priorities, and never raises the main channel. Raise a road's priority to let it win where it overlaps another road.
At runtime
Nothing is rebuilt at runtime unless you ask. After changing paths from a script, call Rebuild on them and then TerrainCompositor.Rebuild(bounds) or RebuildAll(). Play mode changes to a TerrainData asset are kept by Unity, so work on a copy of the TerrainData when you change terrain in play mode, as the samples do.
Still stuck?
Bring the scene with you.
Include the Wayshaper version, Unity and render-pipeline versions, the road or river profile involved, any inspector warnings, relevant logs, and a minimal scene with its Terrain Originals folder.