Under water / above water split view, is this possible?

Thanks! I’ll look into how to make it work with a blueprint I’ve still got a lot to learn about blueprint but that should make for a nice experiment.

Blueprint shouldn’t be necessary for that part. It should just work if you use world coordinates for both your water and post process material.

I can’t seem to figure out how to make the 2 noises fit each other even after offsetting them by the same amount :confused:

EDIT
I’ve come a little closer to a perfect match but it still got a bit of work to make them match at 100%

You shouldn’t subtract object position from the left side unless you are actually going to handle that with BP and set it in the corresponding material. I’d just remove it.

For those who can’t make this method to “align the waves” you need a high poly or/and a highly tessellated mesh

That is one way, but it also works fine as a post process material, you just need to do the same Z offset on the camera near plane and sample the same wave function. That works perfectly as long as you are only using Z offsets.

I tried this, but in PP material world position works badly with far surfaces, especially sky sphere.

Then you can use camera relative world position to get more precision back. but not sure what a sky sphere has to do with this. Why would you put this material on a sky?

Not on sky, in camera post process.
It was simple setup like:
Z of (ScreenPosToWorld - WaterHeight + Sine(AbsWorldPos.X + Frac(Time)))

When camera on “edge” of this, and I look on sky, mask becomes noisy, like dithered.

Ok, I will try this with camera relative world position.
Thanks!

You shouldn’t do Sine of AbsWorldPos.x , you should use the ScreenPosToWorld for all the world positions there. The sky distance should never come into play.

Should be more like this

Z mask = ScreenPosToWorld.z - WaterHeight + Sine(ScreenPosToWorld.X + Frac(Time)))

This are my materials which works with Ryan’s method. (PostProcess + Translucent)

Hey I recently was searching for this technique too, and found a ton of really great info in this other, related thread Is this possible - Rendering - Unreal Engine Forums

Hope it helps!

Useless, the issue is when you add a displacement to the water plane

I am not sure what you mean. He just posted that link for reference since it covers some similar issues. Just various ways of handling specific masking issues.

isn’t your issue with displacement resolved now?

Well yes and no, because you need a high tessallation/poly mesh, i was thinking to move it to a depth/stencil to gain some performance (or using that might get worse performance)…
anyway, even tho, i write the water mesh to depth/stencil and there i am stuck, i can’t find a way to get near depth position and then fill rest of screen under it …
can you give a hand Ryan?

Yeah, it works. Thank you Ryan!

Here is very basic setup with sine waves:

2017-05-31_1047.jpg

Actually, even with high poly/tessellated plane, the waves from PP just don’t match the water mesh

In post process material you would need to perfectly mimic the triangulation of the water mesh and then correctly calculate ray intersection with it per pixel. This is just not doable.

Actually, is quit easy with stencil, you create a box with inverted faces apply water material on it, write to stencil only and get water split line.

To expand on what some3one3 said, grab your water plane, rotate it 180 degrees so it faces down, assign an opaque material, tell it to write to a custom stencil, give it id 1. Add a flipped face “bucket” that contains your water, give it id 1 as well. Tell both of these objects not to render in the main pass, then mask your post effects in a material by stencil! This way it includes any displacement on your water plane.