By using the culling system, it is possible to stop cloth simulation for characters that are not drawn on the camera.
This greatly improves performance, especially in first-person FPS and VR.
The following video is an example of how camera culling works.
Notice the performance improvement by enabling the culling system.
Camera culling is a function that stops cloth simulations that are not drawn on the camera.
This is determined from inside and outside the camera’s viewing frustum.
“Camera Culling Mode” sets the behavior when hidden from the camera.
|Off||Disable camera culling.|
|Reset||Reset the simulation.|
|Keep||Pause the simulation.|
Automatically linked with the character’s Animator’s “CullingMode”.
Culling judgment method
Basically, culling is determined from the display state of the character’s Renderer component.
Therefore, in order to perform culling, it is necessary to register one or more renderers.
“Camera Culling Method” specifies how this renderer is registered.
|Automatic Renderer||Automatically set from the character’s Animator.
This is typically all Renderer components under Animator.
|Manual Renderer||Configure Renderer manually.|
Checking the culling status
You can check whether the cross component is currently displayed or hidden from the information in the inspector.
If it is excluded from the simulation, the Visible flag will be False.
Things to keep in mind
Notes when running the editor
Note that when running in the Unity editor, the editor’s Scene view is also subject to camera culling.
For example, even if a character is not shown in the Game view, if it is shown in the Scene view, it will be drawn and camera culling will not be performed.
The character’s shadow is also subject to drawing judgment.
Please note that even if the character itself is not visible, if its shadow is visible on the screen, it will not be culled.
Not all functions will stop
Even if the simulation is stopped due to culling, the minimum necessary processing is still being executed.
Please note that this does not mean that the load will be 0.
Animator culling issue
When Animator’s culling mode is “Cull Update Transforms”, when the character appears on screen again, a pose with simulation disabled may be displayed momentarily.
This is because the Animator’s culling is determined during the rendering process, and the pose is written to the transform on the fly, overwriting the simulation results.
This is a Unity specification and unfortunately cannot be avoided.