Hiding water surface inside a boat

It is just material settings, not a blueprint. To create this effect you have enable render custom depth\stencil inside your project settings first.

Then you have to enable custom depth rendering for your mesh (inside mesh properties)

130531-enablestencilformesh.png

And create a material like that

130534-mat_psw.png

This material compares current stencil buffer value with the given constant (I used 25, it doesn’t matter) and chooses the alpha for water between 0 and other value.

With this material as water and any static mesh you will get something like this

130535-wo_cds.png

Until you enable custom stencil and specify stencil value greater than used in material.

130536-with_cds.png

To get best effect you have to separate your boat mesh to two parts: inner and outer. And enable custom depth stencil on both parts but set stencil value > 25 for inner part and < 25 for outer.

1 Like