Page MenuHomeAnticto

Mutable for Unreal Engine | Remove unseen body parts
Updated 455 Days AgoPublic

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.

All the remove mesh type of nodes need a material as reference from which they access to its related mesh. Most of them ask for a parent's material, which means they take it from a higher level in the nodes' hierarchy. If a child object shares the same material with its parent, the removal will only affect the parent's mesh. However, a child object can be affected by these nodes if it has its own material.
We recommend visiting the Basic Concepts page before start creating any Customizable Object.

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 resulting Customizable Object of this example can be found in the Village Demo in Content/HowTo/RemoveUnseen named "RemoveUnseen_ResultExample"

imagen.png (649×509 px, 320 KB)

The clipping volume mesh removes any whole face located in its interior

The clipping volume mesh must be a closed mesh in order to work.
Clip Mesh With Mesh node only removes faces from Materials that have the tag assigned in its properties.

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
The assets used in this example can be found in the Village Demo in Content/HowTo/RemoveUnseen

Steps

  1. 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.

Step1_CO.png (126×831 px, 324 KB)

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.


  1. 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.

Step2_GroupNode.png (219×840 px, 556 KB)


  1. 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”.

Step3_NodeProperties.png (156×341 px, 173 KB)

In this case, the group’s name is “Clothes” so it is created to enclose multiple pieces later.


  1. Create a Child Object node from the “Objects” connection of the Group node. This node permits creating a child asset for this first example.

Step4_ChildObject1.png (132×417 px, 178 KB)


  1. In the Object Name sub-tab of the Node Properties tab, write the first piece of cloth’s name.

Step5_ChildObject1Properties.png (213×342 px, 230 KB)

In this example, the Object Name is “Shirt”.


  1. 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.

Step6_Material.png (134×602 px, 41 KB)


  1. In the Material sub-tab of the Node Properties tab, set the shirt’s material.

Step7_MaterialApplied.png (300×374 px, 39 KB)

In this case, the Material is “RemoveUnseen_Shirt_M


  1. Create a Skeletal Mesh node and apply the shirt’s mesh on it.

Step8A_SkeletalMesh.png (214×782 px, 507 KB)

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.


  1. 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.

Step9_ClipMesh.png (230×848 px, 58 KB)


  1. In the Node Properties tab, select the name of this very Customizable Object asset.

Step10A_ClipMeshCOname.png (157×344 px, 28 KB)

In this case, the Customizable Object is “RemoveUnseen”.

The name selected here must be the actual name of the active Customizable Object that is being used.

After that, unfold the drop-down menu placed under the previous one and select the material wanted to be affected by the clipping.

Step10B_ClipMeshCOMaterial.png (157×344 px, 29 KB)

In this example, the material is “RemoveUnseen_Body_M”.

The connection between this node and the material or materials affected can be established as well with Tags. The Tag works as a label that has to be created in the active node and added to Material nodes to clip its related meshes.

  1. 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.

Step11A_SkeletalMesh.png (217×840 px, 551 KB)

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.

Step11B_SkeletalMeshLink.png (108×630 px, 216 KB)


  1. Check that the Source Graph tab looks similar to the image below.

Step12_SourceGraphGeneralExample1.png (426×1 px, 1 MB)


  1. Compile. In the Preview Instance Properties tab, a toggle button should appear with the child object’s name as the title.

Step13A_PreviewProperties.png (226×466 px, 326 KB)

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.

Step13B_PreviewViewport.png (644×448 px, 863 KB)

Change the view mode button on the Preview Instance Viewport tab to change to “Wireframe” when required.

Step13C_PreviewViewportWireframe.png (644×448 px, 863 KB)

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.

Remove Mesh node only removes the whole faces that are in the same exact location as the mesh that has to be removed from. Other faces are ignored.

imagen.png (784×353 px, 177 KB)

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

Start this second example where the previous one finishes.
  1. 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.

Step1_ChildObject2.png (142×567 px, 253 KB)


  1. 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.

Step2_ChildObject2Properties.png (207×289 px, 192 KB)

In this example, the child object is a pair of trousers, so the Object’s Name is “Trousers”.


  1. 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.

Step3_Material2.png (126×441 px, 180 KB)


  1. 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.

Step4_Material2Selected.png (294×402 px, 363 KB)

In this case, the material selected is “RemoveUnseen_Trousers_M”.


  1. Create a Skeletal Mesh node and, in its Node Properties tab, assign the trousers’ mesh.

Step5A_SekeletalMeshTrousers.png (210×781 px, 498 KB)

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.

Step5B_SekeletalMeshTrousersLink.png (138×849 px, 360 KB)


  1. 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.

Step6_RemoveMesh.png (240×846 px, 612 KB)


  1. 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.

Step7_RemoveMeshMaterial.png (132×306 px, 135 KB)

In this example, the parent's material is “RemoveUnseen_Body_M”.


  1. 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.

imagen.png (193×842 px, 52 KB)

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.

Step8B_SkeletalMeshLinked.png (111×642 px, 226 KB)


  1. 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.

imagen.png (471×964 px, 157 KB)

Remember that creating Comments to frame or enclose each example (child asset) can help organize better the nodes.

  1. Compile and check that the new toggle button works well on the character. Verify that the unseen mesh has disappeared as well.

Step10A_TrousersPreview.png (768×443 px, 1014 KB)

Step10B_TrousersPreview.png (789×424 px, 998 KB)

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.

Clip Morph Mesh node only removes whole faces from Materials that have the tag assigned in its properties.

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

This example begins where the previous one finished.
  1. 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.

imagen.png (620×957 px, 180 KB)


  1. In the Node Properties tab, write a name for this new child object.

Step2_NodeProperties.png (203×305 px, 198 KB)

In this case, the Object Name is “Boots”.


  1. 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.

Step3_Material.png (125×431 px, 175 KB)


  1. 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.

Step4_MaterialSelected.png (293×382 px, 345 KB)

In this case, the Material applied is “RemoveUnseen_Boots_M”.


  1. 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.

Step5A_SekeltalMesh.png (209×780 px, 495 KB)

In this example, the Skeletal Mesh is “RemoveUnseen_Boots”.

Don’t forget to link the “meshes” connections of the Skeletal Mesh and Material nodes.

Step5B_SekeltalMeshConnection.png (136×857 px, 358 KB)

To move on to the next step it is recommended to compile and enable the boots.

  1. 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.

Step6_ClipMorphMesh.png (239×851 px, 613 KB)


  1. 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.
Only the vertices influenced by the selected bone and the bones that originate from it will be affected by the clipping operation. Vertices assigned to bones further up on the bone hierarchy will be ignored and therefore not removed.

Step7A_ClipMorphMeshPropertiesBoneName.png (157×359 px, 182 KB)

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.

Step7B_ClipMorphMeshPropertiesTag.png (187×359 px, 214 KB)

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.

imagen.png (402×935 px, 181 KB)


  1. 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.

imagen.png (565×835 px, 154 KB)

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.

Step8B_MaterialNodeTag.png (316×398 px, 386 KB)

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.


  1. Create another Clip Morph Mesh node, this time for the left leg, and connect it to the boot’s Child Object’s “LOD 0”.

Step9_ClipMorphMesh2.png (265×847 px, 675 KB)


  1. This time, in the Node Properties tab, choose the same bone as in the previous Clip Morph Mesh node but for the left leg.

Step10A_ClipMorphMeshBone.png (162×395 px, 204 KB)

In this case, the bone selected is “mixamorig_LeftLeg”.

Add a Tag and name it.

Step10B_ClipMorphMeshTag.png (185×396 px, 232 KB)

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.

imagen.png (386×923 px, 208 KB)


  1. 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.

Step11_AddTag2.png (347×401 px, 425 KB)


  1. 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.

Step12_AddRemoveMesh.png (369×853 px, 939 KB)


  1. Once in its Node Properties tab, select the parent material from which the mesh removal has to be done.

Step13_RemoveMeshMaterial.png (137×397 px, 176 KB)

In this case, the parent’s material is “RemoveUnseen_Body_M”


  1. Finally, create a Skeletal Mesh node, and in the Node Properties tab, select the character body part’s mesh to be removed.

Step14_SkeletalMeshBoots.png (215×805 px, 524 KB)

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.


  1. Check that the Source Graph is similar to the image below.

Step15_SourceGraph.png (354×866 px, 915 KB)


  1. 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.

Step16A_TrousersBootsPreview.png (824×409 px, 1005 KB)

Check finally that when the boots are enabled, the feet’s mesh disappears.

Step16B_BootsRemove.png (755×434 px, 978 KB)

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.

The resulting Customizable Object of this example can be found in the Village Demo in Content/HowTo/RemoveUnseen named "RemoveBlocks_ResultExample"
This is a very simple case created to show how the blocks' removal works. This example only uses the assets needed to create a basic customizable object.

Steps

  1. 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.

image.png (205×1 px, 115 KB)

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.


  1. 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.

image.png (197×1 px, 118 KB)

The most important thing to keep in mind when using this removal method is that a well-thought-out UV layout should be created beforehand in which each part can be entirely removed by selecting the block that encloses it. If the objective is to create a very flexible and adaptable system of removal, the best thing to do is to separate the mesh into small logical parts so the selection can be more controlled.

  1. 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.

imagen.png (635×535 px, 262 KB)

In this example, the grid proportion required is 16x16.


  1. 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.

image.png (385×1 px, 163 KB)


  1. In the Node Properties tab, write a name for this child object.

imagen.png (170×336 px, 13 KB)

In this case, the name is "Remove Body Parts".


  1. Finally, create a Remove Mesh Blocks node and connect it to the "LOD 0" of the Child Object node.

image.png (380×1 px, 180 KB)


  1. 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.

imagen.png (638×520 px, 234 KB)

Choose the layout blocks that are wanted to be removed.

imagen.png (494×531 px, 220 KB)

In this example, the blocks selected are the ones related to the character's thighs.

A Remove Mesh Blocks node doesn't work without a Mesh Layout node connected to its parent's mesh.

  1. Compile. In the Preview Instance Viewport tab, the character should appear without the part of the mesh whose blocks were selected.

imagen.png (890×592 px, 395 KB)

Last Author
daniel
Last Edited
Mar 2 2022, 11:00 AM

Event Timeline

marc moved this document from Restricted Phriction Wiki Document.Mar 11 2020, 8:04 PM
laura edited the content of this document. (Show Details)
marc edited the content of this document. (Show Details)
marc edited the content of this document. (Show Details)
marc edited the content of this document. (Show Details)
laura edited the content of this document. (Show Details)
jordi changed the visibility from "All Users" to "Public (No Login Required)".Jun 10 2020, 11:27 AM
ricard edited the content of this document. (Show Details)
laura edited the content of this document. (Show Details)
laura published a new version of this document.
laura edited the content of this document. (Show Details)
laura edited the content of this document. (Show Details)