XPU Animation

 

XPU Animation is a system introduced in AtomsUnreal 3. It consists of dividing the simulation of agents between CPU and GPU. The CPU simulates the movement of the root bone and calculates the time and weight of each clip the agent is using at every tick. This information is passed to the GPU which then uses it to blend the various animations and calculate the final pose. The full pose of each agent is saved only on the GPU and is then passed directly to the skeletal mesh instanced components for drawing. This increases performance and reduces CPU memory usage dramatically. The memory used on the GPU is only occupied by a single buffer containing all the animated sequences contained in the state machine, two buffers containing the pose of the agents and another buffer containing root bone data and visibility data of the agents.

Since the root bone is simulated on the CPU, it is still possible to use the ground adaptation, navigation meshes and capsule collision. One of the limitations is the inability to access the bone transforms from the CPU, the blueprint or agent methods (i.e. get/setJointMatrix/Transform) can’t be used. The XPU equivalent exists for components or behaviour tasks like joint transform/aim/align. These components/tasks use compute-shader to do joint transformation directly on the pose buffers on the GPU.

Almost all the atoms state machine features are supported, like transition clips, random clips inside a single state. At the moment, only additive clips are not supported.

For secondary animations, it’s possible to use the PlayAnimationXPU behaviour tree task node or the agent group actor playAnimationXPU method.

Please note, any anim sequences used by the PlayAnimationXPU node must be included somewhere inside the state machine asset, even inside an detached state. Since the XPU Animation loads on the GPU all the animation clips used inside the state machine, if the playAnimationXPU uses a clip not used inside the state machine, the XPU system is not able to play it.

It is possible to export an XPU cache from your simulation and reuse it using the cache reader XPU component. Otherwise, it is still possible to export Atoms and USD caches from an XPU simulation and use it in Maya/Houdini/Katana/Gaffer. The state machine XPU operator has a method that can build the full pose from the anim clip weight/time and secondary motion data. So it uses this method to extract the full agent pose and save it inside the cache. Unfortunately, this method doesn’t consider the transformation done by jointTransform/Aim/AlignXPU task nodes.

 

Copyright © 2017, Toolchefs LTD.