Create impostors
Impostors can be created from the Toolbox, the Rule Engine or the LOD Generator.
Impostors are an optimization technique that is mainly used for levels of details (LODs). Use impostors to drastically optimize meshes that are located in the background of real-time 3D experiences, without losing visual quality.
An impostor comprises multiple maps of a mesh from different viewpoints, which are rendered on a quadrangle, a bounding box (12 triangles), or a custom mesh. Automatic fading creates a seamless rendering experience.
This example shows a high-res impostor rendered on a quadrangle:
These representations maintain the appearance of the original 3D object when viewed from a distance or specific angles, while significantly reducing the computational load on the system. Perfect for far distance LOD.
Thanks to depth capture, shadows can be casted to enhance the feeling of 3D (in BiRP, URP and HDRP).
In HDRP, depth is also offseted so intersections with other objects will be correct.
Pixyz Impostors support:
- Shadow casting and receiving
- Object intersections (HDRP only)
- GPU instancing (activated by default)
- LOD crossfading
- All Unity render pipelines
This table shows the performance of an impostor compared to a real mesh of with 140,000 triangles:
Instantiation of mesh | Real mesh Run time for a frame |
Impostor |
---|---|---|
100 | 9,09 ms | 2,77 ms |
400 | 29,41 ms | 3,17 ms |
800 | 62,5 ms | 4,01 ms |
1600 | 111 ms | 5,78 ms |
Warning
This feature doesn't work with trees that have been created from the Unity built-in tree generation process. The reason is that trees already include an optimization process.
Specify these parameters:
Parameter | Description |
---|---|
Maps resolution | The resolution of texture maps that are baked to render the impostor. Example: 4096 x 4096. |
Atlas size | The square root of the size of the atlas of the different captured frames. The higher the value, the smoother the transition between frames, but the more demanding in terms of performance. |
Impostor type | Select the type of impostor:
|
Render on | Select the geometry on which the impostor is rendered:
|
In this example, the yellow area is still calculated even though there aren't any rendered pixels:
The impostor topology wraps better the initial mesh than with a quadrangle:
Impostor shader
This feature leverages a dedicated shader that you can correct if needed. For instance, if the impostor shadows are reflected on the model itself, you can adjust the Shadow Bias parameter.