#Blueprint for controlling animation with 300+ skeletal meshes

1 messages Ā· Page 1 of 1 (latest)

wind totem
#

Thought I'd create a thread out of this for easier management.

#

So I made this actor with a bunch of skeletal meshes for start.

#

I made a level sequence. And I dropped one of those actors into the level.

#

I made an editor utility blueprint. Override Run, and run this logic. It gets all selected actors, and just adds all of that actor's skeletal mesh components to the sequencer. I hard coded the sequencer here. This could maybe be made into an editor utility widget instead with a better UI, but šŸ¤·ā€ā™‚ļø

#

Right click the utility and run it.

#

And the actor and all of the components are added to the sequencer.

gaunt fractal
#

Thanks for the effort, this gives me maybe a starting point.
The issue with this is, that if all my 300+ skeletal mesh components are in one blueprint I need to select only a few of them in the viewport.
I can“t just click on the bP actor in the viewport as that would then add ALL 300+ skeletal mesh components to the sequence.
I need to access the blueprints components part in the details panel, before I can select its components in the viewport and I don“t know if its possible to create a function that lets me do that via blueprint.

Not sure wether it makes a difference for the selection part of the blueprint you created, wether the actors are selected in the viewport directly (which would only let me select the blueprint itself) or wether it would also register the selection I can make in the viewport, if I go into the blueprints component panel:

gaunt fractal
#

Also: Adding specific track types would be perfect, but just getting the skeletal mesh actors into the sequence itself would be a starting point.
Assuming this wouldn“t run in the blueprint itself, if I made that into a function to call in editor?
I“m not in front of my computer atm, I“ll try and see if I can recreate it tomorrow.

wind totem
# gaunt fractal Also: Adding specific track types would be perfect, but just getting the skeleta...

I don't think you could put this in the BP itself. The issue with that is that it's a class and not an instance. And they don't allow editor style functions outside of editor stuff.

That said. There are Editor Utility Actors. If you have no intention of making a cooked version of the software, you could easily put the meshes and logic in the same editor utility actor class I think.

But yeah. Above logic will get you the skeletal mesh components in. You can filter them by tag, or assets, or whatever else if you want as well.

I'll post here if I figure out how to add the subtracks.

gaunt fractal
#

But yeah, filtering by tag is not an option, I“m already doing that to filter only skeleton/muscle/organ layers for example, but for specific parts I just need to be able to select them manually.

#

Threads are awsome, I should use them more often....:)
I“ll let you know if I fgure something out as well, hopefully the rest will work now, so I can at least finish the deadline stuff, this is still "bonus content" right now for me...

wind totem
#

So adding SOME tracks are easy. EG this is to add a transform track to each mesh.

#

This is an animation track

#

Still not clear on how to set more generic properties like the skeletal mesh asset.

gaunt fractal
#

Yeah, editor actor subsystem is only available in editor blueprint utility class. I tried changing my blueprint actors class to "editor utility actor", but couldn“t access it from there.

#

Without being bale to select exactly WHICH of the 300+ skeletal meshes I want to add to the sequencer, its useless to have the functionality at all, then I“m better off doing it manually.
I mean, the whole idea of the blueprint was to simplify this, by having the skeletal meshes in a blueprint in the first place, so I could at least preselect by tags like "Muscles" and "Bones" to then change visibility in bulk or assign animation to ALL of them, without having to send them to the sequencer first.

This is the downside: Now I need to manually select them by name, if I want to override any of them in the sequencer...

#

I“ll let it sit here in case someone still figures something out, but I gotta get to my deadline related stuff first now...:(

gaunt fractal
#

Yeah, that was a wasted weekend...:(
Spent 12 hours yesterday trying to get the blueprint animation stuff to work, then another 8 after giving up doing it all manually like I used to...
Honestly, I“m not sure its worth it anymore.
Maybe I“ll have to revisit the sublevel+subsequence approach.

  1. Being unable to manually pick elements to hide/override morph target animation/switch+animate materials is a huge bummer and a waste of time. Having to type out the specific names when adding a new track inside the blueprint is much worse than working with subsequences.
  2. Maybe I need to consider rebuilding my construction script from the ground up.
    Instead of spawning everything at once and within the construction script, maybe I can device a different solution that lets me spawn all the skeletal meshes by tag ("skeleton" "muscles" "organs").
    A) Would it be possible to create sublevels from within the construction script and spawn them into these by tag? In that case I could then use the blutility you got me started on to then add each sublevels actors to each own subsequence. At this point I could then also set them to use either animation blueprint or animation asset and pick a specific asset to use, or set override materials etc.
    B) I could also figure out if its possible to instead of spawning them into sublevels first to simply spawn them directly as possessables into subsequences, again, with the option to spawn them with different animation classes or assets already set.
  3. Ultimately a lot of my problems might be fixable by using control rig: Instead of having to change animation assets in the sequencer, either by the currently very unperformative way of using a repeater event and constantly iterating through all skeletal meshes to change the animation assets play position, or by changing the animation asset itself outside of unreal, I could simply change the animation using the control rig.
    Which would (afaik) also let me use additive morph target animaitions.
#

I“m not sure, but I think its not possible to create spawnables and assign them to a sublevel, so I might have to forgo that idea and for sorting I then would need to just have subsequences for each anatomy layer of skeletal meshes.

#

Maybe a combination of all these ideas could work too.

#

Maybe I“ll stick to the blueprint for the setup and to have consistency across all levels/sequences that reference it and so I can easily switch layers on or off as needed and change materials/overrides or animation mode quickly, before starting to animate.

gaunt fractal
#

And then for animation, I need to expand the blutility so it:

  1. Creates a master Sequence and subsequences for each layer.

  2. Then iterates through all the skeletal meshes in the blueprint and adds them by tag to their respective subsequences. I tagged them already for managing in the blueprint.
    So all meshes inside the blueprint with the tag "Muscles" would go into a subsequence called "SubSeq_Muscles" etc.

  3. Instead of setting blueprint animation class or animation asset, I also spawn the control rig in the master sequence.
    So now (in theory), thats where I would load in the animation for all skeletal meshes in the level.

  4. and 2. should be doable, based on what you showed me so far and what I“ve learned myself.
    Not so sure about 3. That is: I don“t know if I can JUST spawn the control rig in the master sequence, or if it would need to be spawned for EACH skeletal mesh in all the subsequences.
    Because that would then probably get super sluggish again.
    If they don“t inherit the animation from the control rig in the master sequence, I could at least
    spawn ONE actor with control rig there (for example the body) and animate that and then bake that down to an animation asset for all other skeletal meshes in the subsequences to reference.

gaunt fractal
#

Goddamn it.
I think i cracked it and it is stupidly simple:

#

This allows me to define ONE actor as master and all actors piped into the target simply follow...