Direction Mask Node
- Category: Masking
- Edition: All editions
- Output type: Mask
- Typical place in a graph: after the final height, feeding texture layers and spawn rules
Direction Mask selects slopes by the direction they face. Pick a compass angle and a tolerance, and it marks the slopes facing that way, strongest when they face it exactly and fading toward the edges of the tolerance. Use it for anything that depends on sun and wind: snow and moss on shaded slopes, dry grass on sunny ones, wind blown sand on one side of the dunes.

When to use it
- Different textures on sunny and shaded sides of mountains: north faces snowier or mossier.
- Vegetation that prefers one side: more trees on the moist side, sparser on the dry side.
- Wind effects: sand or snow piled on the lee side.
- Not for: selecting by steepness (use Slope Mask); a full winter with sun and wind (use Snow Fall 2).
Inputs
| Slot | Type | Required | What to connect |
|---|---|---|---|
| Height | Mask | Yes | The terrain height. The facing direction of each slope is measured from it. |
Outputs
| Slot | Type | What it holds |
|---|---|---|
| Output | Mask | 1 on slopes facing Angle exactly, fading to 0 at Angle ± half the Tolerance, then shaped by Falloff. Flat ground is 0. |
Properties
| Property | Default | Range | What it does |
|---|---|---|---|
| Angle | 0 | 0 to 360 degrees | The direction the selected slopes face, around the vertical axis. 0 faces +X (east in Unity's usual layout), 90 faces +Z (north), 180 faces -X, 270 faces -Z. |
| Tolerance | 10 | 0 to 180 degrees | How wide the selection is: slopes within half this angle on either side of Angle are included, with full strength only at Angle itself. 10 is a thin sliver; 90 covers a quarter of all directions; 180 covers half. |
| Falloff | Straight line | Curve from 0 to 1 | Reshapes the fade from the edge of the tolerance (left) to the center (right). Raise the curve for a broad, full strength selection; keep it straight for a soft fade. |
Common properties
| Property | What it does |
|---|---|
| Id | The node's unique name in this graph, shown for reference. You cannot edit it. Scripts and the AI workflow CLI use it to find the node. |
| Resolution | How detailed this node's result is, in texels across the biome. Relative To Main Input (default) matches the height connected to Height, times the multiplier below it. Relative To Graph follows the biome's Canvas Resolution instead. Absolute sets an exact size. Absolute is limited to 32 to 512 in Vista Personal and 32 to 4096 in Vista Indie and Pro. |
| Split Execution | Lets this node run over several frames so the editor stays responsive during long generations. It only works when Allow Split Execution is on in the graph settings. This node finishes in one step, so splitting only adds a short pause around it; leave it off. |
| Bypass | Skips the node. Nothing comes out, and the nodes after it act as if nothing were connected. |
Examples
All examples measure the same eroded mountains (Noise, Scale 600, then Hydraulic Erosion 2) on a 1024 × 1024 m biome with a terrain height of 400 m.
| Setting | 2D | 3D |
|---|---|---|
| Default: Angle 0, Tolerance 10 | ![]() |
![]() |
| Angle 0, Tolerance 90 | ![]() |
![]() |
| Angle 180, Tolerance 90 | ![]() |
![]() |
The default tolerance of 10 degrees is too narrow for most uses; only a few streaks pass. At 90 degrees, the slopes facing +X are clearly marked, and turning Angle to 180 selects the opposite sides.
Recipes
- Shaded side moss: Direction Mask (Angle toward the shaded side, Tolerance 120 to 180, Falloff raised) × Slope Mask → moss or snow layer.
- Sun bleached slopes: Direction Mask toward the sun × a Height Mask → a drier grass texture.
Tip
Match Angle to your scene's directional light, so shaded and sunny textures line up with the real shadows.
Note
The mask fades in a straight line from the center to the edge of the tolerance, so even at 180 degrees most of the selection is partial strength. Raise the Falloff curve for a fuller selection.
Performance
Very cheap: one quick GPU step.
Related nodes
- Slope Mask, Height Mask: select by steepness and altitude.
- Geometry Mask: direction, height and slope in one node.
- Snow Fall 2: sun and wind aware snow.
For AI agents
- Type name:
DirectionMaskNode. Input Height0, Output100. - Properties:
angle(0 to 360; 0 = +X, 90 = +Z),tolerance(0 to 180, full width),falloff(curve). - Output = falloff(1 - |2 × t - 1|) where t is the facing angle's position within [angle - tol/2, angle + tol/2]; 0 outside and on flat ground.
- Bypass produces no output.




