Leafshaper Docs
View all packages

Features

Materials, wind and seasons

Choose a texture style, set bark and leaves, light impostors in real time, and drive wind, seasons and snow.

Leafshaper 26.12.0Unity 6000.0+URP · HDRP · Built-in

Texture styles

In the imported Stylized Forest scene, choose Window > Leafshaper > Stylized Forest Controls, then select a look under Tree Style. Style changes preview every stock terrain prototype and preserve its seed and placements. The first selection of a new look prepares assets under Assets/Leafshaper Generated/Forest Styles. Choosing Cancel keeps the previous look, and choosing Original restores the imported trees.

Select a tree recipe in the Project window and choose Texture Style beneath the species name. All 23 species support the four looks, including ferns, reeds, shrubs, deadwood and cacti.

StyleSurface treatment
OriginalBalanced botanical bark and foliage palette with clean cutouts and dedicated normals.
Anime CelGrouped tones, crisp vein accents and broad bark shapes give the plant a cel-painted appearance.
Painted AdventureWarm and cool brush shapes give the crown and trunk a bold, hand-painted look.
NaturalisticNatural botanical variation, crisp leaf silhouettes, and high-relief bark with dedicated normals.

The same oak seed in all four texture styles, with foliage and bark close-ups rendered in Unity

The seed and branches stay fixed when you change styles. All four styles provide dedicated leaf cutouts and normal maps tailored to their palette and surface finish. Scene lighting still shades each plant across Built-in RP, URP, and HDRP, and season and snow settings still work. Choose Bake Prefab… for a new output or Rebake Prefab to update an existing project tree and its distant impostor. Bake Variants… uses the selected style for each seed.

Bark and leaves

A texture assigned in the Bark or Leaves tab overrides that individual map in every style. Clear the override to use the selected style’s map again. Set color textures to sRGB and import a tangent-space normal texture as Normal map. For leaf albedo, use an alpha channel with transparent background and keep Alpha Is Transparency enabled. Match the texture and atlas layout the recipe expects so the leaves attach near their painted twig bases.

Leaf atlas slots use UV-space coordinates measured from the lower-left. Keep the alpha silhouette inside each slot and leave transparent padding between neighboring slots, including at reduced mips. Set Attach to the normalized horizontal position of the twig on the slot’s bottom edge (0 at the left, 1 at the right). Preview a branch side-on to check the attachment. Rebake after changing textures or slot anchors so the prefab and impostors are updated.

In a baked leaf material, Diffuse Sky Fill controls how strongly the leaves pick up light from above. Light Through Leaves controls how the foliage responds to sunlight from behind it. To judge either setting, use a scene with a sky or light probe, a directional light and a shaded side of the tree in view. The intensity and softness of shadows cast on the ground come from the scene lighting.

Real-time lighting and impostors

Both close-up foliage cards (Leafshaper/Tree) and distant LOD tiers (Leafshaper/Tree Impostor octahedral impostors and billboards) evaluate scene illumination dynamically every frame rather than baking lighting into color maps:

  • Foliage cards (Leafshaper/Tree) store unlit base albedo, tangent-space normal maps, bent crown vertex normals, and crown openness (Color.a), so changing directional sun angles, shadows, real-time point/spot lights, sky reflections, and Adaptive Probe Volumes relight leaves live with silhouette-preserving wind and foliage translucency.
  • Octahedral impostors and far billboards (Leafshaper/Tree Impostor) bake unlit albedo, object-space surface normals, leaf masks, normalized depth and the order in which leaves fall (LeafshaperTreeImpostorBake). The atlas stores how much of each texel the crown covers, so a distant crown is as open as its mesh. At runtime, surface normals rotate with the tree transform, octahedral impostors reconstruct 3D surface world positions from baked depth for accurate shadow receiving and punctual attenuation, and shadow-caster quads lean back along the trunk so a low or high sun never slices across the sunlit crown front.
  • Pipeline parity spans Built-in RP (ForwardBase + ForwardAdd for dynamic point/spot lights), URP (Main Light + additional directional/punctual scatter and Adaptive Probe Volumes), and HDRP (multi-directional foliage scatter, volumetric fog, and screen-space exposure).

Wind

Create a directional Wind Zone and add Leafshaper > Tree Wind to a scene object. Assign that Wind Zone as Source, or keep both components on the same GameObject. Enter Play Mode and rotate the Wind Zone so its forward axis has a horizontal component. Its main strength and turbulence control branch movement and leaf flutter. Per-tree Branch Wind and Leaf Wind adjust the response baked into each tree's materials. Leafshaper uses the first active directional source for scene-wide shader settings, including when you load scenes additively.

Seasons and snow

Call TreeSeason.Set(year, snow) from your own runtime controller. The year wraps every 1.0. Use 0 for spring, 0.25 for summer, 0.5 for autumn and 0.75 for winter. Snow is an independent 0–1 control. The baked material's season and snow response settings allow different trees to react differently. In autumn and winter, deciduous trees drop whole leaf cards, so a crown thins card by card and never turns see-through.

csharp
using KiwiStudios.Trees;

TreeSeason.Set(0.75f, 0.6f);

Call TreeSeason.Clear() when your controller releases ownership of those globals. This resets Leafshaper to its regular material colors, full foliage, and dry surfaces. Use one season controller in a scene to avoid conflicting updates.

Still stuck?

Bring the recipe with you.

Include the Leafshaper, Unity and render-pipeline versions, the operating system and graphics API, the first Console error, the preset and seed, and the steps that reproduce the problem.

Email supportJoin Discord

Leafshaper 26.12.0

Search documentation