[RELEASED] GPU Instancer - Crowd Animations

Hi there,

The default execution order for the Crowd Manager has been updated to run earlier (-1010) to address issues with animation events. If you have code that needs to execute before the Crowd Manager, you can adjust its order in the Script Execution Order settings.

Since the Crowd Manager inherits from the Prefab Manager, calling FindObjectOfType<GPUInstancerPrefabManager> will return the first instance found, which might not be the intended one. To specifically retrieve the Prefab Manager in your scene, use the following code instead:

GPUInstancerPrefabManager gpuiPrefabManager = null;
var managers = FindObjectsOfType<GPUInstancerPrefabManager>();
foreach (var manager in managers)
{
    if (manager is GPUICrowdManager) continue;
    gpuiPrefabManager = manager;
    break;
}
1 Like

Hi again, I’m really enjoying the performance of Crowd Animations! I’m having a bit of an issue with the animation blending however, because when I blend my character between idle (standing) and walk animations, there is somewhat noticeable distortion. I’ve seen two other examples in this thread which somewhat represent my issue (the turret and the not-an-ogre woman).

Do you have any tips on dealing with this? The idle and walk animations don’t seem much different so I was hoping they would blend/transition ok. I would also like to blend animations that could be more different. I am noticing mostly that the head shrinks and grows.

Is there any way to get the volume to preserve better?

Hi there,
The Crowd Animations uses linear interpolation, which can cause the issue you’re describing, especially with noticeable differences between bone rotations.
If you’re blending animations with consistent weights and durations, consider creating and baking new blended animation clips. Using a single clip is also more performance-efficient than blending.
If that’s not feasible, the Compute Shader handling the blending would probably need to be modified. If you can contact support email with a reproduction project, I can look into it for a solution.