> For the complete documentation index, see [llms.txt](https://docs.shadersource.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shadersource.io/assets-and-plugins/ocean-tool-2/tutorials/painting-the-ocean.md). Agents can also search and read this documentation through its [MCP server](https://docs.shadersource.io/~gitbook/mcp).

# Painting the Ocean

Change the ocean in one place with a brush - calm a bay, hide water inside a cave, add foam, or fix the shoreline.

Most of an ocean's settings apply to the whole sea. **Ocean Painting** is how you change it in one place: a brush that paints calm water into a harbour, removes the water from inside a cave, lays foam where you want it, or corrects where the shoreline runs.

![Calm water painted off a beach, with the paint's overlay shown](https://2855220899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk51ACJUA5E3mZvLb9h%2Fuploads%2Fja3kxOUjqYC1ggOjwKzr%2Fpaint_hero.jpg?alt=media)

|                  |                                                                                                                                                                              |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Time**         | About 10 minutes                                                                                                                                                             |
| **You need**     | An ocean; for the shoreline layers, a baked shoreline ([Ocean and Shoreline](https://docs.shadersource.io/assets-and-plugins/ocean-tool-2/tutorials/ocean-and-shoreline.md)) |
| **You will use** | **Simple > Paint**                                                                                                                                                           |

## How painting works

{% stepper %}
{% step %}

### Turn on Ocean Painting

Open the **Paint** page and tick **Ocean painting**. It is off for a new ocean, and while it is off painting costs nothing.

![The Paint page: its actions on top, then the brush and the overlays](https://2855220899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk51ACJUA5E3mZvLb9h%2Fuploads%2FKFeFqPA6rruihJZn03z5%2Fpaint_page.png?alt=media)
{% endstep %}

{% step %}

### Choose a layer

Under **Brush**, open **Layer**. Each layer changes one thing about the water (they are all listed below).
{% endstep %}

{% step %}

### Press Paint

Press **Paint** at the top of the page. The brush appears in the viewport with its name and controls written across the top of the view.

| Do this                         | To                 |
| ------------------------------- | ------------------ |
| Drag with the left mouse button | Paint              |
| Hold **Shift** and drag         | Take the paint off |
| **Shift** + mouse wheel         | Resize the brush   |

The mouse wheel alone still zooms the viewport, and you can fly the camera as usual between strokes.
{% endstep %}

{% step %}

### Press Stop Painting

When you are done, press **Stop Painting**. The paint is saved with the level.

Each stroke is one undo step. **Clear Layer** wipes the layer in hand; **Clear All Paint** wipes everything.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**Soft edges come for free.** Every painted edge is blended into the water round it over the **Paint edge blend** distance (12 m by default), so calm water, the sea's size and the foam change over metres rather than in a step.
{% endhint %}

## The brush

| Row                | What it does                                                                                                                 |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| **Brush size**     | The brush's radius, 15 m by default. **Shift** + mouse wheel changes it while you paint.                                     |
| **Brush strength** | How much one pass lays down. A stroke paints each point once, however many times it crosses it; another stroke builds on it. |
| **Brush falloff**  | How soft the brush's edge is.                                                                                                |
| The value row      | Shown for the layers that paint *toward* a value: the amount of foam, the size of the sea, and so on.                        |

## The layers

| Layer                    | Drag to                                                                                                                | **Shift** + drag to                                              |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| **Calm water**           | Calm the water: the waves die down to a light chop                                                                     | Give the water back its waves                                    |
| **Sea size**             | Make the sea bigger or smaller there, by the Beaufort change you set (three forces below to two above the ocean's own) | Take it back to the ocean's own                                  |
| **Ocean foam amount**    | Turn *all* the foam up or down there: whitecaps, trails, shore foam and wakes                                          | Take it back to 100%                                             |
| **Offshore foam amount** | Turn the open sea's foam up or down there                                                                              | Take it back to 100%                                             |
| **White water**          | Lay foam on the water, whatever the waves are doing                                                                    | Take it off                                                      |
| **Shore wave strength**  | Make the shoreline's waves bigger or smaller there                                                                     | Take it back to 100%                                             |
| **Shore foam amount**    | Turn the shoreline's foam up or down there                                                                             | Take it back to 100%                                             |
| **Wash reach**           | Make the wash run further up the beach, or less far                                                                    | Take it back to 100%                                             |
| **Shoreline**            | Add shoreline where the bake left it out                                                                               | Take the shoreline off: the open sea's waves come up to the land |
| **Hide water**           | Remove the water                                                                                                       | Show it again                                                    |

## Four things you will want to do

### Calm a harbour

{% stepper %}
{% step %}
Set **Layer** to **Calm water** and press **Paint**.
{% endstep %}

{% step %}
Drag over the harbour. The waves die away under the brush.
{% endstep %}

{% step %}
Set **Calm water waves** to decide how much of the sea's movement the calm water keeps: 0 leaves only the finest ripples, higher keeps more of the swell (0.2 by default).
{% endstep %}
{% endstepper %}

![The sea off a beach before and after painting calm water](https://2855220899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk51ACJUA5E3mZvLb9h%2Fuploads%2F3gDWpWIxzzcnS7zDQYER%2Fpaint_calm.jpg?alt=media)

### Remove water from a cave, a hull or a basement

The ocean is infinite, so it fills every space below sea level. **Hide water** removes it.

{% stepper %}
{% step %}
Set **Layer** to **Hide water** and press **Paint**.
{% endstep %}

{% step %}
Drag over the space that should be dry.
{% endstep %}
{% endstepper %}

Hidden water is gone in every sense: nothing is drawn or built there, nothing floats or swims in it, and a camera there is never under water.

![Hide water: a patch of sea painted away, down to the sea bed](https://2855220899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk51ACJUA5E3mZvLb9h%2Fuploads%2FMtkWGL7t5B8M6ElyysGB%2Fpaint_hide.jpg?alt=media)

### Fix the shoreline

The bake works out by itself where the shoreline runs. Where it gets it wrong, correct it with the **Shoreline** layer.

* **Waves break a long way out to sea** - a shelf that stays shallow far from the beach. Set **Layer** to **Shoreline**, set **Shoreline trim distance**, and press **Trim Shoreline**. The shoreline is kept within that distance of the waterline and taken off the water beyond, in one click.
* **No shoreline where there should be one** - round a rock, at a harbour wall. Drag over it to add shoreline there.
* **Shoreline where there should be none** - hold **Shift** and drag to take it off.

**Trim Shoreline** replaces what the Shoreline brush had painted, so trim first and touch up with the brush after.

![The shoreline before and after Trim Shoreline: red where it was taken off](https://2855220899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk51ACJUA5E3mZvLb9h%2Fuploads%2FxRF2RnL7AjUfubymehIC%2Fpaint_trim.jpg?alt=media)

### Lay foam where you want it

Set **Layer** to **White water** and drag. Foam is laid on the water under the brush and stays there whatever the waves do - round a rock, along a reef, at the foot of a waterfall. The value row sets how broken up its edge is.

## Seeing what you painted

The **Overlays** category shows the paint as colour on the water while you work.

* **Show overlays** turns them all on or off; each layer has its own tick box under it.
* **Overlay opacity** sets how strongly they are drawn.
* On the **Shoreline** layer, red is where the shoreline has been taken off and green where it has been added. Hidden water is drawn dark.

Overlays are an editor aid. They are never drawn in the game.

## Good to know

* **Painting stays quick on a large ocean.** While you drag, only the water under the brush is redrawn. Everything else that the paint touches - physics, the simulated shore, the coastline lines - catches up when you let go.
* **Paint detail** is the size of one painted cell (2 m by default). Smaller is finer and takes more memory.
* **Paint is part of the ocean**, saved with the level. A preset does not carry it.

## Where next

* [Ocean and Shoreline](https://docs.shadersource.io/assets-and-plugins/ocean-tool-2/tutorials/ocean-and-shoreline.md) - the bake the shoreline layers correct.
* [Simple Tab](https://docs.shadersource.io/assets-and-plugins/ocean-tool-2/how-to-use/ocean-tool-2-editor-mode/simple-tab.md) - the Paint page row by row.
