Download

UE4 Multithreaded Animation Feature

Hi All,

I placed this post in Animation section first and received no answer. So I deleted that thread in animation forums and reposted it here in C++ game programming!

UE4 is supporting multi-threaded animation from version 4.7. The docs contain a very restricted info about this feature while it is an important one. I want to know how are the multi-threaded animations being ticked. So I just write two possible techniques here. It would be great if you could tell me which one could be approximately correct or maybe none of them:

1- Is the multi-threaded animation feature working at the layer of one actor? I mean is UE4 distributing the calculation of different poses of one skeletal animation component on different threads? For example I have a state machine like the attached image. It contains different pose generators which can be calculated synchronously at some points after evaluation.

AnimationSystem.jpg

2- Or is it using a thread pool and each skeletal animation component of each actor is considered as a task. If this is true we are going to have some problems in the dependencies between different actors because some actors are in need of exact position/rotation of other actors specially the ones who have root motion. I know that we can force the skeleton pose to be ticked via functions GetMesh()->TickPose() and GetMesh()->RefreshBoneTransforms() but calling this function via code should be restricted if UE4 uses this technique for muti-threaded animation since forcing poses explicitly via code could have some performance penalties.

When we migrated to 4.7 we faced some problems on reading the exact bone locations which might imply that the second one is correct.

Thanks in advance for your replies :slight_smile: