Arborist — Procedural trees across four seasons

Seasonal Procedural Trees

1. Introduction

Arborist is a seasonal procedural tree tool for Unity with a stylized foliage system. Design trees, bushes, vines, and topiaries with a growth slider and pruning tools. Design once, export a prefab with meshes for every season: spring blossoms, summer canopies, fall colors, and bare winter branches with snow.

The ArboristSeason component keeps your whole scene in sync: season switching across all tree prefabs, skybox swaps, particle effects (blowing snow, falling leaves, etc.), wind, and ground material colors.

What’s Included

What You Can Do

2. Getting Started

Installation

  1. Import the Arborist package into your Unity project (Unity 2022.3 LTS or newer)
  2. The package installs to Assets/R2RGames/Arborist/

Arborist works with both URP and Built-in render pipelines.

If your project uses URP, convert the demo materials by opening Window → Rendering → Render Pipeline Converter, check the Material Upgrade box, then click Initialize & Convert.

Demo Scene

Start by opening the demo scene at Assets/R2RGames/Arborist/Demos/Seasons.unity. It includes one of each tree species, topiaries, vine-covered columns, hedges, and seasonal skyboxes. The ArboristSeason component controls seasons for the entire scene, both in the editor and at runtime. Change the Season field to see all trees, ground colors, skybox, wind, and particle effects update together. Press Play and hit Space to cycle through all four seasons in real time.

Demo scene

3. Using Arborist: Create

Arborist’s core workflow is design once, export for every season. The export process generates separate meshes for each season you select, with the correct foliage colors, density, blossoms, and snow already baked in.

Arborist editor window

Editor Controls

  1. Tree/Foliage buttons
  2. Export Prefab, Randomize
  3. Viewport controls

Fall Colors

  1. Open the Arborist editor:
    Window → R2R Games → Arborist
  2. Change species to Maple
  3. Change the season to Fall (click Season)
Each species comes with optimized defaults for crown shape, branching density, foliage, and bark. Start with a species preset and adjust from there rather than building from scratch.

Four-Season Foliage

Use the Season (Season) palette button in the 3D preview to cycle through the year:

When you export with the seasonal option, a single prefab contains all selected season variants. Switch between them at runtime with ArboristTree.SetSeason(), or let ArboristSeason handle it for the whole scene (see Using Arborist: Manage).

Growth Slider

Drag the Growth slider to step through the tree’s development from sapling to maturity. The slider follows natural growth stages, so the trunk thickens, branches extend, and the canopy fills in proportionally at each step. Use it to export a young sapling or a mature tree from the same design.

Pruning Tools

Prune markers persist across exports and are stored in the tree definition. Randomizing the tree (Randomize) clears all prune markers. Topiary species also have Hedge Trimmers and Rect Trimmer tools. See Pruning Tools for full details.

Snow Effects

Arborist handles snow differently depending on the species type:

Snow is controlled by the Season setting. Set the season to Winter to see snow in the editor. At runtime, ArboristSeason applies snow coverage across all trees in the scene. See Snow System for full details.

Phototropism

Simulates trees growing toward a light source, producing asymmetric canopies that are fuller on the sunlit side and sparse on the shaded side. Drag the Light direction (Light direction) gizmo in the 3D preview to aim the light.

Exporting the Prefab

Click Export (Export) to generate a prefab you can drag into any scene. The export dialog lets you choose a folder and name. Each export creates a subdirectory containing the prefab, meshes, materials, and a billboard atlas. The tree definition is embedded inside the prefab, so you can reload it later for further editing.

Exported prefabs include a 3-level LOD system (full mesh, simplified mesh, and auto-generated billboard) that switches automatically based on screen size. To create seasonal prefabs with multiple season variants in a single prefab, see Seasonal Export.

4. Using Arborist: Manage

Once you have exported tree prefabs and placed them in your scene, the ArboristSeason component keeps everything in sync. It is the single control point for seasons across your entire scene.

ArboristSeason component

Setting Up ArboristSeason

  1. Add an empty GameObject to your scene and attach the ArboristSeason component
  2. Set the Season field to the starting season
  3. All Arborist tree prefabs in the scene will automatically switch to match

What ArboristSeason Controls

When you change the season (in the Inspector or via script), ArboristSeason broadcasts to the entire scene:

The demo scene at Assets/R2RGames/Arborist/Demos/Seasons.unity has a fully configured ArboristSeason component you can use as a reference.

Typical Workflow

  1. Design and export trees with the seasonal export option (see Seasonal Export)
  2. Place the prefabs in your scene
  3. Add an ArboristSeason component
  4. Drag the included particle effect prefabs (Assets/R2RGames/Arborist/Prefabs/) into the particle slots: BlowingSnow, Pollen, Butterflies, FallingLeaves
  5. Assign skybox materials for each season if you want the sky to change
  6. Assign your ArboristLawn material if you want ground colors to update
  7. At runtime, call ArboristSeason.SetSeason() to change seasons, or animate the season field from a timeline or game manager

See the ArboristSeason API Reference for the full list of fields, methods, and events.

5. The Editor Window

All edits happen on an in-memory working copy. Changes are saved only when you Export Export, which creates or updates a prefab with your tree data embedded inside it. An asterisk (*) next to the prefab name indicates unsaved changes.

3D Preview

Palette Buttons

The bottom-left corner of the 3D preview has palette buttons for the most commonly used settings:

Button Type Description
Season Season Popup Switch between Spring, Summer, Fall, and Winter
Foliage Foliage Toggle Show or hide leaf geometry to inspect the bare skeleton
Placement Placement Popup Switch foliage placement mode: Terminal, AlongBranch, or Shell
Detail Level Detail Level Cycle Low → Medium → High → Highest

The Season button is always visible. The Foliage group appears after a spacer. Popup buttons open a vertical stack of options above the button, with the active option highlighted.

After the Detail Level button, a spacer separates the pruning tools Clippers (see Pruning Tools).

Action Bar

The bottom-right corner of the 3D preview has action buttons:

Button Description
Export Export Opens the export dialog to choose a folder and name, then saves a mesh + prefab
Randomize Randomize Randomizes the seed for a fresh variation

Below the action bar is the Live Preview toggle. When enabled, the 3D preview regenerates automatically every time you change a parameter. When a change requires regeneration, a loading spinner appears in the preview while the tree is rebuilt in the background. The preview remains interactive during generation, so you can orbit and zoom while the tree updates. On lower-end machines, leave Live Preview off and click the Update button to regenerate manually when you are ready to see your changes.

Prefab Workflow

Arborist uses a prefab-centric workflow. Prefabs are the primary way to save your trees. Each exported prefab contains the full tree definition inside it.

6. Species Guide

Arborist ships with 11 species, each with its own branching pattern, bark, and stylized foliage. When you pick a species, all parameters are set to good defaults for that species.

Deciduous Species

Deciduous trees shed their leaves in winter, showing dramatic seasonal changes from spring buds through fall color to bare winter branches.

Maple

Maple

The classic shade tree with a broad, rounded crown. Maple produces full canopies with pointed leaf silhouettes and vivid red-orange fall color. Evenly-spaced branches radiate outward, giving the canopy a balanced, rounded silhouette. Warm gray-brown bark with subtle grain.

Oak

Oak

A large, spreading tree with a wide spherical crown. Oak has thick primary branches, deep-furrowed dark bark, and rounded leaf lobes. Fall color is russet brown. Heavy scaffold branches spread wide from the trunk, with foliage massed at the outer crown and the thick internal branching visible underneath.

Birch

Birch

A slender, graceful tree with an upright oval crown. Birch is distinctive for its white/cream bark with dark markings that break up the pale trunk. Small, aspen-shaped leaves turn golden yellow in fall. The open branching pattern lets light filter through.

Elm

Elm

A stately tree with a tall vase-shaped crown: the trunk splits into arching branches that sweep upward and outward. Elm features a high canopy dome with bare scaffold branches below, deeply furrowed gray-brown bark, and asymmetric serrated leaves that turn golden-yellow in fall. Foliage concentrates at the top of the arching branches, leaving the lower scaffold exposed.

Dogwood

Dogwood

A smaller ornamental tree with a low, spreading hemisphere crown. Dogwood’s standout feature is its white flowers in spring, which appear as four-petaled blooms and fade as summer progresses. Smooth-edged oval leaves turn red-purple in fall. Dark gray-brown bark with a blocky pattern. Horizontal branching creates layered tiers of foliage that give the small crown a wide, spreading look.

Azalea

Azalea

A low, dense flowering shrub with a spreading hemisphere form. Its standout feature is abundant pink-magenta flower clumps in spring: each cluster is a ring of 5–6 radiating oval petals. Oval leaves (shared with Dogwood) turn red-orange in fall. Smooth gray-brown bark. Multiple stems branch close to the ground, producing a full, rounded shrub form.

Privet

Privet

A dense hedge shrub with a compact, upright form. Privet is semi-evergreen, holding most of its foliage through winter with only subtle seasonal color shifts. Small, oval leaves on smooth gray-tan bark. Tightly-packed upright branches produce a thick, uniform hedge surface well-suited for borders and garden screens.

Evergreen Species

Evergreen species keep their foliage year-round with only subtle seasonal color shifts.

Fir

Fir

A tall conifer with a classic conical crown shape and strong upward-growing leader. Fir uses needle clusters instead of leaf cards, producing the characteristic dense, layered look of a real fir. In winter, 3D snow accumulates on the branches. Reddish-brown bark. Frond textures provide the layered needle spray pattern between branches.

Blue Spruce

Blue Spruce

A compact, narrow conifer with striking blue-green foliage. Similar to Fir but denser and more compact. Uses a narrow cone crown shape. Produces geometric snow in winter with heavy branch droop. Gray-brown bark with shallow fissures.

Special Species

Topiary

Topiary Topiary

Sculpted ornamental forms, choose from five shapes:

Shape Description
Sphere Round topiary ball on a thin trunk
Column Tall, narrow rectangular column
Hedge Wide, low wall for garden borders
Cube Boxy square form
Pyramid Tapered cone shape

Topiary generates a dense outer shell with a leaf-clump texture. Use the Hedge Trimmer and Rect Trimmer pruning tools to sculpt custom shapes.

After changing the Topiary shape dropdown, click the Update button to apply the new shape. The shape change is deferred so you can adjust other settings before regenerating.

Vine

Vine

A surface-projected species that grows along a geometric substrate rather than into a free-standing crown. Vine branches cling to the surface of a box, cylinder, or wall shape.

Substrate Description
Box Rectangular surface (e.g., a wall planter)
Cylinder Round surface (e.g., a column or tree trunk)
Wall Wide flat surface (e.g., a building facade)

Each substrate shape has optimized defaults: Wall starts wider (5m) with broad coverage, while Cylinder and Box use compact dimensions suited for columns and planters.

Vine features flowers that bloom primarily in summer. The substrate appears as a semi-transparent wireframe in the preview, but is not included in exported prefabs. You position the vine prefab over your own scene geometry.

7. Tree Parameters

The left panel of the editor window shows all configurable parameters for your tree. When you select a species, these are set to optimized defaults, but you can tweak anything to create your own variations.

Parameters

Editor left panel
  1. Height / Width: Set the crown dimensions in meters
  2. Branch Detail: Controls how many branches are rendered as mesh geometry. Does not affect foliage placement.
  3. Leaf Size: Scales the size of each leaf card.
  4. Leaf Density: Multiplier on leaf count. Higher values produce a fuller canopy but increase the polygon count of the exported prefab.
  5. Fronds: Adds leaf clump layers behind the individual leaves. Available for conifer species (Fir, Blue Spruce) only.
  6. Frond Density: Controls how many frond layers are placed (when Fronds is enabled).
  7. Snow Coverage: Scales snow intensity (0–1). Also controls automatic branch droop for deciduous species.
  8. Flowers: Toggle to show or hide flower geometry. Available for Dogwood, Azalea, and Vine.
  9. Flower Color: Tint color for the flower petals.
  10. Flower Size: Scales the size of each flower clump.
  11. Flower Density: Controls how many flowers appear.

Advanced

The Advanced foldout appears in the inspector for species that use stylized clump foliage (Maple, Oak, Birch, Elm, Dogwood, Azalea, Privet, Vine). It contains two groups: Seasonal Tint and Foliage Blending. Start with species defaults and adjust incrementally.

Seasonal Tint

Per-season color tinting with three controls for each season row:

Control Description
Color Target tint color for that season
Strength How strongly the tint is applied (0–1). 0 = no effect.
Blend Mode How the tint mixes with the base foliage color: Blend (gradual mix), Shift (recolors while preserving brightness), Lighten (brightens toward the tint color), Intensify (boosts saturation toward the tint)

Rows are shown for Spring, Summer, and Fall. A Winter row appears only for evergreen species. Each species comes with tuned defaults. Click Reset Defaults to restore the species presets.

Foliage Blending

Fine-tune how foliage cards blend together visually:

Parameter Description
Normals Controls the light/dark variations between foliage cards.
Depth Controls the front to back gradient through the canopy.
Interior Strength How dark the interior of the canopy appears relative to the outer surface.
Bottom Spread How far the darker base color extends up from the bottom of the canopy.
Top Spread How far the lighter top color extends down from the crown.
Blend Factor Overall blending intensity between card colors and the height gradient.

Click Reset Defaults to restore species presets.

8. Snow System

Snow is tied to the seasonal system: full coverage in Winter, none in other seasons. Arborist uses two different snow rendering techniques depending on the species type, and a physics-inspired branch droop simulation for all species.

Geometric Snow (Conifers)

Conifer species (Fir, Blue Spruce) keep their foliage in winter, so snow accumulates as a 3D volumetric mesh. Arborist analyzes the branch structure, builds up snow density where branches overlap, smooths it into organic shapes, and extracts a snow surface mesh. The result is realistic snow caps, ledges, and accumulations that follow the branch structure.

The shader-based snow effect is automatically disabled on bark and leaf materials to prevent double-coverage.

Shader Snow (Deciduous)

Deciduous species (Maple, Oak, Birch, Elm, Dogwood, Azalea, Privet) are bare or sparse in winter, so snow is applied as a shader effect on bark and remaining leaves. The shader uses a coverage threshold based on surface angle: surfaces facing upward receive snow first, and higher coverage values expand the effect to steeper angles. Vine also uses shader snow rather than geometric snow.

Snow Sag

Snow sag simulates the weight of accumulated snow causing branches to droop. The effect is most pronounced at branch tips, where thin branches sag more than thick ones near the trunk.

9. Pruning Tools

Arborist includes three pruning tools for sculpting your trees. The tools appear as palette buttons in the bottom-left of the 3D preview. Only one tool can be active at a time; selecting one deactivates the others. Click the active tool again to disable it.

Which tools are available depends on the species:

Prune markers are stored in the tree definition and persist across exports. They are cleared when you click Randomize Randomize to start fresh.

Clippers Clippers

Click on any branch to prune it. Everything above the click point is removed, including all child branches and foliage. Use clippers to remove unwanted branches, open up the interior, or create an asymmetric silhouette.

When active, the Clippers button is highlighted red.

Hedge Trimmers Hedge Trimmers

Drag a line across the preview to define a trim plane. All branches on the opposite side of the line from the trunk base are removed. This is ideal for creating flat tops, vertical edges, or angled cuts on Topiary shapes.

When active, the Hedge Trimmers button is highlighted green.

Rect Trimmer Rect Trimmer

Drag a rectangle in the preview. All branch nodes inside the rectangle are removed using a cookie-cutter approach: only the nodes within the rectangle are deleted, while their children are re-parented to survive on the other side. Branches passing through the rectangle continue beyond it.

This produces cut-outs, notches, and shaped openings that hedge trimmers can’t achieve. When active, the Rect Trimmer button is highlighted cyan.

Combine Hedge Trimmers for broad shaping with Rect Trimmer for fine detail. Flatten the top with a horizontal trim, then use rect cuts to carve windows or arch shapes.

10. Exporting Prefabs

Click the Export button to generate a complete prefab you can place in any scene. The export dialog lets you choose a folder and name. Export is also the way you save your work: the tree definition is embedded inside the prefab, so you can reload it later for further editing.

Export Structure

Each export creates a named subdirectory at your chosen location:

YourFolder/Oak_1/
  Oak_1.prefab              <-- Drag this into your scene
  Oak_1_LOD0_Mesh.asset     Full-detail mesh
  Oak_1_LOD1_Mesh.asset     Simplified mesh (halved detail)
  Oak_1_Billboard_Mesh.asset  Cross billboard (two quads at 90°)
  Oak_1_Billboard.png       1024x512 atlas (front + side renders)
  Oak_1_Billboard.mat       Billboard shader material
  Oak_1_Bark.mat            Bark material with baked species color
  Oak_1_Leaf.mat            Leaf material with baked seasonal color

The prefab includes an LODGroup component pre-configured with three levels, an ArboristTree component, and an embedded TreeDefinition stored as a hidden sub-asset inside the prefab. This embedded definition lets you reload the prefab into the editor and keep editing. All your parameters, prune markers, and species settings travel with the prefab.

LOD System

Exported prefabs use a 3-level LOD system that automatically switches based on screen size. Thresholds are per-species. Conifers transition to LOD1 earlier because their dense needle geometry benefits from simplification at greater distances:

LOD Default Conifers (Fir, Blue Spruce) Content
LOD0 > 50% > 40% Full mesh, identical to the preview mesh with all geometry detail
LOD1 50% → 10% 40% → 10% Simplified mesh with roughly half the geometry and per-species foliage optimizations
LOD2 10% → 1% 10% → 1% Cross billboard, two textured quads at 90° using an auto-generated front+side atlas
Culled < 1% < 1% Not rendered

LOD1 reduces the foliage to fewer, larger elements while preserving the overall silhouette. The billboard atlas is auto-generated at export time from the LOD1 mesh.

Materials are baked at export time with the current species bark color, grain pattern, seasonal leaf color, and snow properties. This means each exported prefab captures the exact look you see in the preview.

Seasonal Export

Arborist can export a single prefab that contains multiple season variants, switchable at runtime. When you export with the seasonal option, the prefab includes a child container for each selected season. Only one season is active at a time. The others are deactivated GameObjects with separate meshes and materials.

Runtime Components

ArboristTree is automatically added to every exported prefab. It stores the embedded tree definition, LOD configuration, and (for seasonal prefabs) the list of season variants. You do not need to add this component manually; it is created during export. Its only user-facing field is Group ID, which lets you target season changes to specific groups of trees (0 = default group, affects all trees).

Switching Seasons

For no-code control, add an ArboristSeason component to a GameObject in your scene. Set the Season and optionally assign a lawn material for ground color updates. Changes take effect on scene start and whenever you modify the fields.

For scripting control, use the ArboristTree.SetSeason() static method:

// Switch all trees to fall
ArboristTree.SetSeason(Season.Fall);

// Switch only trees in group 2
ArboristTree.SetSeason(Season.Winter, 2);

Or use the ArboristSeason component’s instance method to switch trees and lawn material together:

seasonController.SetSeason(Season.Winter);
Seasonal prefabs are ideal for games with time-of-year progression. Export one prefab per tree design, then switch the entire forest between seasons with a single call. Use ArboristSeason for the simplest setup, or ArboristTree.SetSeason() for full scripting control.

LOD Cross-Fade

LOD transitions use smooth cross-fading between levels. As the camera moves, the outgoing LOD gradually fades out while the incoming LOD fades in. Every pixel is always covered by exactly one LOD, so there is no visibility gap or popping.

Both the leaf shader and billboard shader support cross-fading. The transition zone is wide (50% of the LOD range) for gradual blending that is difficult to notice during normal gameplay.

Re-Export from Inspector

When you select an Arborist prefab in the Project window, the Inspector shows two convenience buttons on the ArboristTree component:

Re-Export is handy for rebuilding prefabs without opening the full editor, for example after adjusting your render pipeline settings or updating the package.

11. Tree Stamp

The Tree Stamp tool lets you scatter groups of exported tree prefabs onto terrain with a single click. Instead of placing trees one at a time, you define a stamp configuration (which prefabs, how large an area, how dense) and click in the Scene View to instantly populate a circular patch. Each placed group can be adjusted afterwards by dragging a radius handle or randomizing the layout.

Creating a Stamp Asset

Tree Stamp inspector

Create a Tree Stamp asset from the Project window:

  1. Right-click in the Project window
  2. Select Create → Arborist → Tree Stamp
  3. Name the asset (e.g. Pine, MixedForest)

Select the new asset to configure it in the Inspector:

Property Description Default
Prefabs List of tree prefabs to scatter. A random prefab is picked for each placement point. Add exported Arborist prefabs or any other GameObjects. (empty)
Radius Stamp disc radius in meters (1–100). 10
Density Scatter density (0.01–1.0). Higher values place more trees per stamp. At density 1.0 with radius 10 m, each stamp places approximately 20 trees. 0.25
Surface Layers Layer mask controlling which surfaces receive trees. Only colliders on these layers are hit when raycasting for ground positions. Everything
Scale Min / Max Uniform scale range applied to each placed tree (0.1–3.0). Each tree gets a random scale between these bounds for natural size variation. 0.8 / 1.2
Add multiple prefab species to the list for mixed forests. The stamp picks randomly from the list for each tree, so a list with one Maple and two Pine prefabs will produce roughly one-third Maple and two-thirds Pine.

Included Stamps

Arborist ships with four ready-to-use stamp assets in the Stamps/ folder:

Stamp Species Description
Pine Blue Spruce, Fir Evergreen conifer mix for alpine forests and winter scenes.
LeafColors Birch, Maple Deciduous trees with vivid fall foliage for autumn color.
Flowering Dogwood, Azalea Ornamental flowering trees for gardens and parks.
Shade Oak, Elm Large canopy trees for shade cover and streetscapes.

Placement Mode

With a Tree Stamp asset selected in the Inspector:

  1. Click the green Place button at the bottom of the Inspector. The button turns red and reads Stop Placing.
  2. Move the mouse over terrain in the Scene View. A terrain-conforming green disc follows the cursor, showing the stamp area. Yellow dots inside the disc preview where trees will be placed.
  3. Click to stamp. Trees are instantiated as children of a container GameObject named TreeStamp_<AssetName>. Each click produces a different arrangement automatically.
  4. Press Escape or click Stop Placing to exit placement mode.

The disc conforms to the terrain surface, draping over hills and valleys. Trees are placed by raycasting downward onto the surfaces matching your Surface Layers mask, so they snap to the ground automatically. Each tree receives a random Y rotation and a random uniform scale within your Min/Max range.

Editing a Placed Stamp

Select a TreeStamp_* container in the Hierarchy to edit it. A green disc and a cyan arrow handle appear in the Scene View. The handle extends from the left side of the disc, opposite the transform gizmo. Drag the cyan handle outward to increase the radius or inward to shrink it. When you release, the trees regenerate to fill the new area.

Inspector Controls

Control Description
Source Stamp Read-only reference to the Tree Stamp asset used for this placement.
Radius Slider (1–100 m) to adjust the scatter radius. Regenerates trees when the value changes.
Height Filter Toggle to enable height-based filtering. When enabled, only positions within the Min Height and Max Height world-Y range receive trees. Useful for keeping trees off cliffs, water, or elevated areas.
Randomize Randomizes the placement seed and regenerates, producing a completely new arrangement.

All changes support Undo (Ctrl+Z / Cmd+Z). Adjusting the radius, randomizing, or regenerating can all be reverted to restore the previous tree positions.

Height Filter is per-placement, not per-asset. This lets you use the same stamp configuration across different terrain while adjusting height constraints to match each site.

12. API Reference

Arborist exposes a small scripting API for runtime season switching. All public types live in the r2rgames.Arborist namespace.

Season Enum

Enum Values Description
Season Spring (0), Summer (1), Fall (2), Winter (3) The four calendar seasons

ArboristTree

ArboristTree is a MonoBehaviour automatically added to every exported prefab. It stores the embedded tree definition and handles season variant switching for seasonal prefabs. You do not add this component manually - the export process creates it.

Static Methods

Method Description
static void SetSeason(Season season) Broadcast a season change to all seasonal trees in group 0 (the default group)
static void SetSeason(Season season, int groupId) Broadcast a season change to trees in a specific group only

Season changes are delivered via a static event. Only trees that were exported with multiple season variants respond - single-season prefabs ignore the broadcast.

Inspector Fields

Field Type Description
groupId int Target group for season broadcasts. 0 = default group (receives ungrouped broadcasts). Set different IDs to switch groups of trees independently.

Read-Only Metadata

These fields are set at export time and marked [HideInInspector]. They are available for advanced use cases like reading which species a prefab was built from or querying its LOD thresholds.

Field Type Description
embeddedDefinition TreeDefinition Snapshot of the full tree definition at export time. Used by the editor for re-generation.
growthStage float Growth stage at export (0-1). Used for re-generation at the same maturity.
seasonKeys Season[] Season keys matching child GameObjects in the seasonal hierarchy
activeSeasonIndex int Index of the currently active season child
lodScreenHeights float[] Per-LOD screen height thresholds for LODGroup reconfiguration on season switch

ArboristSeason

ArboristSeason is a MonoBehaviour you add to a GameObject in your scene to control seasons without writing code. On startup it broadcasts its current season to all matching trees, updates the assigned lawn material (mottling, dry patches, snow coverage), and fires the static OnSeasonChanged event. You can also call its methods from scripts for programmatic control.

Methods

Method Description
void Broadcast() Broadcast the current season to matching trees, update lawn material, and fire OnSeasonChanged
void SetSeason(Season season) Change season, then broadcast immediately
void ApplyLawn() Update the lawn material only, without broadcasting to trees
void ApplySkybox() Assign the current season’s skybox material to RenderSettings.skybox
void ApplyParticles() Activate the current season’s particle effect and deactivate the others
void ApplyWind() Push wind strength, direction, and flutter to global shader uniforms and fire OnWindChanged

Events

Event Type Description
static OnSeasonChanged Action<Season> Fired on every broadcast with the current season. Subscribe from any MonoBehaviour to react to season changes (see ArboristGrassSeason for an example).
static OnWindChanged Action<WindState> Fired when wind parameters change. WindState contains strength, directionAngle, leafFlutter, and a computed DirectionVector.

Inspector Fields

Field Type Default Description
season Season Summer Season to apply to trees and lawn
groupId int 0 Target group ID. 0 broadcasts to all trees.

Wind

Field Type Default Description
enableWind bool true Global wind enable/disable
windStrength float (0–2) 0.5 Wind intensity. 0 = calm, 1 = normal, 2 = storm. Scales both branch sway and leaf flutter. Automatically attenuated to 25% during winter.
windDirection float (0–360) 0 Wind direction angle in degrees (0 = +X, 90 = +Z)
leafFlutter float (0–2) 1 Leaf flutter multiplier, scaled by wind strength

Skybox Materials

Assign up to four skybox materials, one per season. ArboristSeason automatically sets RenderSettings.skybox when the season changes. Leave any slot empty to keep the current skybox for that season.

Field Type Description
skyboxWinter Material Skybox material for winter
skyboxSpring Material Skybox material for spring
skyboxSummer Material Skybox material for summer
skyboxFall Material Skybox material for fall

Seasonal Particle Effects

Assign GameObjects containing particle systems for seasonal atmosphere effects (snow flurries, falling leaves, pollen, etc.). ArboristSeason activates the matching season’s particle object and deactivates the others on each broadcast.

Field Type Description
particlesWinter GameObject Winter particle effect (e.g., blowing snow)
particlesSpring GameObject Spring particle effect (e.g., pollen)
particlesSummer GameObject Summer particle effect (e.g., butterflies)
particlesFall GameObject Fall particle effect (e.g., falling leaves)

Arborist ships with four ready-to-use particle effect prefabs at Assets/R2RGames/Arborist/Prefabs/:

Prefab Season Effect
BlowingSnow Winter Drifting snow flurries
Pollen Spring Floating pollen particles
Butterflies Summer Animated butterfly sprites
FallingLeaves Fall Tumbling autumn leaves

To use them:

  1. Drag the prefabs from R2RGames/Arborist/Prefabs/ into your scene
  2. On your ArboristSeason component, assign each prefab instance to its matching particle slot (particlesWinter, particlesSpring, particlesSummer, particlesFall)
  3. ArboristSeason will automatically activate the current season’s particle effect and deactivate the others whenever the season changes

Lawn Material

Field Type Default Description
lawnMaterial Material - ArboristLawn material for ground color updates

Lawn Season Colors

Each season has a LawnSeasonColors keyframe that you can customize in the Inspector. ArboristSeason applies the matching keyframe to the lawn material on each broadcast.

Field Type Description
lawnPrimary Color Lawn primary mottling color
lawnSecondary Color Lawn secondary mottling color
dryAmount float (0-1) Brown dry patch intensity
snowAmount float (0-1) Snow coverage amount

Four keyframes are exposed in the Inspector: winter, spring, summer, and fall. Each is a LawnSeasonColors struct with the fields above.

ArboristGrassSeason (Sample)

ArboristGrassSeason is a sample MonoBehaviour that listens for season changes and updates grass blade colors for the demo scene. It manages the ArboristGrass and ArboristGrassInstanced shader materials. In the demo scene it lives on the same GameObject as ArboristSeason.

Use it as-is for the included grass shaders, or as a starting point for wiring your own terrain or vegetation shaders into the season system.

Subscribing to OnSeasonChanged

The OnSeasonChanged event on ArboristSeason fires on every broadcast with the current Season. Any MonoBehaviour can subscribe:

void OnEnable()
{
    ArboristSeason.OnSeasonChanged += OnSeasonChanged;
}

void OnDisable()
{
    ArboristSeason.OnSeasonChanged -= OnSeasonChanged;
}

void OnSeasonChanged(Season season)
{
    // Update your materials, shaders, or other systems here
}

ArboristGrassSeason follows exactly this pattern. It picks the matching GrassSeasonColors keyframe for the current season and applies it to both assigned materials.

Inspector Fields

Field Type Default Description
bladeMaterial Material - ArboristGrass material for blade color updates
instancedGrassMaterial Material - ArboristGrassInstanced material for GPU grass color updates

Grass Season Colors

Field Type Description
bladeBase Color Grass blade root color
bladeTip Color Grass blade tip color
The demo scene uses ArboristGrassSeason to update grass materials alongside the ArboristSeason controller. If you have your own grass or terrain shaders, create a similar MonoBehaviour that subscribes to ArboristSeason.OnSeasonChanged and applies your own seasonal color logic.

Code Examples

using r2rgames.Arborist;

// Switch all trees to fall
ArboristTree.SetSeason(Season.Fall);

// Switch only trees in group 2 to winter
ArboristTree.SetSeason(Season.Winter, 2);
// Use ArboristSeason from script
var controller = GetComponent<ArboristSeason>();
controller.SetSeason(Season.Winter);
// Read tree metadata
var tree = GetComponent<ArboristTree>();
string species = tree.embeddedDefinition.species.ToString();
float maturity = tree.growthStage;

13. Troubleshooting

Tree appears flat or has a lean to one side

Cause: Light Pitch is set below 90°, which introduces a directional growth bias through the phototropism system even when Phototropism Strength is 0.

Solution: Set Light Pitch to 90 (directly overhead). Most species presets do this by default.If you’ve changed Light Pitch manually for a non-Vine species, reset it to 90 to eliminate the lean.

I want to change the tree colors but don't see how

Solution: Open the Advanced foldout in the inspector. The Seasonal Tint section lets you set a color, strength, and blend mode for each season. The Foliage Blending section controls how light and dark the foliage appears and how colors vary across the canopy. Each species ships with tuned defaults; click Reset Defaults to restore them if you want to start over.

Foliage looks too sparse

Cause: Foliage density is too low, or the season is set to a low-density state (spring or fall).

Solution:

  1. Check the Season: set to Summer for maximum density
  2. Increase Foliage Density in the inspector
  3. Enable Fronds if not already active (adds middle-layer fill for conifer species)

Topiary foliage has gaps at small crown sizes

Cause: The foliage shell is generated from the branch structure. Very small crown dimensions may not have enough branches to fill the entire surface.

Solution: Keep crown dimensions at or above the default values. The foliage shell is typically around 2,400 triangles, so there’s no performance benefit to shrinking the crown.

Snow doesn’t appear on my tree

Cause: Snow is season-driven and only appears in Winter.

Solution:

  1. Set Season to Winter
  2. Ensure Enable Snow is checked in the Effects section
  3. Set Snow Coverage above 0

Exported prefab looks different from the preview

Cause: The exported materials are baked with the current settings at export time. LOD1 also uses per-species foliage optimizations that may differ slightly from LOD0.

Solution: Make sure the Season and all parameters are set to your desired values before exporting. The preview shows exactly what will be baked into LOD0. If a prefab looks outdated after changing project settings, use the Re-Export Prefab button on its ArboristTree component to rebuild it in-place.


If you have questions, issues, or comments, please send email to support@r2rgames.com

14. FAQ

Which render pipelines are supported?

Arborist works with both URP (Universal Render Pipeline) and the Built-in render pipeline. Each shader supports both pipelines, so the correct one is selected automatically based on your project’s pipeline. No manual configuration is needed.

What Unity versions are supported?

Unity 2022.3 LTS and newer, including Unity 6.0+.

Can I export the same tree at different seasons?

Yes, two ways. For static scenes, export the same tree at different seasons with different names. Each prefab bakes that season’s colors into its materials. For dynamic seasons, use the seasonal export option to create a single prefab containing all season variants. Then call ArboristTree.SetSeason() at runtime to switch the entire scene between seasons. See Seasonal Export for details.

How do I create variations of the same tree?

Click the Randomize (Randomize) button to change the seed. Each seed produces a unique branching pattern while keeping the same species character and parameters. Export each variation with a different name.

Can I edit the exported prefab?

Yes. Select any Arborist prefab and click Edit in Arborist on the ArboristTree component to reopen it in the editor. Your full tree definition (species, parameters, prune markers) is embedded inside the prefab. Make changes, then Export again to update. You can also click Re-Export Prefab to regenerate the prefab in-place without opening the editor. The exported materials are standard Unity assets that you can also modify directly in the Inspector.

Why do some parameters not appear for certain species?

The inspector adapts to each species. For example, Snow Sag only appears for conifers, Branch Detail only for species where it applies, and Topiary Shape only for the Topiary species. This keeps the UI focused on the parameters that matter for your current tree.

How many triangles do exported trees use?

Triangle count varies by species, density, and detail level. A typical tree at High detail ranges from 5,000 to 10,000 triangles for LOD0. The statistics overlay in the preview shows the exact count. LOD1 is roughly a third of LOD0, and LOD2 (billboard) is 4 triangles.

Can I use Arborist trees at runtime to generate procedurally?

Tree generation is editor-time only. You design and export prefabs in the editor, then place them in your scenes. However, runtime season switching is fully supported via seasonal prefabs and the ArboristTree.SetSeason() API (see Seasonal Export).

Can I add my own species?

Each species is defined by a profile class that controls its branching behavior, bark, foliage, and seasonal colors. The system is extensible for developers comfortable with C#, but custom species are not officially supported through the editor UI.

What is the Vine substrate? Is it included in the prefab?

The substrate (Box, Cylinder, or Wall) defines the surface that vines grow along. It appears as a wireframe in the preview for reference, but is not included in the exported prefab. You position the vine prefab over your own scene geometry: a column, wall, or any other mesh.


If you have questions, issues, or comments, please send email to support@r2rgames.com

15. Version History

2.0.0

1.1.0

1.0.0