Paint areas (vertices) on Mesh
This tutorial is here to help you leverage our "Preserve Painted Area" parameter when applying a Decimate to Target on your mesh.
For that, you'll need to install in your project PolyBrush, a free package available in the package manager.
Get to Package Manager, and in Unity Registry, search for PolyBrush
After installing, you will find a new menu called Tools where Polybrush is listed.
Create a material in order to display the vertex colors
- Before starting to paint with Polybrush, we need to create a material with the right shader. For that, just create a material (From Assets)
- On the top right, change the shader to : "Polybrush/Standard Vertex Colors"
- Keep white as color in order to paint over with red color
Paint Vertex colors on the mesh you want to decimate
When you have created your material, you can start painting the vertex. For that:
- Switch material of your mesh with the one you just created (here Vertex Color displayer)
- Open PolyBrush Window and go in the Tab "Paint Vertex" (the middle one)
- Choose Red as color
- You can tailor the "Outer Radius" in order to be more precise in the painting
- Start to paint on your mesh (you need to select it beforehand)
When done, don't forget to switch again the material of your model.
Then you can Decimate to Target and preserve the area painted.