Mutable and MetaHumans - anticto/Mutable-Documentation GitHub Wiki

Why use Mutable with Metahuman assets?

The Metahuman framework offers developers the creation and animation of highly realistic human characters. Its creator/editor is confined to a remote cloud service and doesn't really offer in-game real-time customization or streamlined in-editor modification and iteration on characters. That's where Mutable can help, it can augment the Metahuman's framework functionality with its powerful customization features both in-editor and in-game.

How to use them

You can set up a Mutable Customizable Object directly using Metahuman skeletal mesh, material and texture assets coming from Quixel Bridge without any kind of modification or extra import process. Even the hair grooms can be used. You can configure the graph to switch between different heads, bodies and garments, which can come from Metahuman Creator or any other source. All of Mutable's functionality can be leveraged so you can merge mesh sections and textures to reduce draw calls, layer the base body and clothing and clip/hide the covered parts, procedurally deform meshes (for example to tug loose pants into high boots), project decals onto textures, bake morphs, etc.

What can you do with Mutable and Metahuman assets?

All this can be done in-game, for instance to create a customization lobby for players to create their own character, or in-editor to literally create infinite variations of NPC characters that can be baked to regular skeletal meshes, and iterated multiple times over the development of your project.

One key aspect that's often overlooked is that you can use Mutable to drop LODs, sections and bones from a Metahuman character just using a graph. Then you can bake it into optimized regular skeletal mesh assets, or ask Mutable to generate them in-game. Metahuman characters are expensive and many projects do not need or cannot afford a full character. The main advantage of doing it this way, is that if the character needs to be modified in any way in the Metahuman Creator, the only thing that needs to be done is to reimport the assets and overwrite the existing ones. As these will still be hooked to the Mutable graph, the optimizations will be reapplied automatically by Mutable. Compare that to having to manually edit those skeletal mesh assets again each time there's a little change.

What you cannot do

What you cannot do within Mutable is the complex face creation and blending that Metahuman is known for, as everything is baked to the meshes and not available to Mutable. Than can only be changed within Metahuman Creator, and only after that it can be imported into UE and fed to a Mutable Customizable Object graph, where the actual physical looks of the face will stay fixed. From that point on, the only physical modifications you can do to the face/head are what the Mutable tools offer. You can only switch between different fixed heads and change any of their material parameters, modify or project onto the textures, apply procedural reshaping or clipping of the meshes.

Configuring Mutable for optimal Metahuman results

Although Metahuman assets imported into the UE Editor with Quixel bridge work out of the box with Mutable, there are a few Mutable configuration tweaks that will make them work better especially with skinning and animation. By default Mutable may not be set up for the number of bone influences and their precision needed for optimal Metahuman operation.

To enable 12 influences modify the CustomizableObjectNumBoneInfluences property in the Engine\Plugins\Mutable\Config\DefaultMutable.ini or in the equivalent file in you project's config folder and set it to twelve. Ex:

CustomizableObjectNumBoneInfluences=Twelve

To enable 16 bit bone weights, open the base Customizable Object, go to the "Object Properties" tab and in the "Compile Options" section tick the "Enable 16bit Bone Weights" checkbox.

image

Enabling and using the Mutable RigLogic Extensions DNA plugin

One thing that needs to set up is the Metahuman DNA if you want facial animation to work. If this is incorrectly set up, the facial bones will be in the wrong pose and the resulting character can end up with strange wrinkling artifacts on the face.

First, make sure the RigLogic Extensions for Mutable plugin is present and enabled. You can check that in the Edit/Plugins menu:

image

The right way to do it is to use an DNA Constant node and connect it to the DNA input on the object node. Select the Metahuman face skeletal mesh with the DNA that you want on that object node.

image

Using the correct Animation BP

The generated face skeletal mesh should be set up to use the Metahuman-provided post-process animation BP in order to have the correct face animation, but if you set the Face_Archetype skeletal mesh as the reference mesh in the face component node Mutable should copy the animation BP automatically anyway.

Passing the facial morphs to the GPU

In order for the LOD0 facial animations to look completely right when zoomed-in, you should set up all the morphs in the face to be realtime (by default they are baked or removed). See the Real-time morphs section for more details on how to achieve that. Select all the morphs in each Metahuman face skeletal mesh node.

image

Also remember to make sure that real-time morphs are enabled in the CustomizableObject's Object properties tab.

image

Hair grooms

To use grooms, see the requirements in the Grooms page.

Any groom that worked with the original Metahuman can be used, but the bindings may need to be redone. If the face mesh generated by Mutable is different in structure to the original one in the groom binding (different number of LODs, sections or their order), you may have to rebind the groom. Just bake the generated face mesh from the Customizable Object Editor preview viewport, and then create a new binding with the baked mesh and the original groom. When in the future UE supports hair groom rebinding in-game, this step may become unnecessary.