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:
- Go to the 'Paint Details' tab in your Terrain component.
- Click 'Edit Details...' and choose 'Add Detail Mesh' (recommended) or 'Add Grass Texture'.
- Pick a prefab for the detail and edit the detail's properties.
Place Objects
After the prefab or grass texture has been added to the terrain you can place objects on the terrain:
- Go to the 'Paint Details' tab in the Terrain component.
- Select the detail that you want to place and set the Brush Size, Opacity, and Target Strength.
- Paint the details on your terrain.
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.
The main texture (Albedo) of the material is replaced with the grass texture, and all other properties of the material are kept the same.