Hi guys,

I thought I have a simple task to resolve but i was wrong.

Basically I want take the water out of my boat: Since I have an opaque ocean , i choose to use Custom Stencil as masking solution. For that I build 2 meshes to play with as it follows:

1. The actual mesh of the boat that i'll use for render

2. A "mask" mesh to hide the inside of my rendered mesh hull.

3. ... and of course the ocean surface.

Now, I assigned, 3 different stencil values to each of my meshes + the ocean render mesh - > ( mask = 150 , Render mesh = 10, ocean = 200)

My problem is that whatever substractions or adding operations I do with this stencils in my PP material blueprint i'm not able to get an intersection , to isolate only the water from inside the boat.. For sure my math is poor, and i'm missing something:

Help, I'm losing it..

the mesh to render :

the mesh for mask:

viZualisation of my stencil values:

My basic Blueprint in PPDepthShader