Unity Products:Amplify Impostors/Manual
Amplify Impostors is a small but powerful tool that allows the creation of different types of Impostors, which are substitutes of complex high polycount objects made from flat and simple polygons, that render a fake version of the original object (hence the name). Much like traditional sprites, they usually consist of a single flat quad polygon or simple polygonal shapes and, like classic billboards, always face the camera. Think of them as a camera facing cardboard version of the object you want to render. The common purpose of using such technique is to be able to represent far distant objects with a very low polycount, for instance, trees, bushes, rocks, ruins, buildings, props, etc.
There are various ways these impostors can be created, each with their own advantages and disadvantages. This tool intends to provide the most useful and popular techniques while making the process of creating them as simple as possible.
- Open AmplifyImpostors.unitypackage
- After Unity loads it will display the "Importing package" window, select All and click Import
Quick Start Instructions
- Select a game object in the scene or a prefab in your project
- In the inspector window search for and add the "Amplify Impostor" component
- Press "Bake Impostor" and select where you want to save the impostor files
Three pre-baked Impostor types are currently supported
(Real mesh on the left, impostor on the right)
Each one of these pre-baked solutions render surface component maps in order to support realtime lighting. This comes with support for:
- Forward and Deferred rendering
- Dynamic Lights and Shadows
- Depth writing for object intersections
- Global Illumination
- GPU instancing
- Dithering cross fade
- Custom Packed Maps: Render up to 4 maps and a custom material.
- Albedo (RGB) | Alpha Mask (A)
- Specular (RGB) | Smoothness (A)
- Object Normals (RGB) | Depth (A)
- Emission (RGB) | Ambient Occlusion (A)
- Custom Shape Editor: Automatically generates a custom shape to remove most of the transparent areas of the impostor to reduce overdraw. Also supports manual editing.
The inspector for the impostor is divided in two main sections, one is to setup its basic definitions and the other gives access to more advanced bake settings.
Here's the main inspector:
When an impostor asset is assigned to the component you can configure the advance bake settings:
The baker uses unity's built in shape editor to find a good approximation of the shape in place. This approximation might still need improvements in terms of polycount and shape, so some additional options are provided to better control it. Usually there's no need to touch these settings, but there might exist some odd cases where even the manual mode is necessary for some finer adjustments.
Some behaviors of the inspector and resulting bakes can be changed globally. You can find these settings in Edit > Preferences > Impostors.
Q: Does this replaces LODs?
A: Mainly no. Don't think of this as a replacement of regular LODs since impostors look progressively worse at close range, but more as an extension of it by replacing the last LOD level. For close to medium ranges you still want to use regular LOD meshes.
Q: Does it support unity LOD groups?
A: Yes, and also supports cross-fading. Just make sure to bake an impostor that matches the previous LOD level object for the best match when transitioning between the LOD levels.
Q: Why are impostor shadows so weird? Especially up-close.
A: It's partially due to the blending done between the frames which doesn't always match the binary nature of shadows, and also the differences in the depth between what lights "see" and what the camera renders. We'll try to improve this in the future, in the meanwhile you can try to refine how the shadow looks by changing the "Shadow Bias" in the light settings and/or in the impostor material property.
Q: Does it supports Anti-Aliasing?
A: Mostly. Just like regular sprites MSAA is not supported because it only helps the edges of geometry, but other screen space solutions do work, like FXAA or TXAA.
Q: Does it support Image Effects?
A: In most cases it should. There might be some precision issues if the effect is depth dependent, like SSAO, but for the most part it should work properly.
Q: Does it support metallic and specular pipelines?
A: Yes. Currently the baker generates a specular map regardless of the input materials. This ensures both pipelines are supported, as metallic maps are transformed into specular ones. In the future we intend to allow custom map bakes and shaders to support baking for both pipelines, so that metallic maps are no longer transformed into specular.
Q: Does it support skinned mesh objects?
A: No. It does however support animation of objects like moving, rotating and scaling, but not animated skinned meshes like characters. We do plan to provide a realtime baking variant that allows for animated objects to be rendered as impostors at some specified rate.
Q: Does it support SpeedTree assets?
A: Yes, and also supports hue variation. By default hue variation is off but you can turn it on in the impostor material.
Q: What can I do to improve the quality at close range?
A: Unfortunately the only thing you can do right now is to increase the texture resolution. This usually isn't enough to properly render an impostor at close range since other artifacts start to become obvious. Please notice that impostors are NOT intended to be rendered at close range, they are not a substitute for "real meshes", but rather an improvement of performance when rendering them from afar. So it's recommended that you use resolutions that are good enough for long distances. 2k maps are usually okay for that, and for mobile you can even get away with 1k maps.
Note that currently only shaders exposing a Deferred path are supported for baking, such as Unity Standard shaders. However, the Impostors created can be used in both Forward and Deferred modes. Also, while performance and quality of impostors will be continually improved, currently, Octahedron impostors have an issue where the impostor vanishes when looking directly from below.