Post

How does the surface mesh stuff work? I really wanna pick this up because I do a lot of source ports and low brush / grass that looks natural has been kind of out of my reach for a while, but I don't wanna get it only to find out I can't brush it onto the type of terrain I usually work with

How the asset works: Mesh generation and painting: - Editor script generates a copy of a specified surface mesh or terrain to leave original untouched - User paints grass mask that is stored as RGB vertex color of the surface mesh shape to have the correct sorting, reducing overdrawing.

Surface mask pass: - A dedicated orthographic camera renders the assigned surface meshes with MaskMaterial into a render texture. - Mask RGB comes from vertex color and defines grass type distribution. - Mask A stores world-height information used to place particles vertically.

Trail interaction pass: - Trail CRT stores dynamic bend vectors. - Trail Material writes interaction from players/targets into that texture. - The grass shader reads it to bend and dim touched grass.

0 reposts3 likes

Grass particle render pass: - Grass is rendered as GPU-instanced particles using Particle Material. - Grass is generated around the active render center. - Grass generation order follows the hexagonal spiral shape to have the correct sorting, reducing overdrawing.