Obstacle Mask Creator

Obstacle Mask Creator

The obstacle mask creator component is a utility component designed to help creating exclusion masks for vegetation.  To use the component add it to the GameObject with the VegetationSystem component.

Select the resolution you want on the output mask 1024 to 8196.
The component will spherecast against all colliders on the selected obstacle layers and add these to the mask. There is a minimum distance setting you can adjust. Till will inflate all collider areas and make sure vegetation is not spawned closer than this.

It will generate a mask in 1:1 scale of the terrain assigned to the VegetationSystem component.

Press the “generate obstacle mask” button and choose a location in the project to save the mask.
The generated mask can then be used as any other mask texture with the VegeationSystem component.

The example mask below is a cutout of the mask showing the village area in the demo scene.