Vixen
02b45cc4
csharp
public static class TerrainSpline

Roads, rivers and paths: a spline that deforms the terrain, paints along its width and places meshes along its length.

Read the guide page for this →

Remarks

[docs/plan/31 § T8]'s terrain half. Three operations over one curve, and all three are re-runnable: the deformation goes into a reserved Splines layer that is regenerated wholesale, the painting goes into the weightmap through the same redistribution every brush uses, and the mesh placement returns a list rather than writing one.

⚠ The deformation is non-destructive because of where it goes, not because of what it does. [§ D4]'s reserved layer is the whole mechanism: moving the road, changing its width or deleting it re-runs into the same layer and the author's own sculpting underneath is untouched. A road written into the base heightfield is a road that can never be moved.

⚠ Every sample within reach is visited once, from the curve's own bounding box. The alternative — walking the curve and stamping a brush at intervals — double-counts wherever two stamps overlap, which on a tight bend is most of the inside of the corner. A road stamped that way is deeper round its corners than along its straights.

Fields and properties (1)

  • public const float LocateStep

    How many metres apart the deformation samples the curve when locating a point.

Methods (6)

Used by (2)

  • TerrainSplineTestsVixen.Terrain.Tests
  • TerrainModuleVixen.Editor.Terrain