This article explains how to create a Customizable Object with nodes that allow adding patterns on a mesh and applying colors based on the number of masks created. Two examples of a head’s handkerchief are created from less to more complexity. The first example features the choice of a combination of two colors for a handkerchief pattern using only a color selector slider linked to a secondary "color bar". However, the second example presents multiple choices of patterns and two "color bars" working independently one from another.
(WARNING) We recommend visiting the [[ URL | Basic Concepts ]] page before start creating any Customizable Object
= = Add a pattern with a preset combination of colors
In this example, a Texture Layer node is used to apply two pattern complementary masks linked to two different color bars but controlled through only one color selector slider. This slider displays only the main "color bar", so the user cannot choose two colors but a preset combination when choosing the main one. In this case, the color bars have a great range of color gradients.
(NOTE) The resulting Customizable Object of this example can be found in the [[https://work.anticto.com/w/mutable/unreal-engine-4/examples/#village-demo | Village Demo ]] in //Content/Examples/HowTo// named "ColorPatterns"
== Assets required
* One material asset or material instance of the character standard with two parameters (color and normal)
* One skeletal mesh of the character with the previous material applied (one material, two parameters)
* One skeletal mesh of a cloth asset
* One Color Base, one Normal and one Roughness (if wanted) textures of the cloth asset
* One general mask texture of the cloth area the patterns are to be applied
* One mask of the pattern (Mask A)
* One mask of the pattern inverted (Mask B)
* One color bar with gradient colors
* One secondary color bar with gradient colors (combined vertically with the previous one)
(NOTE) The assets used in this example can be found in the [[ https://work.anticto.com/w/mutable/unreal-engine-4/examples/#village-demo | Village Demo ]] in //Content/HowTo/ColorPatterns//
1) The first step is to create a basic [[ URL | Customizable Object]] asset with the **Base Object**, the **Material** and the **Skeletal Mesh**. Link all the connection with the same name.
> In this example, the Customizable Object asset is named "Color Patterns", the Reference Skeletal is "ColorPatterns_mesh", the Material is called “ColorPatterns_M” and the Skeletal Mesh is the same as the Reference Skeletal’s one.
2) Create an Object Group node. Link its “Group” connection to the “Children” one of the **Base Object** node.
Image Step 2
3) Select the **Group **node and name it in the Graph Node Properties tab. Choose a group type as well.
Image Step 3
> In this case, the Object Group’s name is “Hair”, because the Handkerchief is one of the types of hair created for the character.
4) From the “Objects” parameter of the Object Group node create a Child Object node. Name it in the Graph Node Properties tab.
Image Step 4
> In the example, the Child Object’s name is “Handkerchief”.
5) Create an Extend Material node dragging from the “LOD 0” parameter of the Child Object node.