Page MenuHomeAnticto

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

Overview

This article explains several ways 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"

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.

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.


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

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.


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


  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.


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

In this case, the Material is “RemoveUnseen_Shirt_M


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


  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.


  1. 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 that is wanted to be affected by the clipping.

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.

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.


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


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

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

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.

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.


  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.

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.


  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.

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.

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.


  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.


  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.


  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.

Finally link the “Unnamed Material Mesh” connection of the Skeletal Mesh to the “Remove Mesh” one of the Remove Mesh node.


  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.

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.

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


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

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.


  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.

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.

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

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

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

  1. In this step, the last 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.


  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.

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.


  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.

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.


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


  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.

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.


  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.


  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.


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


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


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


  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.

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.

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

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.

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.

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.


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

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.


  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.

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.

A Remove Mesh Blocks node doesn't work without a Mesh Layout node connected in 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.

Last Author
joan
Last Edited
Wed, Sep 9, 2:42 PM

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)Apr 13 2020, 12:20 PM
laura edited the content of this document. (Show Details)Apr 13 2020, 5:38 PM
laura edited the content of this document. (Show Details)Apr 14 2020, 9:59 AM
laura edited the content of this document. (Show Details)Apr 14 2020, 11:21 AM
laura edited the content of this document. (Show Details)Apr 15 2020, 5:59 PM
laura edited the content of this document. (Show Details)Apr 17 2020, 11:49 AM
laura edited the content of this document. (Show Details)
laura edited the content of this document. (Show Details)Apr 17 2020, 11:54 AM
laura edited the content of this document. (Show Details)Apr 21 2020, 5:56 PM
laura edited the content of this document. (Show Details)Apr 21 2020, 6:04 PM
marc edited the content of this document. (Show Details)Apr 21 2020, 11:29 PM
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)Apr 21 2020, 11:44 PM
marc edited the content of this document. (Show Details)Apr 21 2020, 11:55 PM
marc edited the content of this document. (Show Details)Apr 22 2020, 12:10 AM
marc edited the content of this document. (Show Details)Apr 22 2020, 12:17 AM
marc edited the content of this document. (Show Details)Apr 22 2020, 12:21 AM
marc edited the content of this document. (Show Details)
marc edited the content of this document. (Show Details)Apr 22 2020, 12:29 AM
laura edited the content of this document. (Show Details)May 20 2020, 6:24 PM
laura edited the content of this document. (Show Details)May 20 2020, 6:43 PM
laura edited the content of this document. (Show Details)May 21 2020, 1:19 PM
laura edited the content of this document. (Show Details)May 21 2020, 2:21 PM
laura edited the content of this document. (Show Details)
laura edited the content of this document. (Show Details)May 21 2020, 2:46 PM
laura edited the content of this document. (Show Details)May 23 2020, 11:04 AM
laura edited the content of this document. (Show Details)Jun 3 2020, 6:54 PM
laura edited the content of this document. (Show Details)Jun 4 2020, 10:26 AM
laura edited the content of this document. (Show Details)Jun 4 2020, 10:32 AM
marc edited the content of this document. (Show Details)Jun 8 2020, 4:24 PM
laura edited the content of this document. (Show Details)Jun 8 2020, 4:30 PM
jordi changed the visibility from "All Users" to "Public (No Login Required)".Jun 10 2020, 11:27 AM
marc edited the content of this document. (Show Details)Jun 11 2020, 6:17 PM
marc edited the content of this document. (Show Details)Jun 11 2020, 6:34 PM
ricard edited the content of this document. (Show Details)Jun 16 2020, 4:22 PM
laura edited the content of this document. (Show Details)Jun 17 2020, 3:23 PM
laura edited the content of this document. (Show Details)Jun 18 2020, 5:47 PM
ricard edited the content of this document. (Show Details)Jun 22 2020, 9:36 AM
ricard edited the content of this document. (Show Details)
laura edited the content of this document. (Show Details)Jun 22 2020, 12:48 PM
laura edited the content of this document. (Show Details)Jun 22 2020, 12:55 PM
laura edited the content of this document. (Show Details)Jun 22 2020, 1:12 PM
laura edited the content of this document. (Show Details)Jun 22 2020, 1:40 PM
laura edited the content of this document. (Show Details)Jun 22 2020, 1:52 PM
laura edited the content of this document. (Show Details)Jun 22 2020, 2:53 PM
laura edited the content of this document. (Show Details)
laura edited the content of this document. (Show Details)Jun 22 2020, 3:04 PM
laura edited the content of this document. (Show Details)Jun 22 2020, 4:59 PM
laura published a new version of this document.
laura edited the content of this document. (Show Details)Jun 22 2020, 5:59 PM
laura edited the content of this document. (Show Details)Jul 21 2020, 9:08 AM
laura edited the content of this document. (Show Details)Aug 14 2020, 1:17 PM
laura edited the content of this document. (Show Details)
joan edited the content of this document. (Show Details)Tue, Sep 8, 3:58 PM
joan edited the content of this document. (Show Details)Wed, Sep 9, 2:42 PM