Brute Force - Sand Shader Documentation
5. Paint Sand
Using the Brute Force - Sand shader you can paint the vertex color of your assets to dynamically draw sand or rock.
The default value and state of the shader is sand.
With that in mind let's see in details what each vertex color channel does:
-White: Renders Sand
-Red: Renders Rock
-Green: Renders Sand without displacement
-Blue: Renders Rock without interactive effects
How to paint Vertex Color on your mesh
I strongly recommend you download the Polybrush Asset from the Package manager (see documentation). It's an official Unity asset that lets you draw colors on vertex. You can also use your favorite 3D software to draw vertex color and it will work fine.
For the rest of this page I will assume you are using the Polybrush asset.
Open the Polybrush Window by going to: Tools > Polybrush > Polybrush Window
You will have this window opened:
The tab that interests us is the "Paint vertex colors on meshes" click on that.
You can see there is a "Outer Radius" value that controls the radius of the brush size and a Color Paint Settings at the bottom.
You can choose which color you want to paint by clicking the big color field below color mask.
When choosing between White, Red, Green or Blue colors make sure it is the absolute color; meaning white is fully white (1,1,1) and red is fully red (1,0,0). Again, tead the polybrush documentation for more details.
Select red color:
Now click on the mesh you want to paint on with the sand material already placed, you can start painting rocks:
This is what you are actually doing by painting:
Keep in mind you need a certain number of vertices to have a higher effect definition, here's a good guideline:
Finally when you are happy with your mesh make sure the "Apply As" is set to Overwrite Mesh
When importing a custom mesh inside Unity you are required to enable Read/write in the import settings of said mesh.
Now that you've downloaded and installed Polybrush: