Test

New: Nature Shaders

Interaction, Wind, Dynamic Masking, and Better Shading for your vegetation.

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

Overlay

nature-shaders-dynamic-color-overlay-780x580.jpg

Requires the full Nature Shaders package.

Not supported in Nature Shaders Essentials. (Learn more)

Nature Shaders supports an Overlay feature that can be used to adjust material settings for a specific part of the scene.

The Overlay can adjust the color of vegetation within an area, or completely mask out vegetation.

Create an overlay in the scene

Overlay objects in the scene adjust the material settings for the vegetation within the overlay's bounds.

  1. Select a game object in the scene that you want to use as overlay, or create a new game object.
  2. Add a collider to the game object. Vegetation within this collider will be affected by the overlay.
    Tip: Set up a new collision layer for overlay objects, so that the overlay colliders don't interact with other objects in the scene.
    nature-shaders-overlay-collider.jpg
  3. Add a "Nature Overlay" component to the game object. This will register the collider as being an overlay, and is used to adjust the overlay settings.
    nature-shaders-overlay-component.jpg

Note

The Y position of overlay objects has no influence. Overlays are projected onto the scene from a top-down perspective and will always show, no matter the Y position.

Enable Overlay in the material

The overlay objects in the scene will only affect vegetation that has "Overlay" enabled in their material.

  1. Select the material for the vegetation that you want to be affected by the Overlay, and ensure that it is using one of the Nature Shaders.
    nature-shaders-ensure-correct-shader.jpg
  2. Enable the Overlay section of the material.
    nature-shaders-enable-overlay-for-material.jpg
  3. Enable the settings that you want to be affected.
    nature-shaders-material-overlay-settings.jpg

    Sample Color
    Load the color from the Color Overlay.
    Sample Alpha
    Load the alpha from the Alpha Overlay.

Overlay Settings

The overlay component has multiple settings that you can enable and adjust independently from each other. 

Color Overlay
The color overlay adjusts the color of vegetation within the overlay. The color that is set in the overlay is multiplied with the color of the vegetation, effectively acting as a "Tint" property of the material.
You can use this to create more color variation in your scene, without having to create multiple materials.
nature-shaders-color-overlay.jpg
Alpha Overlay
The alpha overlay adjusts (reduces) the alpha of the vegetation within the overlay.
Use this to mask out vegetation, or to slightly fade out vegetation.
Note: Alpha Overlay only works for materials that have alpha clipping enabled.
nature-shaders-alpha-overlay.jpg
Was this article helpful?
2 out of 2 found this helpful