As told in the Basic Concepts page, in Mutable, UV layouts of every mesh can be separated and organized into blocks to achieve some rendering, optimization and organization benefits. This page explains three examples of usage with the Mesh Layout node.
Mutable allows different meshes' textures to be merged if they share material. This example shows a simple Customizable Object with a Child Object that adds a mesh and its texture to a base one. The example consists of a yellow and black pillar which can be extended with small pink pillars on the side.
The base object has its UVs ready to be organized in two blocks
This accessory's UVs will form only one block
All these skeletal meshes share the same material with only a texture parameter that is the color texture map (shown in the middle of the previous images).
The node graph of this example consist of a Base Object with a Child Object. The Child Object uses Extend Material to add a mesh with its texture to the parent.
This is how the Node Graph looks like.
The Mesh Layout node must be connected to the left connections in a Skeletal Mesh node, in the material that is going to be separated or set in blocks.
In its properties tab, the node allows to set a grid resolution in which to create the blocks. The resolution of the base mesh's Mesh Layout will establish the resolution of all the child meshes of the same Customizable Object hierarchy.
In this example, the base mesh has a resolution of 2x2 and is organized in two blocks. These two blocks were strategically set as the mesh inside one of them will be entirely removed in a future customization.
In this case, the original texture set in this mesh is 256x256 and the block resolution is 2x2. This means that any block unit of a child mesh will be 128x128.
The following image shows the resulting UV layout if no Child Object is active.
Resulting UV layouts of each material can be displayed by clicking on the "UV" button in the Preview Instance Viewport tab in Mutable editor.
The Child Object only extends the material of its parent. This means that its mesh is added to the base mesh and its texture is added to the base texture. The block resolution of this child's Mesh Layout is set to 1x1. This 1x1 block will be added to the base blocks.
In this case, the original texture of this child mesh is 256x256, but as it is set in a 1x1 block, it will be resized to 128x128 when merged with the base object texture. If the texture was already 128x128 no resizing would be applied.
The following image shows the resulting UV layout with this Child Object active.
The 1x1 block has been added to the empty spot.
The following images show the resulting textures.
When there is only the base mesh
When the child mesh is active
Mutable allows mesh removal by selecting blocks in their UV layout. This can be achieved with the Remove Mesh Blocks node.
In this extension of the previous example, a bigger and blue base is added to the yellow pillar. A part of the yellow pillar mesh will be overlapped by the new blue base, so this part will be removed.
This other accessory's UVs will consist on only one 2x1 block that will replace a block from its parent.
A second Child Object has been added to the example. This child has the same structure as the previous one but with the addition of
This is how the Node Graph looks like.
In this case, the child mesh has a Mesh Layout with a resolution of 2x2 and only a 1x2 block.
One of the two blocks of this child will be placed in the empty space of the base layout and the other will replace the removed mesh of the base mesh.
In addition to the Mesh Layout node, this Child Object has a Remove Mesh Blocks node that refers to the Base Object material. When this is set in the Node Properties tab, the blocks of the base mesh are displayed and they can be selected. The Remove Mesh Blocks node will remove any mesh that is inside a selected block.
In this case, the top-right 1x1 block is selected. This block contains the black base part of the yellow pillar. This part will be removed.
When the Customizable Object is compiled and the blue base Child Object is active, the black base is removed and the blocks of the new blue base are merged to the resulting UV layout.
The following image shows the resulting texture when the second Child Object is applied.
Several nodes in Mutable allow to select some parts of the mesh by selecting the needed blocks.
The following images show the block structure of the Customizable Object example character "Bandit_forRPG".
Mesh Layout node properties showing the block structure of the character.
Parameters of the instance set to default
Instance example with its resulting color texture
Another instance example with its resulting texture