Mutable for Unreal Engine | Remove unseen body parts
Overview
This article explains several ways to use Mutable to remove unseen parts of meshes. The most common examples are the parts underneath cloth pieces from a character's body. In this case, some parts of a character's base body are removed when a shirt, trousers and boots are activated.
Each cloth piece is a Child Object of the body and has a different way to remove meshes.
Using a Clipping Volume
This case explains how to remove the part of the body under a long sleeve shirt with a Clip Mesh With Mesh node. The method requires a third volume mesh that, when overlaid to the base body mesh, deletes any face that is entirely within it. Besides this, the mesh to be removed must have the same tag set in the Clip Mesh With Mesh node.
The clipping volume mesh removes any whole face located in its interior
Assets required
- One material asset or material instance of a base character without parameters
- One skeletal mesh of the character with one material slot only
- One material asset of a shirt without parameters
- One skeletal mesh of the shirt with one material slot only
- One skeletal mesh of a clipping volume that overlays the shirt’s one
Steps
- The first step is to create a basic Customizable Object asset with the Base Object, a Material node, and a Skeletal Mesh. Link all the connections of the same color.
In this example, the Customizable Object asset is named "RemoveUnseen", the Reference Skeletal is "RemoveUnseen_BaseBody", the Material is called “RemoveUnseen_Body_M” and the Skeletal Mesh is the same as the Reference Skeletal’s one.
- In this first example, a shirt has to be put on the base character removing the covered part of the character’s body mesh. Moreover, to enable or disable this piece of cloth altogether with the removal of the mesh, a Group has to be created.
Create a Group node from the “Children” connection of the Base Object.
- At the Node Properties tab, with the Group node selected, write a name in the Group name sub-tab. The Group Type can be left by default in “Toggle”.
In this case, the group’s name is “Clothes” so it is created to enclose multiple pieces later.
- Create a Child Object node from the “Objects” connection of the Group node. This node permits creating a child asset for this first example.
- In the Object Name sub-tab of the Node Properties tab, write the first piece of cloth’s name.
In this example, the Object Name is “Shirt”.
- The child object, the shirt, has its own material with its related textures included. For this reason, a new material has to come into play. From the “LOD 0” connection of the Children Object drag and drop to create a Material node.
- In the Material sub-tab of the Node Properties tab, set the shirt’s material.
In this case, the Material is “RemoveUnseen_Shirt_M
- Create a Skeletal Mesh node and apply the shirt’s mesh on it.
In this example, the Skeletal Mesh is “RemoveUnseen_Shirt”.
Link its “Unnamed Material Mesh” connection to the “Mesh”’ Material node’s one. With this connection, the child object is already created.
- Once the child object is created, the objective of this exercise is to remove the mesh of the character’s body hidden under the shirt using a clipping volume method. Create a Clip Mesh With Mesh node from the “LOD 0” connection of the Child Object node.
- In the Node Properties tab, select the name of this very Customizable Object asset.
In this case, the Customizable Object is “RemoveUnseen”.
After that, unfold the drop-down menu placed under the previous one and select the material wanted to be affected by the clipping.
In this example, the material is “RemoveUnseen_Body_M”.
- Create a Skeletal Mesh node and, in its Node Properties tab, set the mesh of the clipping volume. This new mesh should overlay the shirt’s mesh volume and contain it inside its own.
In this case, the skeletal mesh selected is “RemoveUnseen_Shirt_Clipping”.
Link the “Unnamed Material Mesh” connection of the Skeletal Mesh node to the Clip Mesh With Mesh node’s “Clip Mesh” connection.
- Check that the Source Graph tab looks similar to the image below.
- Compile. In the Preview Instance Properties tab, a toggle button should appear with the child object’s name as the title.
In this example, the button’s name is “Shirt”.
Enable the “Shirt” button. Now, verify that not only the shirt is applied to the character but also that underneath its mesh the body has been removed.
Remove with vertex-precision
This case explains how to remove the part of the body under long trousers with a Remove Mesh node. This node requires a third mesh that is compared to the mesh to be removed from. The coincident faces are removed.
The removal mesh must be a duplicate of the part of the mesh that must be removed
Assets required
- One material asset of a pair of trousers without parameters
- One skeletal mesh of the preview pair of trousers
- One skeletal mesh of the character’s body removing part
Steps
- In this second example, a second child object is to be created. From the “Objects” connection of the Group node create a new Child Object node.
- At the Node Properties tab, with the Child Object node selected, write a name in the Object name sub-tab. Leave by default the other options.
In this example, the child object is a pair of trousers, so the Object’s Name is “Trousers”.
- This child object uses its own material too, so a Material node is required. From the “LOD 0” connection of the Child Object node create a Material node.
- In the Material sub-tab of the Node Properties tab, set the trousers’ own material. This material doesn’t have any parameters but encloses its own textures.
In this case, the material selected is “RemoveUnseen_Trousers_M”.
- Create a Skeletal Mesh node and, in its Node Properties tab, assign the trousers’ mesh.
In this example, the skeletal mesh chosen is “RemoveUnseen_Trousers”.
Afterward, link the “meshes” connections of the Skeletal Mesh node and the Material one between them.
- The second child object is already created. Now, a different method of removing the unseen mesh is required. From the “LOD 0” connection of the Child Object node, create a Remove Mesh node. This node removes coincident identical faces, normally a part of a duplicate of the base mesh.
- In the Node Properties tab, select the parent’s material (the character’s base body one) from which a part of its related mesh is to be removed.
In this example, the parent's material is “RemoveUnseen_Body_M”.
- Create a Skeletal Mesh node and, in its Node Properties tab, select the mesh of the part of the character’s body to remove. This mesh should be an exact copy of the character’s body but well delimited to coincide with the covered area when the trousers are enabled.
In this case, the skeletal name is “RemoveUnseen_Trousers_Remove”.
Finally link the “Unnamed Material Mesh” connection of the Skeletal Mesh to the “Remove Mesh” one of the Remove Mesh node.
- Check that the Source Graph looks similar to the image below. The first two child objects are created with two different ways of removing the unseen body’s mesh.
- Compile and check that the new toggle button works well on the character. Verify that the unseen mesh has disappeared as well.
Plane Clipping method and Remove Mesh
This case explains two mesh removal actions: a pair of boots remove the feet underneath them and also clips the long trousers with a Clip Morph Mesh node. This node allows the boots to cut the trousers and morph them to fit inside the boots.
Assets required
- One material asset of a pair of boots without parameters
- One skeletal mesh of the preview pair of boots
- One skeletal mesh of the character’s body removing part (feet)
Steps
- In this last example, a pair of boots is to be put on the base character. So, a new child asset must be created.
Create a Child Object from the Group node’s “Objects” connection.
- In the Node Properties tab, write a name for this new child object.
In this case, the Object Name is “Boots”.
- As this new object has its own material, like all the previous ones, a new Material node is needed. Drag and drop from the “LOD 0” of the new Child Object node and create a Material node.
- Select the Material node and, in the Node Properties tab, choose the suitable material for this child object. This material already includes color and normal textures.
In this case, the Material applied is “RemoveUnseen_Boots_M”.
- Finally, to end with the creation of this last child object, the boot’s mesh is needed. Create a Skeletal Mesh node and set up a suitable mesh in its Node Properties tab.
In this example, the Skeletal Mesh is “RemoveUnseen_Boots”.
Don’t forget to link the “meshes” connections of the Skeletal Mesh and Material nodes.
- In this step, the third removal mesh method is introduced. The Clip Morph Mesh node uses a plane from which the mesh is clipped and moreover it can be deformed to suit better its purpose. In this case, the node is needed to remove part of the trousers’ mesh to simulate they are inside the boots when both are enabled at the same time. Create Clip Morph Mesh from the “LOD 0” connection of the Child Object.
- Select the previous node and, in the Bone Name sub-tab of the Node Properties tab, choose a reference bone from the character’s skeleton. This reference acts as the clipping plane origin.
In this case, as the plane should be placed at the very top of the boots, the nearest leg’s bone is selected, the “mixamorig_RightLeg”.
Afterward, create and name a Tag by clicking the “+” icon. This Tag is used to designate which material or materials are to be affected by this clipping.
In this example, the name is “Right Boot”.
At the Preview Instance Viewport tab, a plane and a red ellipse should appear placed on the right leg. Now, in the Mesh Clip Parameters sub-tab of the Node Properties tab, move the plane and place it on the top of the boot by clicking and dragging inside the Z button or writing values. Finally, modify the Morph Length if wanted and the Ellipse’s Radius to reshape the cut and the mesh surrounding it.
- After creating the Tag in the Clip Morph Mesh node, it has to be added to the Material node that is meant to receive its effect. Select the trouser’s Material node.
In the Node Properties tab, locate the Tags sub-tab and click the “+” icon to create a Tag. Write the same name as the Tag created in the Clip Morph Mesh node.
Now, the trousers’ material is connected to the Clip Morph Mesh node, but the clipping would only be effective when both child assets, trousers and boots, are enabled.
- Create another Clip Morph Mesh node, this time for the left leg, and connect it to the boot’s Child Object’s “LOD 0”.
- This time, in the Node Properties tab, choose the same bone as in the previous Clip Morph Mesh node but for the left leg.
In this case, the bone selected is “mixamorig_LeftLeg”.
Add a Tag and name it.
In this example, the name is “Left Boot”.
Change the values in the Mesh Clip Parameters sub-tab to be like in the right leg’s node.
- Now, add the left leg’s tag in the trousers’ Material node. Select the node and add a new tag. Write exactly the same name as in the left leg’s Clip Morph Mesh node.
- To finish the example, the character’s feet should be removed when the boots are enabled. To accomplish it, a Remove Mesh node is needed, like the one used in the second example.
Create a Remove Mesh node from the “LOD 0” connection of the Child Object.
- Once in its Node Properties tab, select the parent material from which the mesh removal has to be done.
In this case, the parent’s material is “RemoveUnseen_Body_M”
- Finally, create a Skeletal Mesh node, and in the Node Properties tab, select the character body part’s mesh to be removed.
In this example, as the objective is to add boots, the Seketal Mesh selected is “RemoveUnseen_Boots_Remove”.
Remember to link the “meshes” connections of the Skeletal Mesh node and the Remove Mesh one.
- Check that the Source Graph is similar to the image below.
- Compile. Check that the “Boots” toggle button is displayed in the Preview Instance Properties.
Enable both “Boots” and “Trousers”. Verify that, at the Preview Instance Viewport, the character is displayed with the trousers inside the boots and the result is satisfying.
Check finally that when the boots are enabled, the feet’s mesh disappears.
Remove body part's blocks
This example features a Remove Mesh Blocks node that allows selecting which part of a character's mesh is wanted to be removed by using the layout mesh blocks. This is an effortless and very flexible method of removal if the layout mesh is separated into logical parts taking into account the needs in advance.
Steps
- The first step is to create a basic Customizable Object asset with the Base Object, a Material node, and a Skeletal Mesh. Link all the connections of the same color.
In this example, the Customizable Object asset is named "RemoveBlocks", the Reference Skeletal is "RemoveBlocks_BaseBody", the Material is called “RemoveBlocks_M” and the Skeletal Mesh is the same as the Reference Skeletal’s one.
- Before using this removal method, the different character's mesh parts should be enclosed into blocks so they can work separately. Create a Mesh Layout node and link it to the "Unnamed Material Layout" connection of the Skeletal Mesh node.
- Select the Mesh Layout node and create the number of blocks needed to enclose each part of the character’s mesh layout in the Node Properties tab.
In this example, the grid proportion required is 16x16.
- As explained previously, most "remove mesh" types of nodes need a parent material from which to access the mesh. To accomplish this premise, the removal node should be connected to a Child Object. From the "Children" connection of the Base Object node create a Child Object node.
- In the Node Properties tab, write a name for this child object.
In this case, the name is "Remove Body Parts".
- Finally, create a Remove Mesh Blocks node and connect it to the "LOD 0" of the Child Object node.
- In the Node Properties tab, with the Remove Mesh Blocks node selected, a Parent sub-tab with a drop-down menu is displayed and an empty space below is saved for its related mesh layout.
Select the parent's material on which the removal has to be performed and automatically, its mesh layout appears.
Choose the layout blocks that are wanted to be removed.
In this example, the blocks selected are the ones related to the character's thighs.
- Compile. In the Preview Instance Viewport tab, the character should appear without the part of the mesh whose blocks were selected.
- Last Author
- daniel
- Last Edited
- Mar 2 2022, 11:00 AM