> For the complete documentation index, see [llms.txt](https://docs.planetaryoceans.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.planetaryoceans.com/guide-v.-2.1/masking-out-water.md).

# Masking out water

<figure><img src="/files/MDPXLduXd1eVY2i48w67" alt=""><figcaption><p>Water is masked out of the boat hull interior</p></figcaption></figure>

There are two ways of masking out water:

1. Using `M_WaterInvalidator` material that gets water removed from the volume covered by the mesh it is assigned to. Mesh should be ceiled.&#x20;

{% hint style="success" %}
Check the `BP_Boat`. There's a `hull_mask` static mesh attached with the `M_WaterInvalidator` material assigned. Mesh covers the whole volume of the boat hull.
{% endhint %}

2. Using distance field mask. In the `M_OceanFFT` check the reroute node called `Masking Out Water` that is unused. Plug it into the `Opacity Mask` input in the root node. `Opacity Mask` accepts either `0` or `1` value per-pixel and discards the pixel based on this value.

<div align="left"><figure><img src="/files/mfH9Kvw68q2d3BETF3is" alt=""><figcaption></figcaption></figure></div>

This mask removes water wherever the distance field is negative, meaning it affects the interior of the mesh. Use the `Mask Offset` parameter to adjust the mask's position. Ensure that the distance field is enabled on the mesh you want to exclude water from.

{% hint style="warning" %}
The distance field method gives you less control as it will be applied for every mesh that has distance field enabled. Whereas the first method, which is based on the material, give you full control over the areas you want to exclude water from.
{% endhint %}
