Physical Ocean Surface - Developing a Realistic Water Shader

This is a quick demonstration of buoyancy for boats.

For this video, I have adjusted the water material parameters (no recompiling of the shader needed) to a different art style that makes the screen space reflections visible. If you look carefully, you can see the SSR and the shadow of the boat on the water. The scene runs at 60 fps and will be inclueded in the package on the Marketplace.

watch?v=GpliyKYKypg

The following steps are needed to set everything up:

  1. Add boat static mesh to level
  2. Set static mesh actor to movable
  3. Add Buoyancy component to the static mesh actor
  4. Adjust the settings of the Buoyancy component according to your needs

Here are the settings I found:

Buoyancy Mode: AutoPoints (Automatically generates an array of points where the water depth will be evaluated)
PointsShape: Ellipse (The automatically generated points will have an elliptical shape matching the length and width of the boat)
PointsScale: 0.7 (Shrinks the points array a bit because we don’t want points far out at the end of the mesh, for example directly under the tip of the boat)
N Points X: 3 (Number of points in radial direction)
N Points Y: 8 (Number of points in tangential direction)
Float Height: -10 (this is used to adjust how deep the boat is submerged)
N Points Per Frame: 19 (The total number of points is 19 (3*8 +1 in the middle) so every frame the water depth at every point is calculated)
N Points Pause: 0 (No pause, we want to update the buoyancy force every frame at all points)
Linear Damping: 3.0 (With this you can adjust the rocking motion of the boat)
Angular Damping: 5.0
Drag Multiplier: 10.0 (This parameter controls how much the boat is dragged horizontally my the horizontal water flow)