Is there a way to bake deformer graph animations in level sequencer into an animation sequence

I have a squash and stretch deformer graph on a control rig I am testing. Everything works in the control rig editor and the level sequence, but when I bake to an animation sequence none of the deformer graph animations are baked. I am lost on how to setup the backwards solve so that the bones get animated by the deformer graph values. Are deformer graphs able to bake to animation sequences to be used for games or am I misunderstanding the feature.
Anyone else try this with any luck?

Any help is appreciated.

I also wanted to ask the same. Thank you for asking.

1 Like

Sigh, someone asked the very question I’ve been hunting for an answer to, and lo and behold…nothing. I appreciate you asking @jakesjordan of course but I’m guessing we won’t be holding our collective breaths! :smiley:

Cheers guys

To be clear, baking is not ‘my’ intended end-goal, that would largely defeat the purpose of runtime deformers, but rather how to use a Deformer Graph during gameplay, and have it with triggered either by say an Anim Notify or fired off in Control Rig.

A modest nudge in the right direction would be invaluable!

Thank you so much for the question! Sorry for the delayed response!

At the moment, AnimSequence / Animation runtime systems only serialize and processes bone transforms and curve values and they do not know the existence of deformers, therefore you will need to manually setup your rig/deformer graph to be driven by bones transforms & curves for it to play nicely with the animation system. We are actively looking for ways to simplify the process but for now it still requires a bit of manual work.

There are three ways you can push Gameplay/Animation data into a deformer graph.

  1. (New in 5.5, most flexible setup) If you have a control rig anim node in your AnimBP (usually the PostProcessAnimBP), you should be able to add a deformer to your character via the “Add Deformer” control rig node in your forward solve event. Once you assign a Deformer Graph asset to the node, you can right click its node title and select “Refresh variables” to populate the “Add Deformer” node with Deformer Graph variables. From there you should be able to drive any deformer graph variables using things control rig offers. (Check out Deformer Rigs in the content folder of “Animator Kit” plugin, they serve as simple examples for how this node can be used.) In particular, you can wire bone transforms/curve values to the variable pins of the “Add Deformer” node such that bone transforms coming from an AnimSequence can be used to drive custom deformation.
    Note: with this setup, you will likely need two rigs for your character, one is your typical animation rig that uses colorful controls to drive bone transforms, and the other is this “runtime rig” that uses bone transforms to drive deformer graph variables. The animation rig is typically used on-demand in sequencer, while the runtime rig is usually active and running all the time on the character.
  2. You can also use Animation Attribute related nodes in control rig and deformer graph to pass data from control rig to deformer graph. Typically, you likely want to use the SetAnimAttribute node in control rig and the Animation Attribute data interface node in Deformer Graph.
  3. You can access the mesh deformer you assigned to your skeletal mesh component from BP via the GetMeshDeformerInstance API. The MeshDeformerInstance object you received this way has to then be casted to a OptimusDeformerInstance object for you to be able to access SetVariable APIs

Hope this helps and happy to go into more details if needed!

Thank you for giving Deformer Graph a try!

Jack

It’s been a while since I looked at this, but I tried to figure things out based on what you wrote. I already have the deformer graph in my control rig and am able to squash and stretch my model fine and after messing around today I was able to set the values for my squash and stretch in my blueprint and it worked. That is cool, but it was not what I was looking for in this project. I was wanting to artistically hand author animations using these deformer graphs and then use those animations in my game.

In particular, you can wire bone transforms/curve values to the variable pins of the “Add Deformer” node such that bone transforms coming from an AnimSequence can be used to drive custom deformation.

this makes me think it still may be possible, but I do not know how to do this. I feel like that was kinda my question. The deformer graphs you pointed me too didn’t seem to be doing this either.

I’m not sure if I just don’t understand some of what you are saying or if I was miss-understood, but I hope I was more clear here.

I appreciate you reaching out.

Happy to dive into more details!

For the setup I was describing, you will need two rigs, an animation rig and a post process rig.
The animation rig would be a rig that uses controls to drive bone transforms and you only use the rig to create animation sequences. Once you bake things down to an animation sequence, the animation rig is no longer needed so you don’t want to put deformers in this rig.


The post process rig would be a rig that lives in the PostProcessAnimBp (so it always runs on the character) and uses the bone transforms to drive deformer variables.

One implication of this setup is that you might need to add additional unweighted bones to your character to be used to drive deformers.

Hope this helps!

/Jack

Hey Jack, thank you for the follow up!
I think I better understand this setup now. I’m going to mess around with this tonight and tomorrow and respond with how it goes and any questions. Thanks again for helping me out :+1:

1 Like

So I’ve been trying to figure this out and I think I’m still missing some pieces. I have added a squashstretch bone and have a setup similar to what you showed me. It makes sense I think conceptually, but I am unable to see any deformation happening when moving that bone. If I just change the value of the squash factor it works but connecting my bone transform to the deformer then controlling that bone with an animation rig doesn’t work for me. I have setup my ABP to be a post process animation blueprint and I have that post process control rig connected to my that animation blueprint. I was hoping not to have to respond empty handed, but I think I’m running in circles now.

Here’s a few screenshots of my stuff. If you can help point me in the right direction that would be great.

Thanks again for helping me out.





In your postprocess AnimBP, could you try adding a “InputPose” node and connect it to the control rig node?

Oh man that was it. that’s awesome! I have deformations working on my animation rig now and can then author animations by hand and baking them to an animation sequence successfully keeps the deformations. I get that you are all still working on this, but to have it working is still really awesome. I was just starting to feel like it wasn’t going to work out and then it did. That’s a pretty awesome parallel to some personal stuff in my life that I am going through.

Thanks for reaching out and helping me figure this out. I really appreciate it!

Nice! Glad to help!

1 Like