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)
(written in Python 3)
- 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.
- Select the original metahuman head mesh and go to Channel box and paste the rl4Embedded... into the text box.
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.
- Run the script.
- Select the original Metahuman Head and press the OG mesh button on the UI
- 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.
- Execute the file, and wait for a prompt that says MetaHumanTransfer completed successfully.
- 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.
- 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
- 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.
- You are now done, play with your new rigged head.
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.
Update 12/06/22: Open for use under MIT license. If you continue to use this, you are bound by this new license agreement.
check DAG paths for the meshes and bones involved. Also check namespaces.
Check if the new mesh's name is correctly written in the UI and its not part of a group of heirarchy.