Table of Contents

Tree Output Node

  • Category: IO
  • Edition: All editions
  • Output type: Trees on the terrain
  • Typical place in a graph: at the end of a spawning chain, after Scatter

Tree Output plants trees on the terrain. Give it positions, usually from Scatter, and a Tree Template that says which tree prefab to use, and the trees appear on the terrain when the biome generates. Optional masks thin the trees out and vary their height and width. Use one Tree Output per kind of tree.

Graph: Noise to Slope Mask to Scatter to Tree Output, with a second Noise varying the tree size, and the tree positions as green pins in the 3D viewport

When to use it

  • Plant forests, palm groves, single trees, dead trees: anything set up as a Unity terrain tree.
  • Vary tree size across the land with masks, such as smaller trees higher up.
  • Not for: rocks, props and other objects that should be separate GameObjects (use Object Output); grass and small plants (use Detail Density Output or Detail Instance Output).

Inputs

Slot Type Required What to connect
Positions Positions Yes Where to plant each tree, usually Scatter. Points outside the biome are skipped. With nothing connected, no trees are planted.
Density Mask No Thins the trees out: its brightness, times Density Multiplier, is the chance each position keeps its tree. Usually you shape density before Scatter instead, and leave this empty.
Vertical Scale Mask No The height of each tree, times Vertical Scale Multiplier. 1 is the prefab's own height. With nothing connected, every tree has the multiplier's height.
Horizontal Scale Mask No The width of each tree, times Horizontal Scale Multiplier. Connect the same mask as Vertical Scale to resize trees evenly.
Rotation Y Mask No Turns each tree around its vertical axis, between Min Rotation and Max Rotation. See the note on rotation below.

Outputs

Slot Type What it holds
Output Positions The planted trees with their size and rotation. You rarely need it; the trees reach the terrain without connecting anything here.

Properties

Property Default Range What it does
Tree Template None A Tree Template asset The tree to plant. A Tree Template holds the prefab and its render settings (shadows, billboard, bend factor, layer). Create one with Assets > Create > Vista > Tree Template. Without a template, nothing is planted.
Density Multiplier 1 0 and up Scales the chance that each position keeps its tree. With a Density mask, the chance is the mask times this value; without one, it is this value alone. Below 1 thins the trees out evenly; 0 removes them all.
Vertical Scale Multiplier 1 0 and up Tree height relative to the prefab, times the Vertical Scale mask if connected.
Horizontal Scale Multiplier 1 0 and up Tree width relative to the prefab, times the Horizontal Scale mask if connected.
Min Rotation, Max Rotation -360, 360 -360 to 360 The rotation range. Each tree turns between them by the Rotation Y mask value. Without a Rotation Y mask, every tree gets the same rotation.
Rotation Multiplier 1 0 and up Scales the Rotation Y mask before it picks a rotation in the range.
Seed 0 Any integer Changes which positions the Density mask removes. It is combined with the biome's seed.

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.
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.

Output nodes cannot be bypassed.

How it works

For every position, Tree Output decides whether to keep it (Density × Density Multiplier), then gives the tree a height (Vertical Scale × multiplier), a width (Horizontal Scale × multiplier) and a rotation. When the biome generates, the trees are added to the terrain as Unity terrain trees using the template's prefab, so they render, cast shadows and turn into billboards in the distance like any terrain tree.

There is no built in random size: without the scale masks, every tree is exactly the prefab size times the multipliers. Use a Noise on the scale inputs to vary it.

Examples

All examples use the same graph: a Noise terrain on a 1024 × 1024 m biome, a Slope Mask (gentle slopes) into Scatter (Spacing 40) into Tree Output with the palm tree template from the Vista samples, and a single grass texture. These are Scene view shots of the generated terrain.

Default settings

Palm trees spread over the gentle slopes, all the same size

Every position from Scatter gets a palm of the prefab's own size. All the palms lean the same way, because without a Rotation Y mask every tree gets the same rotation.

Height from a mask

Property Value
Vertical Scale A Noise (Scale 120, 2 layers)
Vertical Scale Multiplier 2

Palms of very different heights, some short and squat

The noise sets each tree's height, so tall and short palms mix in patches. The noise sits roughly between 0.1 and 0.65, so the multiplier of 2 brings the tallest trees back to about the prefab's height. Only the height changes, so short trees look squashed.

Height and width from a mask

Property Value
Vertical Scale and Horizontal Scale The same Noise
Vertical Scale Multiplier and Horizontal Scale Multiplier 2

Palms of different sizes, keeping their proportions

With the same mask on both inputs, trees grow and shrink evenly, keeping their shape. With this noise many trees end up small; lift the low end of the mask (with Levels or the noise's Remap) for a narrower size range, such as 0.8 to 1.2.

Thinner forest

Property Value
Density Multiplier 0.4

Fewer palms, spread more thinly

Each position keeps its tree with a 40% chance. This thins the trees evenly; to thin them in some places only, shape the mask before Scatter instead.

Recipes

  • Forest on gentle, green land: green area mask × Slope Mask → Scatter → Tree Output. Recipe trees-on-green-area.
  • Varied tree size: Noise → Levels (output range about 0.8 to 1.2) → both Vertical Scale and Horizontal Scale, multipliers at 1.
  • Smaller trees higher up: Height Mask inverted, or a Curve on the height → Vertical Scale and Horizontal Scale.
  • Mixed forest: one Scatter and one Tree Output per species, each Scatter with its own seed and mask, so the species do not land on the same spots.
Tip

Shape where trees grow in the mask before Scatter, and use this node's Density only for small adjustments. It keeps the graph easier to read, and the number of points (and the cost) goes down earlier.

Note

Without a Rotation Y mask, all trees get the same rotation. With trees that are not symmetric, such as leaning palms, this is easy to see.

Note

A Tree Template has a Variants list, but Tree Output currently plants only the main Prefab. For several kinds of tree, use several Tree Output nodes.

Warning

The scale masks multiply the tree size. A mask that is dark in places makes tiny trees there, and black makes trees of size 0. Raise the multiplier or lift the mask's low end.

Warning

Large numbers of terrain trees cost memory and rendering time. Check how many points Scatter produces before generating a large biome.

Performance

The node itself is a single quick GPU step. The real cost is the number of trees on the terrain, which is set by the positions you give it. Trees are written to the terrain at the end of generation, so very large counts make that step take longer.

For AI agents

  • Type name: TreeOutputNode.
  • Slot ids: Positions = 0 (Buffer), Density = 1, Vertical Scale = 2, Horizontal Scale = 3, Rotation Y = 4 (Masks); Output = 100 (Buffer).
  • Properties for vista_graphitor_node_set: treeTemplate (asset path), densityMultiplier (≥ 0), verticalScaleMultiplier (≥ 0), horizontalScaleMultiplier (≥ 0), minRotation, maxRotation (min ≤ max), rotationMultiplier (≥ 0), seed.
  • Per instance: kept if random < Density × densityMultiplier (Density = 1 when not connected) and the point is inside the biome; height = verticalScaleMultiplier × map; width = horizontalScaleMultiplier × map; rotation = lerp(minRotation, maxRotation, rotationMultiplier × map), constant when no map.
  • The result appears in the scene only after generation (vista_graphitor_save, then poll vista_generation_status); check it with vista_sceneview_look and capture scene_view. In the graph editor, vista_graphitor_display --as positions shows the positions as pins.
  • Pitfalls: missing template (nothing planted); dark scale masks making tiny trees; identical rotation without a Rotation Y mask; Prefab Variants not used.