Working on a side scroller game and I need to create a water cut off effect like seen in the screenshot of Ori and the Blind forest.
Basically need a side perspective on water bodies like lakes and ponds where I can see objects underwater as well as above water. Water may be subject to ripples and disturbances (caused by player or fish swimming in the water).
There are a lot of tutorials on how to make realistic or at least believable water like this one: UE4 Tutorial: How Make Water Material in "Starter Content" Work Without Stretching or Distortions
To get the cut you can adjust the camera clipping plane by opening Edit → Project Settings → General Settings → Near Clip Plane.
Now hoe to apply different shades above and below the water line - I can’t help you here.
What you suggesting is regular water shader. I get that and If i use clipping, wouldn’t that just clip the horizontal water plane. It wouldn’t generate a vertical slice for me to get that partial underwater level. Its just empty under the surface.
Yep. The cut off will just cut the water plane. Nothing more.
The bottom part would probably be empty in all cases. However there are a lot of sharers applied in the bottom in the picture and probably additional geometry/shaders to make the thin waterline (called meniscus).
Rendering above/below water is not a trivial task.
I asked this question to Antoine Louisia, his answer -
“The mesh i used to create this water is a cube, and i added vertex color (G Channel) only on the top of this cube. This way, you get a mask that you may use for the displacement and the foam (not for the color), so it doesnt affect the sides of your cube. They may be a lot of other ways to achieve this, but this one works perfectly fine !”