GPU Instancer:CrowdAnimations

From GurBu Wiki
Revision as of 15:44, 18 July 2024 by GurBu Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

About | Crowd Animations | Features | Getting Started | Terminology | Best Practices | API Documentation | F.A.Q.

Info.png  GPU Instancer Pro is now available (Asset Store page). For documentation of the Pro version, please visit GPU Instancer Pro Documentation.


The Crowd Animations is an extension for GPU Instancer, and requires GPUI to work. It is currently in BETA stage, and will improve with future updates.


Banner-CrowdAnim-HiRes-1920.png


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.


GPUI-CrowdAnimations-Chompers.gif


Crowd Animations supports two different animator workflows:


Mecanim Animator:


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.


Crowd Animator:


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.


Current Limitations:


  • Animation Layers and Masks are not supported.
  • IK is not supported.
  • Mobile support is designed for high-end devices and currently at an experimental stage.
  • Animation blending uses linear matrix interpolation, meaning blending animations that are very different might cause incorrect skinning results.


Supported Platforms:


  • DirectX 11 or DirectX 12 and Shader Model 5.0 GPU (Windows)
  • Metal (macOS, iOS)
  • OpenGL Core 4.3 (Windows, Linux)
  • Modern Consoles (PS4, PS5, Xbox One)
  • Vulkan or OpenGL ES 3.1 (Android 8.0 Oreo or later)