Vixen
caa30e12
csharp
public struct WaterZoneComponent

What a scene says about a region's water: how big the window is, and at what rate.

Read the guide page for this →

Remarks

[35 § D3](../../docs/plan/35-water.md#d3-the-water-info-texture-is-the-interchange-and-it-is-a-zone-render) and § "What the scene sees". One zone per region, a plain entity in the hierarchy with a transform, duplicated and prefabbed like anything else.

⚠ A zone must exist or nothing renders, which is Unreal's rule and is worth keeping for the same reason: the field is the interchange every consumer reads, and a body with no zone is a body nothing has rasterised. What is not kept is discovering that from a blank frame — ZonelessBodies is a number an author can look at.

The window is centred on the view rather than on this entity, and so is what the zone claims. Doc 35 makes the window a sliding one for exactly the reason Unreal added local tessellation in 5.3 — a fixed-extent version does not survive an open world — and a claim staked to the entity's own position would be that fixed-extent version by another name: one zone would cover 512 metres of world forever, however far the camera walked. So a body is claimed the frame the sliding window reaches it, the entity's transform places the zone in the hierarchy for prefabs and duplication, and neither the texels nor the claim read it.

Fields and properties (10)

  • public float Extent

    How wide and deep the window is, in metres.

  • public int Resolution

    How many texels along each axis.

  • public WaterInfoPrecision Precision

    How many bits a channel of the info texture carries.

  • public float ScrollThreshold

    How far the view may move before the window is re-rasterised, as a fraction.

  • public float CoarsestTexel

    How many metres a texel of the coarsest thing reading the field covers.

  • public WaterWaveSpectrum Waves

    The sea state every body in this zone is summed from.

  • public float AttenuationDepth

    How the sea state falls off as the ground rises, in metres of depth.

  • public string WaveAsset

    Which .vxwaves the sea state comes from, or empty for the inline one.

  • public static WaterZoneComponent Default

    A 512-metre window at two metres a texel, over an open sea.

  • public readonly WaterZone Zone

    This component as the kernel's own description.

Used by (17)

  • ComponentRegistrationVixen.Rendering.Water
  • TypeRegistrationVixen.Rendering.Water
  • UnderwaterPassTestsVixen.Rendering.Water.Tests
  • Vixen_Rendering_Water_WaterZoneComponentSerializerVixen.Rendering.Water
  • WaterDebugDrawTestsVixen.Rendering.Water.Tests
  • WaterHorizonImageTestsVixen.Graphics.Golden.Tests
  • WaterMeshRendererVixen.Rendering.Water
  • WaterZoneSystemVixen.Rendering.Water
  • WaterZoneSystemTestsVixen.Rendering.Water.Tests
  • EditorApplicationVixen.Editor.App
  • MaterialIconsVixen.Editor.App
  • SceneWaterComponentTestsVixen.Editor.Assets.Tests
  • WaterEditTestsVixen.Editor.Water.Tests
  • WaterModeVixen.Editor.Water
  • WaterPresenterVixen.Editor.App
  • WaterSceneRunsTestsVixen.Editor.Assets.Tests
  • WaterZoneSettingsVixen.Editor.Water