SDF Volumes
Arbitrary shapes from a baked 3D signed distance field.
TidalVolumeSDF defines a
volume of arbitrary shape from a baked 3D signed distance
field. Instead of a primitive, the volume samples a baked SDF texture that captures the
exact contour of a mesh - ideal for shapes an
analytic volume cannot describe.
- Shape comes from a baked 3D SDF texture.
- Shape always comes from the assigned Source Renderer.
- Used for hulls and interiors, including the Island demo's pirate sloop.
Baking the SDF
Assign a Source Renderer with a MeshFilter in the volume inspector, then press Regenerate SDF. Adjust Resolution to balance detail and texture memory. The preview shows the baked dimensions, memory size, Volume / Slice / SDF views, and the resulting hull shape.
LocalBounds and CrossSectionMesh were removed in v2.2; the source renderer determines the shape. The Example Submarine creation menu was also removed. Use a Cube volume set to Exclude for a simple dry interior.
In v2.2, orthographic cameras, including Scene view Iso mode, render the water surface but do not show bounded-body sides or volume cross-sections. Use a perspective camera for underwater cut-aways.
When to use SDF vs analytic
Use an SDF volume when the shape is arbitrary - boat hulls, ships, submarine interiors, or other irregular geometry. For anything that a cube, sphere, or cylinder can cover, prefer an analytic volume: it needs no bake step and gives exact per-fragment edges.
Use an EXCLUDE SDF volume to keep water out of a boat hull. Add the hull volume to the boat's TidalBuoyancy.IgnoreVolumes list so the floater does not sample its own dry interior.