Download

Animation Blueprints ? why?

Hi all,
I have been using UE4 for around 1 year(part time) with strictly C++ recently I have been playing with the Animation part but have a problem why animation blueprints being inefficient, I was not expecting the animation system to work this way. It seems strange to me that animation blueprint would work on a tick event and not just change the animations when required. I recently started a vive VR game and have a left & right hand mesh as the motion controllers I was experimenting with the animation BP and found that I would need an animation BT for each hand and for the gun that each hand could hold but this is wildly inefficient as I know exactly when the animations need to be played and having them managed by a state machine that checks every tick seems madness. I have looked at calling the montages from code but this does not seem well supported and was getting strange behavior when playing montages with a negative play rate.

I guess I am asking is every one using animation BT’s? or is there a better way to call the animations yourself with all the variables needed and completely bypass the animation BT and state machine.

Cheers
Troublesum

https://answers.unrealengine.com/questions/292345/how-can-i-play-animations-strictly-from-c.html

Is the closer you’ll get…

Hi thanks for the reply.
So there is no way the play a percentage of an animation(single) not a blend of animations? as in play percentage of an animation from user input in C++

I’m also curious about Animation Blueprint ticking performance. I always avoid putting any logic into ‘every tick’, but I don’t know, maybe Anim BPs are optimized somehow? Can we e.g. control animation blueprint tick interval? (so it wouldn’t check every tick, but let’s say every ~0.1s?)

You can convert animations to a “single frame” sequence and evaluate it from 0.0f to 1.0f, I just don’t remember how.
Last time I went deep on these was 2014, so yeah

I also experienced the same thing. I am confused

By all means you can “layer” your animgraph as part of your animation BP with out the need to use conditional based state machines and channel state changes using blend by’s and blend spaces.

What can confuse things is the idea of state machines is old school animation migration was coded to change the state based on an argument that had to be filled to accomplish the proper blending at the proper time so a normal argument would be say that the player can exit from a run to a walk state once the animation is 90% completed to create a much cleaner blend to a walk state based on the left foot forward rule. In 2016 there are now better options available to create proper blending as part of the event graph that is not based on tick or completing a state machine nested condition and in theory could poll the character class for the required state changes.

Did this back a while and needs a bit of an update but will do as a primer.

Animation migration by laying.

https://www.youtube.com/watch?v=G_YCk-90YY0

The benefit of animation by layering is the migration is based on building logic blocks where the state for that block as an absolute value change with out nested conditional wait states

You meant that the state machine is calculated on tick or you were just talking about the “Update Tick Event” in the Event Graph of the Anim Blueprint?

If you were talking about that last part (the Tick Event), you don’t have to use it if you don’t need to. As you mentioned, you know where to start and end animations, you can just call your AnimBlueprint and switch the value of the variable at that moment instead of checking on tick.

Single frame

Not sure this is relevant anymore, but right click the anim node and convert to single frame. That will expose the time float and allow for full control of what part of the animation to play. I suppose that was what you meant right?