Project

General

Profile

Add a child object

What is the HowTo about?

In this HowTo we'll explain how to create a Child Object for our Customizable Objects. Child Objects are custom objects referenced by another custom object (Parent). They can modify or extend the content of the parent.

Child Objects can be built inside the parent or as a separate custom object.

What assets are needed?

All the assets from the basic custom object HowTo.

A Skeletal Mesh with the same Skeleton as the Parent mesh. In this case, a couple of eyebrows.

All the Texture maps needed for the eyebrows material.

Steps

Adding an internal Child Object

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

First, we are going to create a Child Object inside this basic character. This Child Object will be the eyebrows of the character.

1 - Create a new Group node from the Children connection in the Base Object node (of the Parent). Name it.

The Group node function is to group and to choose how to display and select the child objects. In this case, we select Toggle option. Now, all the child objects connected to this group will appear as "toggleable" options.


2 - Create a new Child Object node connected to the Group and name it.

The child object "Eyebrows (Inside Parent)" is now a choosable child from the "Eyebrows" group in the "Bandit Child Object" custom object (the parent). More child objects can be attached to the same group or other groups can be created.


3 - Create a basic material-mesh node structure for the eyebrows.

The Child Object works exactly as any other custom object. Eyebrows have their own skeletal mesh (Bandit_EyebrowsStandard) and material (M_BanditHair).


4 - Save and compile.


Adding an external Child Object

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

Let's create now a separated Child Object. To try another selection option, change the Group Type of the Eyebrows group from 'toggle' to 'one or none'. This will allow us to choose a child or none from a list.

1 - Create a new Customizable Object in your content browser. Open it, select the Reference Skeletal Mesh (it must be the same as the parent object) and name the Base Object node. In the properties of the node, select the parent custom object and its group to link it to the parent (Bandit_ChildObject and Eyebrows).


2 - Create a basic material-mesh structure node for the object.


3 - Save and Compile the child and the parent. In order to see the whole family options, make sure to uncheck the 'Local' option in the compiling options in the Parent Object.

 


Extending the Parent Material

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

Either inside or separated from the parent, the previous child objects had its own new Material node. This means that when the parent and the child are selected, two materials are used (in this case M_Bandit and M_BanditHair). You can see which materials are being used by clicking in the small arrow next to the UV button in the Preview Inst. Viewport (as seen in the last image).

If materials have similar structure and parameters, an Extend Material node can be used to save material calls. This node extends the parent Material node to add new mesh/UV information.

1 - Create a new Custom Object in the content browser. Select the Reference Skeletal Mesh in the Object Properties (must be the same as the parent's). Name the Base Object node and attach it to the parent object (Bandit_ChildObject) in the Eyebrows group.


2 - Create an Extend Material node and link it to the Base Object node. In the Graph Node Properties, select the parent Material.


3 - Create a Skeletal Mesh node. Import all the textures needed for the new object and connect them to the Extend Material node. For the parameters that doesn't change, connect them to the Extend Material node.


4 - Create a Mesh Layout node and link it to the Skeletal Mesh node. Separate the UV elements in blocks. This blocks will be added to the parent Material, making the textures of this mesh be part of the Material next to the parent's textures.


5 - Save and Compile. Compile the parent object (not in Local mode) and check the options in the preview tabs.

The extended material child option has only one single Material, now: