Using Impostors
When the scene contains a lot of objects that should be visible at large distances, the application performance suffers. To reduce the number of such objects, impostors are used. They allow speeding up geometry rendering while saving visual fidelity: each impostor repeats transformation and appearance of the original object.
UNIGINE provides the Impostors Creator tool that allows generating impostors for a single object or for objects baked into a Mesh Clutter:
- In the first case, the billboards-based impostor will be rendered instead of the real object.
- In the second case, the Grass object will be rendered instead of the Mesh Clutter.
For example, you can replace the distant trees with impostors to optimize forest rendering:
1. Grabbing Impostors#
To grab impostor with the Impostors Creator tool, perform the following:
- In the Menu Bar, choose Tools -> Impostors Creator. The Impostors Creator tool will open.
- In the World Hierarchy window, choose a single mesh or a clutter, for which an impostor should be created.
Impostors can be generated only for Mesh Clutter objects, World Clutter isn't supported.
- If you choose a mesh, a single impostor represented by the Billboards object will be generated.
- If you choose a clutter, impostors for all clutter objects represented by the Grass object will be generated.
- In the Impostors Creator window, specify the required textures and settings.
If you are going to generate the impostors for vegetation, you should specify For Vegetation option for textures (where available).
- Click Create and specify a name for textures in the file dialog window that opens.
The generated impostor(s) will be added as a child node to the original mesh/clutter:
- For objects baked into the clutter, the Grass object with the material inherited from grass_impostor_base will be added. All required settings will be copied from the original mesh clutter to the grass object automatically.
Real Clutter Objects and Its Impostors in SceneObjects and Impostors Wireframes
- For a single object, the billboards object with the material inherited from billboards_impostor_base will be added.
Real Object (left) and Its Impostor (right) in SceneObject and Impostor Wireframes
2. Setting Up Impostor Material#
All textures specified in the Impostors Creator are generated in the data folder and applied in the material automatically. The impostor material may require additional set up:
- If you grab only the Albedo and Normal textures, you will have to manually set up the other shading parameters of the impostor material (specular, translucence, etc.), so that the impostor visually match the original object. However, if the original object has several surfaces with different shading, the impostors may significantly differ (so it is better to grab all textures in this case).
- For vegetation impostors, the Specular parameter should be set to 0 to avoid unnecessary specks on trees.
- If you simply want to improve visual representation of impostors, you can adjust shading parameters (for example, increase translucence for trees impostors and so on).