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

Add and Place Objects

Adding and placing objects is done using Unity's default terrain editing tools in the Paint Details tab. All detail objects that are added and placed on the terrain are automatically rendered using Nature Renderer. Below you can find a quick overview of how Unity's tools work.

Add Objects

Before you can place objects on the terrain you have to add (register) them to the terrain settings as detail objects:

  1. Go to the 'Paint Details' tab in your Terrain component.
  2. Click 'Edit Details...' and choose 'Add Detail Mesh' (recommended) or 'Add Grass Texture'.
  3. Pick a prefab for the detail and edit the detail's properties

Doc_Add_Details.jpg

Place Objects

After the prefab or grass texture has been added to the terrain you can place objects on the terrain:

  1. Go to the 'Paint Details' tab in the Terrain component.
  2. Select the detail that you want to place and set the Brush Size, Opacity, and Target Strength.
  3. Paint the details on your terrain.

Doc_Place_Details.jpg

Detail Mesh

The recommended method to add objects is to add a Detail Mesh. A detail mesh is simply a prefab asset in your project. This allows you to use any object, mesh, or material.

Grass Texture

With Nature Renderer it is possible to add grass using only a grass texture and no mesh or prefab. In this case, Nature Renderer will automatically generate an internal mesh and material for the grass.

Mesh

The mesh that is generated is a simple quad mesh. Note that this is a very generic mesh and it is not optimized for the specific grass texture, so the rendering performance with this mesh is not the best and can result in a lot of overdraw. It is best to create a custom detail mesh for your grass when optimizing your game for release.

Material

Nature Renderer generates an internal material for the mesh with the "Nature Shaders/Grass" shader. You can tweak the Specular Highlights, Translucency, and Normals fields in the Nature Renderer component to adjust these features in the material.

Custom Material

If you want to edit the material properties or use a different material then you can assign a custom material to the Material Override field in the Nature Renderer component. This material is then used for all the terrain details that use 2D grass textures.

Click the "Create" button next to the field to create a new material in your project based on Nature Renderer's internal material.

nature-renderer-material-override-field.jpg

The main texture (Albedo) of the material is replaced with the grass texture, and all other properties of the material are kept the same.

Was this article helpful?
19 out of 29 found this helpful