how to make animation update less frequently?

Tell me how to make the animation update less frequently?

The situation is simple, those models that are close are updated as usual, and those models that are far away are updated not every frame, but let’s say 10 times less often, it will not be noticeable far away and at the same time you will see what is moving.

Just how to do it?

(animation humanoid, not root motion)

at least some direction?

The Animator component uses a PlayableGraph to progress through animations. According to the docs, a PlayableGraph supports a “manual” update mode where you specifically tell it when to update from a script call.

However, the Animator component itself does not have an update setting which corresponds to this manual update mode. It would be really nice if it did, but there’s probably a lot of downstream effects that cause problems for the AnimationController class if you jump forward through time in larger increments.

I have noticed exactly the behaviour you’re describing in several Unreal games and some big Nintendo games like TOTK.

Perhaps @Kybernetik has some further insight, he made the Animancer asset which does a lot of under-the-hood manipulation of these things.

I came across a variant of an animator on Dots, the meaning is this - all transforms are placed in an array and each frame is read, that is, on what frame what object should be in what position, so if you don’t update this reading every frame, you will get the desired effect, but that’s me so I guess…

So I’m thinking of trying to make this option (like in Dots) or is there a more acceptable option, I just also noticed that many AAA games use this effect, the only question is how exactly…

From what I’ve been able to find on the Internet you just pause the Animator with Animator.speed = 0 and then you just call Animator.Update() whenever you want to update it.

https://gamedev.stackexchange.com/questions/197869/what-is-animator-updatefloat-deltatime-doing

this is not entirely true, it will move either slowly or jerkily, but the point is to know where the bone will be after 5 frames (for example), but do not update it during these 5 frames, but already on the 5th frame put it where it is and it should have been if these 5 frames were updated… something like this…

If it’s moving slowly or jerkily you’re likely not passing the correct delta time through. I’ve searched some more and what I’ve described is more or less what others have been doing.

https://discussions.unity.com/t/582512/4

1 Like

That math looks really annoying. Calculating the time shift in normalized time on the clip that happens to be playing? Yikes.

Animancer’s Update Rate Sample demonstrates exactly what OP is looking for. The LowUpdateRate script in the Overview section has all the main logic, just replace the PauseGraph/UnpauseGraph with controlling the animator.speed and the _Animancer.Evaluate call with animator.Update and it should work the same.

1 Like