The Crowd Animations is an extension for GPU Instancer, and requires GPUI to work. It is currently in BETA stage, it will be released in the upcoming days on the Asset Store and will improve with future updates.
Crowd Animations is an out of the box solution for using massive amounts of animated characters in your scenes with high performance. CA uses the GPU Instancer core and adds GPU skinning techniques on top of GPUI's indirect instancing solution and GPU culling techniques. This results in a combination which will allow you to get the most out of GPU Instancing in Unity for your animated characters.
Crowd Animations works by baking the bone data of animation clips into a texture and reading that texture in Compute Shaders to feed skinning data to the rendering pipeline for indirect skinned-mesh instancing. Using the GPU Instancer backend for visibility tests in the GPU as well, the Crowd Animations extension is designed to be the ultimate solution for a GPU based animation workflow.
Crowd Animations supports two different animator workflows:
You can use the Unity Mecanim Animator to handle the state machine for animations as usual, and GPUI will read the animator states from the Mecanim Animator. This will let you use your existing Animators and scripts with Crowd Animations, and make it possible to use indirect GPU Instancing out of the box with all the GPUI features such as GPU frustum and occlusion culling. This workflow increases GPU performance while rendering skinned meshes, but it won't be an ideal solution for projects that are CPU bound since the Mecanim Animator will still create an overhang for each instance.
You can use the Crowd Animator to handle your animation clips in the GPU through the GPUInstancer API and decide which animation to play at a given time. This workflow will require you to write your own scripts (or use visual scripting tools) to handle animation states manually - but this workflow will also let you get the most out of GPU Instancer since there won't be any overhang created by the Mecanim Animator.
Crowd Animations Features:
- Indirect GPU instancing with skinned meshes.
- GPU frustum, occlusion and distance culling.
- Custom shader support (requires manual set-up).
- Animation Blending (up to 4 animations).
- Multiple skinned mesh renderers and submeshes support.
- LOD Groups support (all LOD meshes must use the same rig).
- Bone attachments (Mecanim Animator workflow only).
- Root Motion support.
- Ability to use custom shadow distance per prototype and to choose the LOD to render shadows with.
- Automatic detection of added and removed instances without any additional code.
- Rigidbody and physics support.
- Easy to use interface.
- Animation Layers and Masks are not supported.
- IK is not supported.
- DirectX 11 or DirectX 12 and Shader Model 5.0 GPU (Windows)
- Metal (macOS)
- OpenGL Core 4.3 (Windows, Linux)
- Modern Consoles (PS4, Xbox One)