You should be doing the opacity masking in the ocean material by the way
you will not be able to mask the ocean out from the post process (unless there is a scene texture before translucency that I'm not aware of).
Btw, I did a few tests yesterday to see if I could do something on my end to allow for easy masking but unfortunately you cannot use the stencil buffer for opacity masking and underwater masking at the same time (they interfere with each other).
However, in the case of a submarine it should be easy to simply use a capsule mask in the ocean material instead of the stencil buffer, you would need to drive the start and end point of the capsule via material parameter from the submarine blueprint (the material function for the capsule mask is called DistanceField_Capsule or something like that if you wanna give that a shot).
If you do not care about the underwater masking as much then you can use the stencil, I tried to mask the opacity when on the inside of a box and it works well.

Btw, I did a few tests yesterday to see if I could do something on my end to allow for easy masking but unfortunately you cannot use the stencil buffer for opacity masking and underwater masking at the same time (they interfere with each other).
However, in the case of a submarine it should be easy to simply use a capsule mask in the ocean material instead of the stencil buffer, you would need to drive the start and end point of the capsule via material parameter from the submarine blueprint (the material function for the capsule mask is called DistanceField_Capsule or something like that if you wanna give that a shot).
If you do not care about the underwater masking as much then you can use the stencil, I tried to mask the opacity when on the inside of a box and it works well.
Comment