x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Water Cut off Effect

Hi,

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).

Thanks

alt text

Product Version: UE 4.20
Tags:
screenshot-1.png (5.1 MB)
more ▼

asked Aug 31 '18 at 02:01 PM in Rendering

avatar image

Raur
16 5 5

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

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 !"

more ▼

answered Nov 14 '18 at 10:30 PM

avatar image

Raur
16 5 5

(comments are locked)
10|2000 characters needed characters left

There are a lot of tutorials on how to make realistic or at least believable water like this one: https://www.worldofleveldesign.com/categories/ue4/materials-starter-content-water-instance.php

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.

more ▼

answered Aug 31 '18 at 03:17 PM

avatar image

dZh0
1.2k 6 5 8

avatar image Raur Aug 31 '18 at 05:59 PM

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.

alt text

screenshot-1.jpg (162.4 kB)
avatar image dZh0 Sep 03 '18 at 06:11 PM

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.

(comments are locked)
10|2000 characters needed characters left

1) Render water into custom depth 2) For a side view, make and position a plane, so that its top vertices position match water plane vertices. 3) Make a material for the side view plane, unlit translucent one, that displaces its top vertices with the same function, water plane is displaced, samples scene texture and applies amount of fog, proportional to the distance between pixel and scene depth or custom depth, whatever is smaller. 4) Optionally, add a line to hide transition from water plane to cut plane. Can be done as a separate mesh or effect both in water and sideplane materials. 5) Profit.

more ▼

answered Aug 31 '18 at 08:16 PM

avatar image

Deathrey
7.7k 129 29 290

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question