Skip to content

A series of python scripts to modify the metahuman rig into a new one for Maya.

Notifications You must be signed in to change notification settings

revoconner/metahuman_rig_transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 

Repository files navigation

Metahuman Rig Transfer Script

Python script to modify the metahuman rig into a new one for Maya. For unreal use Mesh to Metahuman or houdini.

Link to youtube video demo - https://www.youtube.com/watch?v=qF-z1aZQUYE (Outdated)

image

Table of Content

  1. Prerequisite
  2. Instruction
  3. Optional Instruction
  4. License
  5. FAQ

PREREQUISITE:

(written in Python 3)

Will not work in Maya 2020 and below.

  1. The new head to which the bones are to be rigged must share the same UV and topology as the original metahuman head. A program like Wrap3D will help with it.
  2. Select the original metahuman head mesh and go to Channel box and paste the rl4Embedded... into the text box.
image

Good Practices

It's advised to save a copy of your maya file before attempting this, as it creates new nodes in the rig logic network and is not undoable.

INSTRUCTIONS:

  1. Run the script.
  2. Select the original Metahuman Head and press the OG mesh button on the UI
  3. Select the wrapped new head mesh and press the W mesh button on the UI. Make sure the Head is not in a group or heirarchy, and its transforms have been frozen.
  4. Execute the file, and wait for a prompt that says MetaHumanTransfer completed successfully.
  5. Now the bones should be aligned to the surface of the new mesh. It's time to rig the new head and transfer bone weights.
  6. Select DHIhead:spine_04 and then the New mesh together in the outliner in that order. Go to Skin >> bind skin (options) and make sure you have the settings like this
  7. image
  8. Now its time to copy skin weights. Select the original metahuman head and the new head in the outliner in this order, then to go skin >> copy skin weights and make sure the settings looks like this.
  9. image
  10. You are now done, play with your new rigged head.

Optional

If the joints are too big for you to see how they are aligned, you can select DHI:spin_04 from the outliner, and then run the select joint children.py script to select all joints in the heirarchy. You can now go to the channel box and change the bone's radius to something like 0.2 instead of the original 1.

License

Update 12/06/22: Open for use under MIT license. If you continue to use this, you are bound by this new license agreement.

FAQ

Q. Error: ValueError: file line 32: More than one object matches name: spine_05

check DAG paths for the meshes and bones involved. Also check namespaces.

Q. kInvalidParameter: No element at given index"

Check if the new mesh's name is correctly written in the UI and its not part of a group of heirarchy.

Recently updated by cemccabe77 in the community. Big thanks!

Compatible with UE 5.4 Metahumans

About

A series of python scripts to modify the metahuman rig into a new one for Maya.

Topics

Resources

Stars

Watchers

Forks

Languages