Stylized Water 2 documentation

Stylized Water 2

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

4.2.Vertex colors #

Vertex colors are vertex attributes just like position, normals and UV’s are. These can used to drive some of the shader’s behaviour. Vertex colors can be painted in any of the populair 3D tools, but also in the editor using PolyBrush.

Once you start to paint vertex colors, a mesh becomes an unique instance. This means it can no longer be used with prefabs, only in the scene the object is currently in.

Red channel (intersection foam):

For this to take effect, the “Gradient source” under the Intersection tab should be set to either “Vertex color”, or “Both”. For the best effect, make sure you’re not painting 100% red. The effect needs a gradient to work with.


Green channel (opacity):

The “Vertex color opacity” checkbox must be ticked under the Color tab.

Note that you can also hide the water through a transparency mask, as outlined here.

Blue channel:

The “vertex color flattening” checkbox must be ticked under the Waves tab

This makes it possible to have high waves in one part of the environment, while retaining flat water at the shoreline. Note that this does not affect Buoyancy , which will still read the original wave height.

Alpha channel (surface foam) (version 1.1.0+)

Under the Surface Foam tab, the “Vertex color painting” checkbox must be enabled. Painting the alpha channel works a little differently, in PolyBrush you have to set the color mask to only apply to the “A” (alpha) channel. After which, the alpha value of the color determines the strength of the value that’s being painted.

Note that the vertex color will add foam, the alpha channel of the color set on the material still controls the “base” foam opacity.

In v1.0.9 and older, if River Mode is enabled, the Blue vertex color channel can be used to add surface foam.

Yes No Suggest edit
Last updated on July 1, 2021
7 of 7 users found this section helpful
Suggest Edit