Retarget apex blendshapes from animated skeleton

   1480   14   4
User Avatar
Member
1 posts
Joined: 4月 2021
オフライン
Hello everyone,

I'm looking for the best workflow to retarget blendshape animation from an original animated skeleton to the sliders on a new Apex rig.

My source skeleton has animated attributes that drive the blendshapes. My new Apex rig has corresponding blendshape sliders created by the auto-rig tool. I want to use the animation from the source skeleton to drive these sliders procedurally.

I've been exploring how to connect them, but I'm not sure of the standard approach. Is there a way to drive these abstract slider controls from skeleton attributes?

As an alternative, I was wondering if it's possible to procedurally generate or modify an Apex .clip file with this animation data. Could a script be used to write the skeleton's animation into a clip that I can then apply to the rig?

Any advice or examples on how to achieve this would be a great help.

Thanks in advance!
User Avatar
Member
8076 posts
Joined: 7月 2005
オフライン
Here's an example I had lying around for just the eyebrows. Basically, you just need to remap the animation values in to a detail attribute named "parms" that changes every frame. Then the APEX Add Animation SOP can create channel primitives inside your APEX scene using it.

Attachments:
blendshape_example.png (668.4 KB)

User Avatar
Member
323 posts
Joined: 5月 2007
オフライン
https://vimeo.com/user3971456/videos [vimeo.com]
User Avatar
Member
1 posts
Joined: 12月 2020
オフライン
I have problems with the python...Can you shear an example?
User Avatar
Member
8076 posts
Joined: 7月 2005
オフライン
Here's the code. But you need to make sure you customize this for your FBX file and rig so that the names match. Also, if you have too old a Houdini version, you might not even have the "fbx_custom_attributes" geometry attribute when you import.
node = hou.pwd()
geo = node.geometry()

old_attrib_name = "fbx_custom_attributes"
new_attrib_name = "parms"

old_attrib = geo.findPointAttrib("fbx_custom_attributes")
old_dict = geo.points()[0].attribValue(old_attrib)

new_attrib = geo.addAttrib(hou.attribType.Global, "parms", {})
geo.setGlobalAttribValue(new_attrib, old_dict)
User Avatar
Member
9336 posts
Joined: 7月 2007
オフライン
in case your parms are on point 0 as suggested in the above code you can also use
Attribute Promote SOP
- Original Class: Point
- New Class: Detail
- Promotion Method: First Match
- Original Name: fbx_custom_attributes
- New Name: Parms

then you can append Attribute Adjust Dictionary and its Rename Keys multiparm to adjust your mapping, you can also use wildcards when renaming
e.g. (again using above example)
From: browDown*
to: CTRL_*_brow_down_start_x

etc...
Edited by tamte - 2025年10月14日 16:37:33
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
7 posts
Joined: 8月 2020
オフライン
Hello everyone,
I'm working on a project with MH and trying to do the same as OP.

I used the approach described here, but only for sliders from `fbx_custom_attributes`. I created a JSON file with the mapping I found on GitHub for the Maya plugin.

Attached project with mapping file (drop next to hip file). I tested with 2 MH characters and 2 exported animations (baked to ctrl rig)

My current result looks like this: the facial animation seems correct, but there's no head or neck movement.
Also it is slow as hell.
Edited by Mishazawa - 2025年10月17日 15:20:02

Attachments:
face_test.mp4 (400.8 KB)
metahuman_control_rig_retarget.hipnc (460.1 KB)
config.json (50.4 KB)

User Avatar
Member
8076 posts
Joined: 7月 2005
オフライン
I found the example scene that we used for the launch demos, maybe it'll be of some use.

Attachments:
mh_example.zip (17.4 MB)

User Avatar
Member
7 posts
Joined: 8月 2020
オフライン
@edward

I found the example scene that we used for the launch demos, maybe it'll be of some use.

How did you create FBX animation for FaceBoardControlRig? I tried (in UE5) to bake Animation Sequence to Face Rig and export it, but it has different joint names and many points...
User Avatar
Member
8076 posts
Joined: 7月 2005
オフライン
Ah, that I'm not really sure. But the idea hopefully remains the same in that we need to remap them.
User Avatar
Member
3 posts
Joined: 10月 2019
オフライン
The example project seems to work fine with the included animation, but when using new facial animation from UE exported to control rig, it doesn't seem to reference it correctly and im not getting an animation. any thoughts?
User Avatar
Member
3 posts
Joined: 10月 2019
オフライン
Edward, I am using your MH_example file and im not really sure where the disconnect is happening, I am trying to export my facial Animation from unreal to control rig and plugging it into the fbx animation node, but im getting several more points than the original animation had, which only has one point.
User Avatar
スタッフ
101 posts
Joined: 10月 2023
オフライン
Hi, The animation for the face needs to be exported separately from within the sequencer. You should get a bunch of joints all on top of each other at origin.
User Avatar
Member
3 posts
Joined: 10月 2019
オフライン
I have reached that step, but my Parms workflow does not seem to translate at all, when i inspect my face fbx, I see the various transforms on points originating at origin, but it has 79 points or so, but when i inspect the face animation from the example file, it only has one point, I am wondering if there are steps between exporting the facial animation and importing it into the houdini project.
User Avatar
スタッフ
101 posts
Joined: 10月 2023
オフライン
Hi Chistian, have you had a look at the hip file that Edward posted. You have to change the names of some of the parms coming from
UE to make it work in houdini, and we have included that setup in the hip file.

I simply Exported the animation of the face from sequencer and brought that into houdini. It should be the same for all metahumans
Edited by william_harley - 2025年10月31日 02:24:10
  • Quick Links