Tidal 2 URP

Volumes and Cross-Sections

What it is

A volume is a shape that changes where water exists:

ModeEffect
ExcludeNo water inside (boat interiors, caves, a dry room)
IncludeWater only inside (a pool or tank cut from an ocean body)
DampingCalm waves inside
NoneInactive

Shapes: TidalVolumeAnalytic (Cube, Sphere, Cylinder - size is the transform’s scale) and TidalVolumeSDF (any mesh, baked to a 3D signed-distance texture). Clip Visual decides what a cut looks like: Clip Only, Cross Section (shows the water column with fog on the cut face, like an aquarium wall), or Show Water Under.

Perspective camera required for cut-aways: In v2.2, orthographic cameras and Scene view Iso mode show the water surface, but not bounded-body sides or volume cross-sections. Switch to Perspective to view the water through a cut face.

How to add it

GameObject > Tidal 2 > Volume > Cube / Sphere / Cylinder / SDF (Mesh). Scale it to the area, pick the Mode. For SDF, assign a Source Renderer (with a MeshFilter) and bake.

In the editor

Analytic volume inspector

Screenshot: Tidal Volume Analytic with the banner. Volume - Mode Exclude, Clip Visual Clip Only, Feather 0.02. Shape - Analytic Type Cube. Affects - Layers Water, Only These Bodies (0).

SDF volume inspector

Screenshot: Tidal Volume SDF on the Island demo’s pirate sloop. Volume - Mode Exclude, Clip Visual Clip Only, Feather 0.001. Shape - Source Renderer WaterMask_Proxy (a simple hull mesh), SDF CorsairSloop_HullSDF, Resolution 1, a Regenerate SDF button and the bake size “44x40x128 0.43 MB (212 tris)”. Affects - Layers Water, Only These Bodies (0). Preview - Show In Scene (on), Scale/Offset fields, view buttons Volume | Slice | SDF, and a 3D preview of the baked hull shape coloured by distance (orange at the top edge through green to blue), with “44 x 40 x 128 RHalf - drag to orbit, scroll to zoom”.

Show In Scene draws the baked shape on the object in the Scene view as a red-tinted gizmo:

Island pirate sloop selected in the Scene view

Screenshot (Scene view, Demo_Island): the pirate sloop playerShip selected, sitting in a shallow lagoon beside a sandy island with a wooden jetty. Its hull is tinted red/orange - the TidalVolumeSDF gizmo showing the baked hull shape that keeps water out of the boat - inside a cyan wire box (the volume’s bounds). Thin wire ellipses around the hull are the wake emitter gizmos, and a small yellow sphere marks a float point.

Exclude volume cutting the ocean

Screenshot: the Scene view: a selected cube volume drawn as a cyan wire box sitting on the ocean; inside it the water surface is cut away, leaving a flat brown-shaded square where the water was removed.

Cross-section in play mode

Screenshot (Game view, Demo_ManyBodies): a side-on view of a bounded body of turquoise water seen through its cut face: the wavy surface line runs across the upper part of the image with sky above and clear teal water below, like looking into an aquarium.

Indoor pools

Screenshot (Game view, Demo_IndoorPool): an orange tiled floor in a grid-walled hall with three rectangular pools cut into it; each pool holds green glowing water lit by an underwater light. Each pool is its own bounded body.

Settings

FieldMeaning
ModeExclude / Include / Damping / None
Clip VisualClip Only, Cross Section, Show Water Under
FeatherClip edge softness (m), default 0.02
DampingDamping mode: 1 = untouched, lower = calmer
Only These BodiesNon-empty = exclusive scope

Floating objects should list their own hull volume in TidalBuoyancy.IgnoreVolumes.

Scripting

var vol = hull.AddComponent<TidalVolumeAnalytic>();
vol.AnalyticType = TidalVolumeAnalyticTypes.Cube;
vol.Flags = TidalVolumeFlags.EXCLUDE;            // INCLUDE, DAMPEN, NONE
vol.ClipVisual = TidalClipVisuals.CROSS_SECTION;
vol.AffectedBodies = new List<TidalWaterBody> { body };
bool hits = vol.Affects(body);

Common issues

SymptomCauseFix
Boat floats on its own interiorVolume seen by buoyancyAdd to Ignore Volumes
Water still inside the hullVolume too small / wrong ModeEnclose fully; Mode Exclude
SDF volume does nothingNot bakedAssign Source Renderer and bake
Hard jagged cut edgeFeather 0Raise Feather slightly
Affects another bodyScope emptyFill Only These Bodies