Control Rig Set Bone Initial Transforms workflow

Hello.

For long time (since control rig was introduced) I have struggled with this workflow. Until now I have worked around it, but I think i need to get to the bottom of it once and for all.

It seems like a legit workflow and I would think is one of the reasons control rig exists - to have reusable rigs. Either I am missing something or there are some bugs !?

Basically the idea is to have one master procedural control rig (where all controls are built procedurally - so the rig always adjusts correctly to whatever skeleton proportions are coming in)

Different actors can use different skeletal meshes with different skeleton proportions ( different skeletal assets who share the same hierarchy and naming, but different proportions - for example vehicles with different wheel base lengths or taller/shorter characters).

I have my master blueprint which initializes control rig component bones from skeletal mesh asset (“Set Bone Initial Transforms From Skeletal Mesh”) and maps its output to skeletal mesh component.

[Image Removed]

I call it from “On Pre Initialize” event of the control rig component. (If I call it from any other place, I get error saying it can’t be called from there even though it still works sortof)

[Image Removed]

Now each child blueprint can use different skeletal mesh - control rig component gets reinitialized to that skeletal mesh asset initial bone transforms.. So far so good and it seems to be working but not really.

First - as soon as you save the level, all child actors snap back to original skeletal mesh pose (the one with which the control rig was created originally). If I connect rig initialization to “On Pre Construction” event, this does not happen, but I get the error messages..

All of this breaks down completely as soon as you start using Level Sequences. Load the provided LS_RigOverrideTest or create new sequencer with both actors.

Child actor snaps back to original base skeleton pose.

If I connect rig initialization to “On Pre Construction” event, it works at first, but as soon as you change frame/try to animate - it snaps to weird broken pose..

It feels like original pose gets cached somewhere in the rig itself and sequencer ignores whatever was set by the “Set Bone Initial Transforms From Skeletal Mesh”.

[Attachment Removed]

Steps to Reproduce
Open project. See two actors - each has a different pose, skeleton (same hierarchy), mesh. Both use the same procedural control rig.

Blueprint initializes control rig bone initial transforms from actors skeletal mesh asset.

Open LS_RigOverrideTest level sequencer or make a new one and drag both actors in. As soon as it happens, child actor snaps to parent pose (original skeleton pose with which the control rig asset was created)

Move child actor slightly - it forces it to reconstruct and it snaps to correct child skeleton pose.. Click save - it snaps back to parent pose or if you change sequencers current frame, it will go to weird pose (mix of animation + parent pose)

[Attachment Removed]

Hey there,

Yeah, Control Rig is set up for dynamic skeletons for exactly the reasons you’ve mentioned. That said, there are some issues with your setup, and I have a few questions.

Issue 1:

Control Rig Component - Typically, the Control Rig Component is for controlling the skeletal mesh from Blueprint or code. Sequencer uses other mechanisms. For the way you want to set this up, is it important that you can control the rig from Blueprint or from C++? The main way we recommend setting up a control rig at this point is through the Anim Graph. This allows you to thread the control rig update between different animation states. If you don’t want to run an anim graph, that is fine; the control rig component will work ok. The issue, though, is that you won’t be able to animate the control rig through Sequencer from the control rig component. You will need to do it the more traditional way: add the control rig track to the skeletal mesh as a child track.

[Image Removed]

This leads to the other point. I think a better way to set up the skeletal mesh position is from within the control rig itself. We have a node called Import Rig. This imports the skeleton from the attached control rig, and then you build the rig off of that using name or whatever approach you want. This simplifies your blueprint a bit on the front end, since you don’t need to query bones and set that up in blueprint. I’ve modified your rig to show you how I would approach that.

[Image Removed]The setup is essentially the same; then the event you would use would be the pre-construction event for just assinging the mesh.

From there, you can use the preforward solve to set your rig element positions etc for animating from blueprint. Let me know some more details on how you would like to control the vehicle and then I can give some more recommendations, but this should allow you to do everything you need.

Dustin

[Attachment Removed]

Although it seems to only work if using Control Rig through Animation Blueprint.

This was not the case in the example I showed above, it works out of the box. You would need to share your updated setup to see what the issue might be.

the rig does not bind to Skeletal Mesh using “Add Mapped Skeletal Mesh” anymore and I don’t know any other way to link skeletal mesh with Control Rig Component. Am I missing something?

Considering the first part, I would want to check an updated repro.

I always thought ABP control rig node is mostly for post-processing and other independent procedural animation stuff, not keyframe animation with sequencer.

Sorry this might have come across wrong, this is not what I meant. The control rig track in sequencer doesn’t use the animbp path. Its a track that drives the mesh pose. What I was saying is that we typically, for runtime rigs, use the animbp node and not the control rig component because we are often doing post-process or procedural. Again, all of these tools are based on your goals.

Using Control Rig component has worked well for me so far and I think it is a good workflow (you get access to all the Control rig events) and it has been the only way I have been able to achieve what I need - keyframe animation through sequencer + blueprint/c++ access to the control rig. Except for this one problem I described in this thread - adjusting control rig to various skeletons which just seems like a bug .. if that would be fixed it would just all work super nicely

If your goal is to animate in the engine in just sequencer, you shouldn’t use the control rig component. You will want to use the typical add control rig track to skeletal mesh component. We have lots of examples of this workflow. I would recommend following this workshop https://dev.epicgames.com/community/learning/talks-and-demos/jZ74/workshop-rigging-in-unreal-engine.

Dustin

[Attachment Removed]

.. not sure if attachment worked.. here its again

[Attachment Removed]

I posted a response to the other EPS you have open, the answers here stem from the same issue.

[Attachment Removed]

Thank you for the answer. Using “Import Skeleton” node would be great. Although it seems to only work if using Control Rig through Animation Blueprint. I can’t get it to work together with Control Rig component - the rig does not bind to Skeletal Mesh using “Add Mapped Skeletal Mesh” anymore and I don’t know any other way to link skeletal mesh with Control Rig Component. Am I missing something?

I also struggle with using Animation Blueprint with Control Rig + Sequencer. I always thought ABP control rig node is mostly for post-processing and other independent procedural animation stuff, not keyframe animation with sequencer.

If I have Control Rig node in ABP on the skeletal mesh ( and no Control Rig component in BP ), then Sequencer just does not pick it up and never shows Control Rig control animation tracks. If I add control rig track manually on the skeletal mesh, it just overrides the Animation Blueprint completely. So what am I missing? Is it possible to animate ABP control rig node from sequencer?

Also I usually also want to write and read some values to and from Control Rig. Writing through ABP Node is doable with ABP variables, but not reading.

Using Control Rig component has worked well for me so far and I think it is a good workflow (you get access to all the Control rig events) and it has been the only way I have been able to achieve what I need - keyframe animation through sequencer + blueprint/c++ access to the control rig. Except for this one problem I described in this thread - adjusting control rig to various skeletons which just seems like a bug .. if that would be fixed it would just all work super nicely.

.. plus the bug with modular rigs just breaking and loosing all tracks in sequencer I reported in another thread :frowning:

Thank You!

[Attachment Removed]

Hello again. I have added updated project - Look at Rig_Base_New and BP_BaseActorNew .. It uses “Import Skeleton” node in the rig and I don’t know how to make it work now - control rig just does not pick up the skeletal mesh I am trying to map it to and the mesh is not animating.

We really need control rig component. Our use-cases are mostly vehicle animation/simulation (in various combinations across different projects - animation projects and also digital twin type projects) and they combine sequencer animation and runtime animation - we have quite advanced vehicle setups which are heavily dependent on blueprint/C++ access to control rig component. For example, we need to drive some control rig controls along spline, control various other control rig parameters while allow artists to animate other controls and also read out various values calculated inside the rig. In some cases even switching control rig classes at runtime. etc.

Over the years these workflows have proven to be very effective except the problem this thread is about - re-using control rigs on different skeletal proportions in combination with using control rig component and sequencer seems buggy. If I can find solution to this, I would have everything I need.

And as I mentioned, transitioning to modular rigs brought new set of problems which are now mostly fixed except the other bug I mentioned.

ps. Here is one product I have developed using modular control rig which utilizes these workflows. Not sure if you can access it… if not I can share privately.

https://www.fab.com/listings/12966fc3-0b5f-4e19-99ed-adb56f1a457d

Features overview: https://www.youtube.com/watch?v=U1a2afrBtW8

Demo: https://youtu.be/HxDQHCP4Ybw

[Attachment Removed]