Project

General

Profile

Remove unseen mesh parts

What is the HowTo about?

There are three ways of removing mesh parts in Mutable: using a Remove Mesh to select exactly which polygons to remove, using a support closed mesh (Clipping Volume) to remove everything inside it or cutting a mesh with a user-defined Plane. These methods are not mutually exclusive.

 

           

 


1 - The Remove Mesh node

This is a very precise method to select the mesh parts you want to remove. Overall, the Remove Mesh node gets the information of an imported mesh and compares it to the base skeletal mesh, removing the matching polygons.

For this example we’ll be removing the unseen parts of the character’s body under a shirt.

 

What assets are needed?

All the assets from the basic customizable character HowTo.

A Skeletal Mesh and its Material and Textures to be the Child Object. (In this example, we use a shirt)

A Skeletal Mesh containing all the vertex that will be removed. This will be our “Removal” mesh. (As said in the Asset Creation Hints, it is a good idea to create this mesh from the base Reference Skeletal Mesh)

(All the Skeletal Meshes must share the same Skeleton)

The object of this example can be found as "Bandit_RemoveMesh" in MutableExamples/Bandit/CustomObjects/HowToExamples

Steps

1 - Inside a copy of the basic custom character, create a Group and a Child Object for the shirt object


2 - Create an Extend Material node (in case the shirt and the body share Material). Import the shirt Skeletal Mesh and connect it to the Extend Material node. Import and connect all the textures the Skeletal Mesh needs. Create a Mesh Layout node for the shirt mesh and create the blocks for the UV map.

If you compile now, in Wireframe mode you can see how both meshes appear when shirt is selected.


3 - From the Child Object node, create a Remove Mesh node. In the properties tab, select the Parent Material from which geometry will be removed. Import the “Removal” mesh and connect it to the Remove Mesh node.

    


4 - Save and compile.

Result

If you check the Wireframe mode in the Preview Inst. Viewport, you’ll see that the base mesh has been optimized by removing the parts under the shirt.

 


2 - Clipping Volumes

This method overlays a separate closed mesh (the clipping volume) on the base skeletal mesh and removes the polygons that are entirely inside of it. The closed mesh has user-defined tags which will set which meshes are affected by the clipping volume.

For this example we’ll be removing the unseen parts of the character’s body under a shirt.

What assets are needed?

All the assets from the basic customizable character HowTo.

A Skeletal Mesh and its Material and Textures to be the Child Object. (In this example, we use a shirt)

A closed Static Mesh that will be the Clipping Volume.

Steps

1 - Inside a copy of the basic custom character, create a Group and a Child Object for the shirt object. Create its Material node and link the new Skeletal mesh and its textures. Create the UV Layout blocks.

Now the Shirt is a new Parameter for the Customizable Character, but no mesh is removed.


2 - From the Child Object node, create a Clip Mesh With Mesh node. Create a Static Mesh node from the Clip Mesh With Mesh node and select the closed static mesh in its properties tab.


3 - In the properties tab of the Clip Mesh With Mesh node, create and name a new Tag. This can be done by clicking the ‘+’ icon in the Tags section. In this case we name the Tag as ‘shirt’. Now we can tag other Materials which will be affected by the clipping mesh with this tag.


4 - Add the same Tag in the parent Material properties tab.


5 - Save and Compile. With the wireframe view mode in the Preview Inst. Viewport, we can see how the mesh inside the Clipping Volume has been removed.

 


3 - Plane Clipping

This method clips interior meshes with a defined plane and lets you deform the mesh near the plane. This is very useful specially when defining whether the trousers of a character are inside or outside its footwear.

What assets are needed?

All the assets from the basic customizable character HowTo.

A Skeletal Mesh and its Material and Textures to be the Child Object. (In this example, we use trousers)

 

Steps

1 - As in the previous examples, create a Customizable Object with a Child Object. In this case, we've created a base body with trousers.


2 - Create a Clip Morph Mesh node and link it to the Child Object node. In the Node Properties tab, select a reference bone from the skeleton that will act as the Clipping Plane origin. Create and name a Tag by clicking the '+' icon.

Add the tag in the Material node that will be affected by the Clipping Plane. In this case, is the trousers Material node.

When Clip Morph Mesh node is selected, a display appears in the preview viewport showing the effect of the node. Adjust the Mesh Clip parameters to achieve the wanted result.


3 - Save and Compile. As said in this method explanation, this is the best way to parameter whether trousers are inside or outside footwear.