How to get control rig variables as outputs?

Hello.

I’m working on a control rig where I’d like to retrieve the location on controls created by that rig, and pass them over to another control rig.

I’m using 5.8

In theory, I should be able to select the variables in my control rig, make them public, then in the ABP control rig node toggle the desired variables as outputs and get them from there. I never “get” the variables in my control rig, I only “set” them in a forwards solve chain.

In reality, when I toggle output for a variable in the control rig node of the anim graph, the variable always appears on the left side of the node as an input, never the right as it should. When I toggle output on like this it seems tied to input, toggling one toggles the other.

The unreal AI assistant (which often is very helpful) insists that there are switches which simply don’t exist to tell the control rig that certain variables are outputs not inputs. It seems determined that extracting a variable from a control rig is possible, even though all of its suggestions are wrong.

This above^ shows the crux of the issue, I toggled on “spline points” as an output, and it also turned it on as an input and left it on the side of the node where I don’t need it.

Any suggestions on things I might have missed? Or is this functionality just broken? I’ve looked a little for other people having this problem and the complaints are years old.

If this method is broken, then are there any other ways of extracting these variables from somewhere other than the anim graph, maybe in a linked blueprint? I’d like to avoid adding bones to my skeleton, driving them in the control rig, and directly finding their positions, but I fear that might be the only valid option? - Hopefully not :smiley:

Cheers in advance!

Hi @Lost_Apple

Passing control locations or output variables between separate Control Rigs in the AnimGraph may indeed prove non trivial given how input/output pins exposed on the Control Rig node in UE behave.

Attempting to expose a variable as Public or attempt to expose it through the Details panel of the Control Rig node in the AnimGraph will cause Unreal to treat it as a bi-directional/input parameter on the node which is likely why you are seeing “SplinePoints” being locked on the left (input) rather than a clean output pin on the right-hand side.

Before exploring workarounds, I think it would be best to ask for a clarifying question that would help me better understand your intent:

  • Are you trying to pass these transform/location values from one Control Rig to another within the same AnimGraph or do you need to read them back into your main Animation Blueprint Event Graph/Character BP?

A couple options based on what you’re looking to do:

Check Variable Settings Inside the Control Rig Blueprint

Inside your Control Rig asset, make sure the variable (i.e. SplinePoints) is set to be Is Public in the Details panel.
Sometimes toggling Private/Public + re-compiling the Control Rig asset forces the AnimGraph node to correctly update its exposed pin list when you do a right click, Reconstruct Node on the node.

Using Rig Hierarchy/Bone Virtual Stores (no need for extra skeleton bones in mesh asset)

If you cannot add extra skeleton bones to your skeleton mesh but still want to drive values between Control Rigs you can create Virtual Bones inside the Skeleton Editor for this purpose.
Then drive these Virtual Bones inside of Control Rig #1 (Set Bone Transform) and simply read from them inside of Control Rig #2 (Get Bone Transform)
This avoids having to pass variable pins around in AnimGraph entirely

Sub-Rigs or Modular Control Rig

If both rigs need to share data tightly maybe see if you can combine them into a single control rig (or use Modular Control Rig functions) that would allow you to store transform variables in the Rig’s internal memory for use during Forward Solve.

Epic Official Documentation: Control Rig

Videos:
· UE5 - Control Rig - How to expose variables to a Blueprint
· Make your animations dynamic using Control Rig
· Let’s Build the RPG! - 38 – Control Rig AnimGraph UE5 Beginner Tutorial
· Control Rig: Runtime Look-At for NPCs and Enemies Method 2 | Unreal Engine Tutorial