Tutorial: Baked River Simulations - Overview and Quick Start

Getting the same error if anyone has any answer pls let us know

@DevonPenney Hi, I’m trying to pack a project with ShallowWaterRiverActor, but when I start the game, the water is not visible. But the post-process is working , I think that the problem is in the baking material .
How can I solve this problem with the build (Development, Shipping is not working)?

@DevonPenney I place a ShallowWaterRiver, assign a WaterBodyRiver as the Source River Water Body, and press Reset then Bake. The simulation runs - it costs a solid chunk of frame time, so it is definitely executing - but it never produces any water. The riverbed stays visibly dry in Live Sim, in Baked Sim, and in Debug Render Bottom Contour. The bake confirms it numerically: Baked Shallow Water Simulation: Sparseness: 0.000000, i.e. zero allocated cells. What’s strange, sometimes it produces a rectangle of water which seems to ignore the landscape entirely.

In essence, I have seen two failure shapes, both wrong:

  1. Empty. This is the current behavior and it reproduces on a freshly placed actor. Sparseness 0.000000, nothing renders in any render state.
  2. Flooded. This happened on the same setup earlier, after a number of property changes. Sparseness 1.088435, so water allocated in over 100 percent of grid cells. The result was a flat horizontal slab filling the whole rectangular sim grid, clipped exactly at the actor bounds and completely ignoring the terrain: underground where the ground is high, spilling over the banks where it is low. Seen from below it is obviously a full grid slab rather than a river.

Both look like the simulation having no usable bottom contour.

Setup

  • UE 5.8.2, binary install, WaterAdvanced experimental plugin
  • World Partition map, 8 by 8 km, 256 LandscapeStreamingProxy actors, Nanite landscape
  • The landscape is rotated -90 degrees yaw. This is probably relevant. I already had to subclass AWaterBrushManager because it hard-codes its depth capture SceneCaptureComponent2D rotation and never composes it with the landscape rotation, and with the stock brush manager on a rotated landscape the water bodies carve nothing. ShallowWaterRiver builds its riverbed from an orthographic depth capture in much the same way, so I suspect the same class of problem.
  • WaterBodyRiver with 5 spline points, 415 m long, Depth 150 cm and RiverWidth 1900 to 2100 cm at every point
  • Freshly placed ShallowWaterRiver with that river assigned as Source River Water Body

Checked before baking, all fine

  • SourcePosArray has 1 entry on spline point 0, SourceSizeArray is (1900, 1000, 5595), SinkPosArray sits on the last spline point
  • The sim grid resolves to 147 by 512 at roughly 81 cm per cell over an 11843 by 41488 cm region, correctly centred on the spline
  • All five capture data interfaces are configured in Live Sim: Managed, SCS_SCENE_DEPTH, Orthographic, 512 by 512, ortho width 41488, with the landscape proxies in the ShowOnly list
  • Orthographic depth capture works fine in this project. A hand built SceneCapture2D at the same pose and ortho width, showing only those landscape proxies, returns 73 distinct depth values.

Tried, none of it made any difference, still Sparseness 0.000000

  • LandscapeStreamingProxy actors assigned to Bottom Contour Actors and Dilated Bottom Contour Actors, which is the fix from earlier in this thread
  • Match Spline off
  • Use Capture off
  • Sim Speed 10 down to 1
  • Scene Capture LOD Distance Factor 1.0 down to 0.1
  • Bottom Contour Landscape Actors trimmed from all 257 to only the 4 the river actually overlaps, which moves LandscapeCaptureOffset from 208105 to 66500 but changes nothing
  • r.Nanite 0
  • 45 second settle before baking
  • Use Default Shallow Water Subsystem on, and off again

Questions

  1. Is the rotated landscape the likely cause here, in the same way it is for AWaterBrushManager? Is the bottom contour capture transform composed with the landscape rotation anywhere?
  2. Is there a supported way to compensate, short of duplicating Grid2D_SW_River into /Game and patching the capture transform by hand?
  3. What drives the UseArrays input on Grid2D_SW_Source? The C++ only ever fills the array data interfaces, and User.SourcePos, User.SourceSize and User.SourceAngle are all left at zero on the component. If that switch resolves to false then the source box would be zero sized and no water would ever be injected, which would match exactly what I am seeing.