← All namespaces

water

Scene, level & world Experimental

UE Water plugin bodies (river, lake, ocean) and zones. Requires the Water plugin.

What it's for

This namespace spawns and configures the actors from Unreal's Water plugin: rivers, lakes, oceans, custom bodies, and the water zones they render inside. Your assistant can lay down a body, point it at the right surface and underwater materials, and tune its underwater post-process, all without you opening a single detail panel.

Use it when you are building or dressing a level that needs water. A typical flow is to drop a water zone first (at least one is required for water to render and for underwater post-process to work), spawn the body you want, then set its materials. Spline-based bodies (rivers, lakes, custom) get their shape from a spline: after spawning, the shape is authored point by point through the spline namespace against the body's WaterSpline component, which is why there is no spline-points parameter here.

Reach for water specifically for Water plugin bodies and zones. Spline-point authoring on a body belongs to spline, and shoreline blending with terrain belongs to landscape. The river-to-lake and river-to-ocean transition material channels only apply to river actors; passing them to a lake, ocean, or custom body is rejected.

This area is experimental and still improving. The handlers work, but the surface may change as the Water integration matures, and some Water features (mesh tessellation, weightmaps, Gerstner wave authoring) are not exposed yet.

Examples

Add a river to a level

The assistant drops a water zone so water can render, then spawns the river body inside it.

You: Add a water zone and a river running through the valley.

  call("water.spawn_water_zone", {name:"MainWaterZone", location:{x:0, y:0, z:0}, extent:{x:80000, y:80000}})
    → {actorName:"MainWaterZone"}
  call("water.spawn_water_body", {type:"River", name:"ValleyRiver", location:{x:1200, y:-400, z:50}})
    → {actorName:"ValleyRiver", actorPath:"...", className:"AWaterBodyRiver"}

Done. Water zone and ValleyRiver added; author the course next via spline.set_spline_point_position.

Set the surface and underwater materials on a lake

The assistant points the lake's water body component at your chosen materials in one call.

You: Give the lake our stylized water surface and the murky underwater look.

  call("water.set_water_body_material", {actor:"MountainLake", waterMaterial:"/Game/Water/M_StylizedWater", underwaterMaterial:"/Game/Water/M_MurkyUnderwater"})
    → {ok:true}

Done. MountainLake now uses M_StylizedWater on the surface and M_MurkyUnderwater underwater.

Wire up underwater post-process

The assistant sets the underwater post-process material and tunes a couple of its settings fields.

You: On the ocean, add the underwater post-process and turn up the fog when submerged.

  call("water.set_water_body_underwater_post_process", {actor:"Ocean", postProcessMaterial:"/Game/Water/M_UnderwaterPP", settings:{bEnabled:true}})
    → {ok:true}

Done. Ocean underwater post-process wired up with M_UnderwaterPP.

← Back to all namespaces