Project

General

Profile

Create a basic customizable object

What is the HowTo about?

In this basic HowTo we are going to create a simple customizable object with a skeletal mesh and a single material. This object will not have customizable elements but will be the base used in future and more complex Customizable Objects. In this case, the custom object will be a basic

What assets are needed?

A Skeletal Mesh and a Material assigned to it with all the necessary Textures.

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

Steps

1 – In the Content Browser, click on Add New and select Customizable Object. A new Customizable object will be created in the directory, in this example we name this object “Bandit_Basic”.

  


2 – Double clicking on the new object, the Customizable Object Editor will open. The first step inside the editor should be assigning a reference mesh to the Customizable Object. To do this, in the Object Properties tab, select your reference skeletal or static mesh. In this case, we use the skeletal mesh “Bandit”.


3 – Once the object has its reference, we start with the Source Graph tab. Every customizable object must have one Base Object node which is already created in the graph. We name this node “Bandit Basic” and keep Num LODs as 1.


4 – Next step will be creating a Material node, in which we’ll assign a base material for the skeletal mesh. To create a Material node, we can extend LOD 0 connection from Base Object and select Object>Material or right-click on the background and type Material. Material node must be connected to LOD 0 connection from Base Object.

Once created, we must assign an existant material to the node inside the Graph Node Properties. Select the proper material in the Material field. Material node will recognise any parameters from the source material. These parameters can be edited in the Images field inside the node properties. In this case, our material “M_Bandit” has 5 parameters: Color, Metallic, Roughness, Normal and OpMask.


5 – Material node has another connection: Mesh. From this we are going to assign our skeletal mesh to the object. Dragging from Mesh connection or right-clicking and selecting Skeletal Mesh a new Skeletal Mesh Node will be created. Dragging and dropping a skeletal mesh from the Content Browser will also work. Assign your skeletal mesh inside the Graph Node Properties, in our case, we select “Bandit” mesh.

The Skeletal Mesh node will recognize the assigned material of the skeletal mesh and show its parameters. Connect mesh and parameters from both nodes.


6 - Now we will add a Mesh Layout node linked to the skeletal mesh. This node allows us to group in blocks the mesh UV layout. It is recommendable to prepare your meshes in a certain way to take advantage of this feature. Add a new Mesh Layout node from the yellow connection in the Skeletal Mesh node. In the Graph Node Properties tab, you can create blocks grouping the UV islands. Use the Add and Remove Block buttons to create new blocks and move them by clicking and dragging. You can adjust the density of the block grid by selecting an option from the drop down menu next to the buttons (1x1, 2x2, 4x4, 8x8 ...)


7 – Save and Compile. In the Instance Viewport an object instance will appear with the selected skeletal mesh and material.


Adding an opacity mask

In order to add several texture custom variations, such as changing the skin tone, it's possible to connect new textures and node groups in the parameters of the Material node. Here is a simple example on how to change the value of a parameter by connecting a new texture (in this case, the opacity mask for creating the eyelashes transparency):

1 - Create and import a texture that masks the eyelashes character.

2 - Drag and drop it to the Mutable editor or create a new Texture node in Mutable editor by right-clicking in the background.

3 - Connect it to the opacity parameter in the Material node.

4 - Compile and check it in the Preview instance viewport.


Objects with more materials

As we might want to work with meshes with several materials on it, this is an expansion to the basic HowToworking with a skeletal mesh with two materials.

1 – In Object Properties, assign the reference skeletal mesh with two materials.

2 – Create a Base Object and name it.

3 – From the LOD 0 connection, connect two Material nodes to the object.

4 – Assign two materials to each Material node. If source materials have parameters, they should appear in the nodes too.

5 – Create a Skeletal Mesh node. The new node should have two Mesh connections (and their parameters) instead of one. Connect each parameter to proper material nodes as in the picture:

6 – Save and Compile. Now both materials and their parameters can be edited separately.


This is a basic customizable object prepared to be instanced or to continue being edited inside the editor. New customizable elements can be configured such as Changing its Skin Tone or Adding earrings to Anna.