How to make an animation track for multiple Skeletal meshes via Blueprint?

Hey there,

I´m working on a blueprint for a complex anatomical model with 300+ skeletal meshes.
I´ve set it up so I can add each muscle/organ organised in layers.

Now I need to control animation for all of them.
I tried several things that didn´t work:

  1. Using “Animation data” variable works, but that can´t be exposed to cinematics and I can´t change any parameters.
  2. Using “Play animation” doesn´t play the animation.

What I ended up doing now is:
3. Using “override Animation data”, feeding it an “animation sequence” variable and then adding variables for play position, play rate etc.
This allows me to make the animation sequence to play a variable, but none of the variables I created for “play rate” “position” or “is playing” works in sequencer.

I really need some help understanding this…

Hello,

What you’re doing is REALLY HARD (at least for me) to understand based on a few lines of explanation. Could you fast-track my understanding with a video?

I might catch something you’re missing.

Yeah, I either give too much or too little information on the subject…:slight_smile:
Its particularily difficult for me, because most devs work for games and I only do linear content/cinematics, so my needs/thinking offen differs…

Here is a screenshot of what I´ve come up with now:

I also have an editor tick event (using livelink update as recommended somewhere,) that fires when I check “play in editor” bool:

What that allows me to do now is to assign one animation sequence for ALL skeletal meshes (sharing the same skeleton of course) in my blueprint (green) AND it lets me animate the play rate or play position of the sequence.
I think this is actually better than what I originally was looking for:
A way to simply add an animation sequence track for all skeletal meshes (red).
I can also override animation for some meshes, for example the heartbeat on the heart (blue):

What I´m not quite happy with yet:
In screenshot 01 you can see how I have collected all skeletal meshes into an array. If I just add another sequence for the heart skeletal mesh, it doesn´t work, it seems it gets overridden by the array sequence above (as its updating every frame and the heart is in the “all skeletal meshes” array I assume?).
So I have to exclude the heart from the array, based on the condition “Heart animated?”.

This may lead to other issues in my blueprint, where I use the “all skeletal meshes” array, I haven´t tested that yet.
And it would also require me to add more sequences for other skeletal meshes I may want to exclude in the future.

On top of that Unreal keeps freezing on me when I have the livelink event plugged into the animation update function while compiling.
Seems to happen mostly when I had the level sequence open while its fireing, not sure exactly.
In that case I need to force close unreal so I can keep working.

You’re asking me!? I have no idea! :face_with_spiral_eyes:

I’m going to try and simplify your issue, because it has a lot of moving parts.

Your goal, if I’m understanding correctly, is to remove the HEART skeletal mesh from the rest of the array, without compromising the integrity of the animation states of the other indices?

If so:

Where the index assignment of the HEART is a float value to be excluded.

I think what I utlimately want is something else that I´m still trying to figure out:

  1. I want the same base animation or pose to play on ALL skeletal meshes.
    I achieve this right now by adding all the meshes into an array called “All skeletal meshes” and piping that into the above graph. This part works.
  2. I don´t actually need a different bone animation to play on any of these assets. Any animation that is different would be stored in morph targets, or I would simply hide the specific part and replaces it with an alembic (for eanything more complicated like stuff breaking apart etc).
    Apart from that all the additional animation would be morph target animations.

So what I need to figure out would be how I could (ideally) make a picker in the Blueprint that simply lets me pick specific parts from the blueprint and add it to an array and then have a morph target animation play additively to the base animation.

For example: All the body parts would have an idle animation and then I´d add a heart animation additively.
As the heart is also rigged to the same skeleton, I could then change the base animation into running and have the heart have a faster heart animation added additively.

The way I have made the morph target animations right now is to simply record an empty animation on the mesh based on a default pose and then add curves for the morph targets.
What I dont quite understand yet is how these animations would be blended additively (only the animation of the morph target curve, or would the base pose its animated in also be blended onto the other base animation?) and how to add an additive animation via blueprint.

I found another post about animation montages that sounded unecessarily complicated, I basically want something similar to this youtube video, just controllable via blueprint:

As I have an array of skeletal meshes, I can´t just drag an animation sequence into the sequencer.
So, yeah, still not quite understanding where to go next…
Also, the way I got the play rate and position to animate and show when I scrub sequencer is rather buggy. I have a “livelink event” setup, that helps to tick in sequencer, but Unreal keeps freezing when I recompile.

You might want to use an Animation Blueprint instead of a regular one, because regular Blueprints aren’t meant to handle animation transition states on the fly.

I would do that instead, utilizing the STATE MACHINES.

Quick update:
There is a really simple solution to this, at least for most of it.
You can simply use “Set leader Pose component” and define a “master” skeletal mesh.
As long as all skeletal meshes reference the same skeleton, they will now follow that master component, including what type of animation (blueprint or anim instance).
You can then move the animation sequence in sequencer or change the playrate and all skeletal meshes will update.

Couldn´t be easier, don´t know why it was so hard finding that information…

I looked at “modular character rig” or something, thats how I found it.

1 Like

For the love of god! After a lot of searching, this is the solution! Thanks, thank you very much!!!

You´re welcome!
Its often just not knowing the right keywords for searching…

Be aware though:
At least for me and some others there is currently a problem when enabling hardware raytracing, which requires “use compute skin cache”: if you enable that, it crashes any map using “lead pose component”.

So, if you need raytracing, make sure you try that first.
Might just be a particular setup problem with hardware/drivers, but for me its still an ongoing problem now.