== Overview
This page features the creation of the most basic examples of a [[/w/mutable/unreal-engine-4/user-documentation/basic-concepts/#customizable | Customizable Object]]. These examples consist in the set up of a base character, with its skeletal mesh and material.
The following examples don’t have customizable elements but are the base structure for more complex examples explained in other pages.
The resulting Customizable Objects of this page will be ready to create [[ /w/mutable/unreal-engine-4/user-documentation/basic-concepts/#customizable-object-instance | Customizable Object Instances ]] from them.
(WARNING) We recommend visiting the [[ /w/mutable/unreal-engine-4/user-documentation/basic-concepts/ | Basic Concepts ]] page before start creating any Customizable Object
= Basic Object
In this example, a [[ /w/mutable/unreal-engine-4/user-documentation/nodes/skeletal-mesh/ | Skeletal Mesh ]] and its [[ /w/mutable/unreal-engine-4/user-documentation/nodes/material/ | Material ]] are set up.
(NOTE) The resulting Customizable Object of this example can be found in the [[ /w/mutable/unreal-engine-4/examples/#village-demo | Village Demo ]] in //Content/HowTo/BasicObject// named "BaseObject"
== Assets required
* One material asset or material instance without any parameter (it can have textures but not converted to parameters)
* One skeletal mesh with only one material Slot
(NOTE) The assets used in this example can be found in the [[ /w/mutable/unreal-engine-4/examples/#village-demo | Village Demo ]] in //Content/HowTo/BasicObject//
== Steps
1) The first step for this example is to create a **Customizable Object** asset inside Unreal Engine. You can check the [[ /w/mutable/unreal-engine-4/user-documentation/basic-concepts/ | Basic Concepts ]] page on how to do this.
{F85070}
> The Customizable Object asset in the Unreal Engine Content Browser. In this example, the Customizable Object asset is named "TestMarc_Basic_Object"
---
2) Double-click the **Customizable Object** asset to open the [[ /w/mutable/unreal-engine-4/user-documentation/basic-concepts/#editors | Mutable Editor ]].
{F85106}
---
3) Inside the **Customizable Object**, a [[ /w/mutable/unreal-engine-4/user-documentation/basic-concepts/#reference | Reference Skeletal Mesh ]] must be set. You can set it in the [[ /w/mutable/unreal-engine-4/user-documentation/basic-concepts/#editors | Object Properties ]] tab, under //Customizable Object//. This mesh will be used as reference for Unreal Engine settings (such as skeleton, volumes, shadow properties, etc).
(IMPORTANT) Every Customizable Object must have a Reference Skeletal Mesh or it won’t work
{F102264}
> In this example, the Reference Skeletal Mesh used is "BaseObject_SingleMaterial"
---
4) Name the [[ /w/mutable/unreal-engine-4/user-documentation/nodes/base-object/ | Base Object ]] node in the [[ /w/mutable/unreal-engine-4/user-documentation/basic-concepts/#editors | Graph Node Properties ]] tab. Leave the rest of the parameters as default.
(IMPORTANT) Every Customizable Object has one Base Object node that is the root of the Object.
{F102266}
> In this example, the node is named "Base Object"
---
5) Create a [[ /w/mutable/unreal-engine-4/user-documentation/nodes/material/ | Material ]] node. To do it you can click and drag the "LOD 0" connection from the **Base Object** node to any empty space in the graph and then writing "Material" in the contextual menu.
{F102272}
{F102270}
> The Material node is now connected to the Base Object node
(WARNING) You can also create any node by right-clicking in the background of the graph and typing or searching the node
---
6) Set a material asset or a material instance to the **Material** node. To do this, select the **Material** node and set the material in the **Graph Node Properties** tab.
{F102274}
> In this example, "BaseObject_NoParam" has been used
---
7) Create a [[ /w/mutable/unreal-engine-4/user-documentation/nodes/skeletal-mesh/ | Skeletal Mesh ]] node.
{F102276}
---
8) With the **Skeletal Mesh** node selected, set a skeletal mesh in the **Graph Node Properties** tab.
{F102278}
> In this example, "BaseObject_SingleMaterial" has been used
---
9) The **Skeletal Mesh** node should have been updated and now it incorporates two slots. Link the "Unnamed Material Mesh" to the"Mesh" connection of the **Material** node.
{F102282}
10) Compile the **Customizable Object** by clicking on the **Compile** button in the top bar of Mutable Editor.
{F85108}
== Result
{F102286}
> The resulting mesh in the [[ /w/mutable/unreal-engine-4/user-documentation/basic-concepts/#editors | Preview Instance Viewport ]] tab
The result of this example is a **Customizable Object** ready to has its own [[ /w/mutable/unreal-engine-4/user-documentation/basic-concepts/#customizable-object-instance | Instances ]]. As there are no customizations or parameters created, the object has the same visual result as the source skeletal mesh with the assigned material asset.
= Materials with parameters
When working with material assets or material Instances which have parameters, the parameters are shown in the **Material** nodes. In this example, a **Material** node is set with a material instance with a base color texture parameter.
(NOTE) The resulting Customizable Object of this example can be found in the [[ /w/mutable/unreal-engine-4/examples/#village-demo | Village Demo ]] in //Content/HowTo/BasicObject// named "BaseObject_MatParam_2"
==Assets required
* One material asset or material instance with a texture parameter
* One skeletal mesh (in this case, it has assigned the material instance used in the example)
== Steps
1) Create a new **Customizable Object**. In this example, it is called “TestMarc_Basic_Object_param”.
---
2) Inside Mutable Editor, set a **Reference Skeletal Mesh** in the **Object Properties** tab. In this example the mesh is "TestMarc_Basc_Object_param".
---
3) Name the **Base Object** node. In this example it is called "Material with parameter".
---
4) Create a **Material** node and connect it to the **Base Object** node.
---
5) Set the material asset with the parameter in the **Material** node in the Graph Node Properties tab. The parameter should now appear as a new soft blue connection in the **Material** node.
{F106098}
> In this example, the material asset used is "TestMarc_M_Bandit_param_Inst". This material has a parameter called "Base Color" which appears in the Material node.
---
6) Create a **Skeletal Mesh** node.
---
7) Set a skeletal mesh in the **Skeletal Mesh** node in the **Graph Node Properties** tab. If the source skeletal mesh set has a material asset with a parameter assigned, Mutable detects it and shows its parameter as a new connection in the **Skeletal Mesh** node. This connection can be used to get the parameter value from the assigned material from the source skeletal mesh. Link its mesh connection to the **Material** node's one.
{F102292}
> In this example, the skeletal mesh is "BaseObject_SingleMaterial_Param".
{F102294}
> The source skeletal mesh has a material asset assigned. The material has one parameter called "Base Color".
---
8) Connect the "Base Color" connection of the **Skeletal Mesh** node to the "Base Color" connection of the **Material** node. Compile the **Customizable Object**.
{F106102}
> This example gets the value for the "Base Color" parameter from the value in the source skeletal mesh material.
== Setting the value of the parameter
As the **Material** node has a connection from the parameter of the set material, it can be now connected to other nodes to change its value. In this bonus example, another texture is set as "Base Color".
(NOTE) The resulting Customizable Object of this example can be found in the [[ /w/mutable/unreal-engine-4/examples/#village-demo | Village Demo ]] in //Content/HowTo/BasicObject// named "BaseObject_MatParam_3"
1) From the "Base Color" connection in the **Material** node, create a [[ /w/mutable/unreal-engine-4/user-documentation/nodes/texture/ | Texture ]] node.
{F106104}
---
2) With the **Texture** node selected, set a texture value in the **Graph Node Properties** tab.
{F102304}
> In this example, the texture selected is a color bar called "BaseObject_Colorful".
---
3) Compile the **Customizable Object**.
{F102306}
> The resulting mesh with the new texture value.
= Objects with more than one material
(NOTE) The Customizable Object of this example can be found in the [[ /w/mutable/unreal-engine-4/examples/#village-demo | Village Demo ]] in //Content/HowTo/BasicObject// named "BaseObject_MoreMaterials"
In case a skeletal mesh used in a **Customizable Object** has more than one material, the **Skeletal Mesh** node will detect it and set its inner connections with its values. In this case, there must be one **Material** node for each material used. Any number of **Material** nodes can be connected from the **Base Object** node.
The following image shows the most basic example of this. A **Customizable Object** with a skeletal mesh with two materials.
{F102411}
> Once the skeletal mesh is set in the **Skeletal Mesh** node, the node is updated with its material connections. In this case, there are two materials without any parameters