Game Development Reference
In-Depth Information
How to do it…
We can add water using a filter by performing the following steps:
1. Right-click on the
Effects
folder under
Project Assets
, select
New
, and then select
Empty FilterPostProcessor file
. You might have to select
New
,
Other...
, and then
click on
Filters
to find it.
2. Name it
Water
and click on
Finish
.
3. Right-click on the newly created
Water.j3f
file and open it.
4. We are now moved to the
FilterExplorer
window. From here, we can create, add,
and modify scene-wide effects, choosing from a number of premade ones. Right-
click on the
Water
filter and select
Add Filter
and then
Water
.
5. To see filters in the
SceneComposer
window, we need to click on the Eye icon
shown in the following screenshot. This should give the scene a whole new look.
Do it and see the scene transform.
6. A few properties need to be modified in order to make the water appear smoothly.
The
Properties
window for the
WaterFilter
element can seem a bit overwhelm-
ing. For now, let's change the
Water Height
parameter. The filter will create foam
wherever it meets the land and finds a good separation or where the shore height is
essential. The sweet spot is dependent on the scene but starts out with -2 units.
Changing the following values will affect the appearance along the shoreline: