Vixen
02b45cc4
csharp
public sealed class TerrainBrushSettings

The brush section of the terrain panel.

Read the guide page for this →

Remarks

One section, shared by every tool in both modes — [docs/plan/31 § D12]. Sculpt strength, paint weight and foliage density over a falloff are the same function applied to different targets, so a soft edge sculpted at strength 0.3 and a soft edge painted at strength 0.3 are the same shape. Unreal implements them three times and they are not.

⚠ A mutable settings object beside the immutable brush, rather than a mutable brush. TerrainBrush is a readonly record struct because a stamp has to be the same brush from the first sample of a stroke to the last — a tool that read a live object would change radius halfway through a drag if the panel moved, and the stroke's undo record is sized to a footprint that no longer matches. So this is what the panel edits and ToBrush is what a stroke is begun with, once.

⚠ The radius is in metres and the spacing is a fraction of it. Making both distances would mean that turning the radius up thinned the stroke out until it was a row of discs; Unity and every paint application spell it this way for that reason.

Fields and properties (15)

  • public float Radius

    How far the brush reaches, in metres.

  • public float Strength

    How hard it presses, 0…1.

  • public float Falloff

    What fraction of the radius is falloff rather than plateau.

  • public BrushFalloffKind Curve

    Which falloff curve.

  • public BrushShape Shape

    What footprint the brush has.

  • public float Spacing

    How far apart stamps are along a stroke, as a fraction of the radius.

  • public BrushRotation Rotation

    How the stamps are turned.

  • public float Angle

    The brush's own angle, in degrees.

  • public float PatternScale

    How many metres of world one tile of a pattern mask covers.

  • public bool IsAngled

    Whether the angle applies, which it does only for a brush that is turned by hand.

  • public bool IsPatterned

    Whether the pattern scale applies.

  • public const float MinimumRadius

    The smallest radius the panel offers, in metres.

  • public const float MaximumRadius

    And the largest.

  • public const float SizeStep

    How much one press of the size keys changes the radius, as a fraction.

  • public const float StrengthStep

    And how much one press of the strength keys changes it.

Methods (3)

  • public void Resize(int steps)

    Makes the brush bigger or smaller by one step.

  • public void Press(int steps)

    Presses harder or softer by one step.

  • public TerrainBrush ToBrush()

    The brush a stroke is begun with.

Used by (14)

  • BrushInspectorMarkupTestsVixen.Editor.Terrain.Tests
  • Describes_Vixen_Editor_Terrain_TerrainBrushSettingsVixen.Editor.Terrain
  • FoliageEditVixen.Editor.Terrain
  • FoliageModeVixen.Editor.Terrain
  • FoliageModeTestsVixen.Editor.Terrain.Tests
  • GroundVixen.Editor.Terrain.Tests
  • SculptSessionTestsVixen.Editor.Terrain.Tests
  • TerrainEditVixen.Editor.Terrain
  • TerrainEditTestsVixen.Editor.Terrain.Tests
  • TerrainModeVixen.Editor.Terrain
  • TerrainModeTestsVixen.Editor.Terrain.Tests
  • TerrainModuleVixen.Editor.Terrain
  • TerrainPaintModeTestsVixen.Editor.Terrain.Tests
  • TerrainPanelTestsVixen.Editor.Terrain.Tests