Performance tips

Here are some tips on getting the best performance out of your effects on any platform.

Only use vertex driven meshes when necessary

Vertex driven meshes require a lot of calculation. Unless the mesh has to track the users face completely, consider using bone driven mashes or even rigid objects where possible. Sometimes rigid objects can provide a suitable occlusion mask.


Simplify the FBX models

Keep the geometry data simple. Minimize the number of vertices and polygons. Avoid making very small polygons and don't create polygons that aren't visible from any angle.

Disable Dynamic UVs when possible

Ensure that the Dynamic UVs disabled mode is selected for all nodes that don't require this functionality.

Optimize texture size

Keep the texture size under 1024x1024 and place multiple textures in a single image file when possible. Unless the texture uses transparency or is very sensitive to small changes (such as LUT textures), import the texture as a JPEG. Also, try lowering the compression quality to save space.

Use fast shaders

Some shaders are faster than others, always use the fastest, simplest shader possible. For example, if you don't need real-time lighting effects, use Unlit shaders instead of Standard. When writing custom shaders avoid making any unnecessary computations, only use the lights you need, use the lowest precision types you can, and test the shader thoroughly.

Don't attach more components than needed

Only attach the components you need. If a previous version of the effect used a component, but the new one no longer does, remember to remove the component in the component editor to avoid unnecessary computations. If more objects need to use the same positioning component, attach it to a common parent object. Consider if the desired effect can be achieved in a simpler way. For example, if you want a simple swaying motion, consider using an animation instead of attaching a physics component.

Optimize model animations

Similar to components, If more objects need to use the same transforming animation, ensure that the animation affects the common parent object, not every node individually. Try to make simple looping animations instead of overly long repeating ones.

Use face (Clockwise/Counterclockwise) culling

Face culling improves performance by not drawing invisible triangles. You can improve the performance of your effects by selecting a culling mode other than Off wherever possible.

Did this answer your question?