This page may not work correctly inside the Unity editor. Open in browser

Runtime Masking (Experimental)

Requires Nature Renderer 1.1.10 or higher.

As an experimental additional (bonus) feature, it is now possible to mask detail objects at runtime. This allows you to temporarily remove details in a specific location. For example, if you allow the player to create buildings on your terrain then you can mask out the terrain details under the building.

This is recommended for temporary changes, for permanent changes you can edit the terrain data and remove details there.

How to use the mask

  1. Download the attached 'DetailMask' script and import it into your project.
  2. Add the Detail Mask component to an (empty) object in your scene. This will also add a Box Collider to that object.
  3. Move, Rotate, Scale the object to match the area that you want to mask.
  4. All Terrain Details should now be hidden within the Box Collider, both in the Editor and at runtime.

Limitations

The masking is done on the CPU due to technical limitations and is therefore quite heavy on the performance. If you need a lot of masks and you run into performance issues then we recommend to create a custom shader with a custom masking solution for your specific project.

 

 

Was this article helpful?
0 out of 0 found this helpful