Stylized Water 2 documentation

Stylized Water 2

Stylized Water 2
Author: jonathan
Version: 1.1.4
Dated: 22 Sep 2020

4.6.River mode #

By default, the water effects will flow in the direction configured under the “General” tab. Some effects like normals and foam have a secondary layer that flows in the opposite direction.

For rivers/creeks, the water should always flow along the shape of the mesh. This is where the “River mode” comes in.

River mode can be enabled under the General tab

When enabled, all the animations flow in the vertical direction of the mesh’s UV. Because of this, the “UV Source” parameter is disabled, as it’s forced to use the mesh’s UV. Surface Foam is also always drawn on slopes, and gradually becomes less visible as the water flattens out.

Included river demo scene

When river mode is used, the waves feature is automatically disabled, since these cannot work together properly. Note that buoyancy functionality only works for flat water, so will not work for rivers

Creating rivers

This is a fairly broad subject, the asset doesn’t contain any functionality to do this, since it’s not a modeling tool.

For example, River Auto Material or EasyRoads3D could be utilized to create spline meshes, though the shader will not support RAM’s flowmap painting functionality. But basically any spline tool that can tile a plane mesh will do.

If you are creating a spline mesh in an external tool, ensure the UV is laid out straight, without any overlapping shells.

This is necessary for the surface to have seamless texture tiling

(Version 1.0.9 and older only!) Ensure your mesh has no/black vertex colors. When river mode is used, the Blue channel is used to add foam. If the mesh has uniform white vertex colors, foam will draw on the entire mesh (rather than just the slopes)

Should the water flow in the opposite direction, you can use a negative Y direction on the material to mitigate this. Though this indicates you should actually flip your UV map vertically.

Blending rivers with lakes

This is fairly straightforward to achieve, essentially you want the opacity of the river to fade out as it starts to touch the water.

First, ensure the river material draws over the water (rather than underneath it), but modifying the render queue on the river material to 3001 (transparent queue + 1). The ZWrite option must also be enabled on the (receiving) water material.

Secondly, enable the use of vertex colors for opacity on the river material

The Green vertex color channel can now be used to make parts of the mesh completely transparent. See the Vertex Colors section for more details. You’d want to paint the end of the river mesh, that touches the lake, so it appears to blend in with it.

End part of the spline mesh having green vertex colors, making it fade out

Yes No Suggest edit
Last updated on August 20, 2021
6 of 6 users found this section helpful
Suggest Edit