Vixen
02b45cc4
csharp
public static class FoliageGrowth

The offline ecology: seeds sown, aged, spread, shaded out and displaced.

Read the guide page for this →

Remarks

[docs/plan/31 § T9], which is Unreal's procedural foliage tool. A region is sown at each species' seed density; every step, plants age, mature ones drop seeds within their spread distance, and each new seed is tested against the ground, the blocking volumes, the plants already there and the canopy over it. What is left reads as a forest — clumped where a parent stood, thinned under shade, cleared where a volume says.

⚠ The output is a volume of its own, and that is [§ D4]'s reserved layer in this kernel's vocabulary. A simulation is re-runnable, which means it regenerates its instances wholesale — so it cannot share a container with the ones an artist placed by hand, or re-rolling the seed would delete an afternoon's work. The destination is cleared and refilled; the scene's own volume is never touched.

⚠ Deterministic from the stated seed, and never from an iteration order. A plant's identity is hashed at birth from its parent's identity and the seed index, so it does not move when the plants around it change; and each step's candidates are resolved in hash order rather than in the order they were generated, because which of two overlapping seeds wins must not depend on which parent was walked first.

⚠ Shade is cast by the canopy, which grows. A seed under a sapling survives and the same seed under the grown tree does not — see ShadeAt. A simulation that shaded from the mature radius produces one tree per shade radius, evenly spaced, everywhere, which is the failure that makes a procedural forest read as procedural.

Fields and properties (4)

  • public const int SowXStream

    The stream a sown seed's position along X is drawn from.

  • public const int SowZStream

    And along Z.

  • public const int BearingStream

    The stream a dropped seed's bearing from its parent is drawn from.

  • public const int SpreadStream

    And its distance.

Methods (1)

Used by (3)

  • FoliageBlockerTestsVixen.Rendering.Terrain.Tests
  • FoliageGrowthTestsVixen.Foliage.Tests
  • TerrainModuleVixen.Editor.Terrain