Create Impostor
Generate octahedral impostors. View points around the model will be captured in textures and rendered by a custom shader.
Parameters
Parameter | Type | Description |
---|---|---|
MapsResolution | MapDimensions | Generated textures size. |
resolution (Maps Resolution) | Int32 | The resolution of texture maps baked to render the imposter (e.g. 2048x2048). |
atlasSize | Int32 | 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. |
impostorType | OctahedronImpostorType | Octahedron: Viewers can view the impostor from any point of view. Hemi-octahedron: Creates impostor for the upper hemisphere, to optimize performance. Use this type if users can't view the model from below. |
Additional Information
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 or a bounding box (12 triangles). 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.
In this example, the yellow area is still calculated even though there aren't any rendered pixels:
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.