Expands or contracts terrain features: it grows high areas outward (dilate) or shrinks them inward (erode) by a chosen distance, and features take on the shape of the chosen filter. On a mask, it grows or shrinks the masked area.
When to Use
- Growing features: Expand widens peaks and ridges, useful for growing features like mountains or creating buffer zones.
- Thinning features: Shrink thins peaks and ridges and widens valleys. It can remove fine details while preserving large-scale structure.
- Removing small bumps: Open (shrink then expand) removes small peaks, thin ridges, and noise while keeping the overall shape intact.
- Filling small holes: Close (expand then shrink) fills small depressions, cracks, and gaps.
- Growing or shrinking masks: On a mask, grow or shrink the masked area, for example to add a margin around a selection.
How to Use
Connect terrain or a mask to the input. At the default Distance of 0 the input passes through unchanged, so raise Distance to see any effect.
- Choose the Action:
- Use Expand (Max) to grow peaks and ridges
- Use Shrink (Min) to thin peaks and widen valleys
- Use Open (Shrink-Expand) to remove noise and small bumps
- Use Close (Expand-Shrink) to fill small cracks and holes
- Select a Filter Type (Gaussian works well for most cases).
- Choose whether to work in meters or pixels with Specify distance in.
- Raise Distance from 0 until the features grow or shrink by the amount you want.
Inputs
| Port | Type | Required | Description |
|---|---|---|---|
| Primary Input | Heightfield | Yes | The terrain to process |
| Mask | Heightfield | Optional | Controls effect intensity per-pixel |
Outputs
| Port | Type | Description |
|---|---|---|
| Primary Output | Heightfield | The expanded or contracted terrain |
Parameters
Action (Default: “Expand (Max)”) – What to do to the terrain:
- Expand (Max): Grows high areas outward, widening ridges and peaks and raising the ground around them
- Shrink (Min): Grows low areas outward, thinning ridges and peaks and widening valleys
- Open (Shrink-Expand): Shrinks, then expands by the same distance. Removes small peaks and thin ridges while keeping larger shapes and valleys
- Close (Expand-Shrink): Expands, then shrinks by the same distance. Fills small pits and narrow valleys while keeping larger shapes and peaks
Filter Type (Default: “Gaussian”) – The shape that features take on as they grow or shrink:
- Gaussian: Round, soft-shouldered growth; the most natural-looking choice
- Linear Slope: Features spread with straight, evenly sloped sides and a squarish, pyramid-like footprint
- Square (Hard Edged): Flat-topped growth with a square footprint and hard edges
Specify distance in (Default: “World Scale (m)”) – Whether Distance is given in world units or in pixels:
- World Scale (m): Distance in meters. The effect keeps the same size in the world when you change the build resolution
- Pixels: Distance in pixels. The effect gets relatively larger at lower resolutions and smaller at higher resolutions
Distance (Default: 0) – How far features grow or shrink, and so how strongly the terrain is affected. At the default of 0 the terrain passes through unchanged. With World Scale (m) the range is 0 to 16,000 m; with Pixels it is 0 to 256 px. Both use a logarithmic slider, so most of the travel is spent on small distances. Switching Specify distance in does not convert the current value, so re-set Distance after switching.
Tips and Tricks
- Gaussian produces the most natural-looking results for terrain; Square (Hard Edged) suits blocky, architectural, or mesa-like shapes.
- For subtle effects, keep Distance small: a few tens of meters, or a few pixels, is often enough to soften or thicken fine detail.
- Use World Scale (m) when you want the result to look the same at preview and final resolution; use Pixels when you want a fixed amount of per-pixel cleanup, such as removing single-pixel spikes.
Older Versions
Expander devices in projects from older builds may use the “WM 2.x” or “WM Build 3012” versions, which have different action names, filter types, and distance controls. They keep working as saved; update the device version to get the options described here.