This article shows two examples of how to use properly the mesh morph stack nodes and avoid a source graph with unwieldy amounts of Mesh Morph nodes. The first example explains how to set a mesh morph stack definition and how to apply it to a skeletal node using a mesh morph stack application. The second example explains how a mesh morph stack definition can be applied to more than one mesh using export and import nodes.
Define and apply a mesh morph stack node
This example explains how to apply more than one morph target to the skeletal mesh of our character.
- One skeletal mesh of the character with more than one morph target.
- One material asset or material instance of a base character.
- The first step is to create a basic Customizable Object asset with the Base Object, the Material, and the Skeletal Mesh. Link all the connections.
In this example, the Customizable Object asset is named "CustomizableObject_MorphStackNodes", the Reference Skeletal is "BaseObject_MorphStackNodes", the Material is called “BaseMaterial_MorphStackNodes” and the Skeletal Mesh is the same as the Reference Skeletal’s one.
- Now that the customizable object has been set up, remove the link between the Skeletal Mesh and the Material node.
- Create a Mesh Morph Stack Definition node and link the Skeletal Mesh node to it. All the morph targets of the Skeletal Mesh should appear in the Mesh Morph Stack Definition node.
- Create and link a Float Node for each morph target that needs to be modified. The morph target without a float node linked to them will remain unaltered in the final mesh.
In this example a float parameter with the parameter name "Fat" will be created and linked to the "fat" morph target. Another float parameter with the parameter name "Jowl" will be created and linked to the "jowl" morph target. And finally, a float constant with value 0.5 will be created and linked to the "Head_eggShape" morph target.
- Create a Mesh Morph Stack Application node and link the Skeletal Mesh and the Mesh Morph Stack Definition nodes to it.
- Link the Mesh Morph Stack Application node to the Material node. Check that the source Source Graph looks like the image below.
- Compile. Two sliders with the morph targe names should appear in the Preview Instance Properties tab.
Move the slider and get different combinations of the body or jowl shape.
Using the stack definition of a skeletal mesh into another skeletal mesh
In this example, a jacket will be applied to the customizable object of the last example.
- One skeletal mesh of a jacket with morph targets. These morph targets should be present in the skeletal mesh of the character.
- One material asset or material instance for the jacket.
- Create an *Export Stack Pin* node and link the Mesh Morph Stack Definition node to it.
Set the name of the Export Stack Pin.
In this example the name will be "CharacterMorphs"
- Create one Skeletal Mesh node and one Material node and link them together. Then link the Material it to the Base Object node.
The skeletal mesh used is "ShirtObject_MorphStackNodes" and the material used "ShirtMaterial_MorphStackNodes"
- Create and link a Mesh Morph Stack Application node between the Skeletal Mesh node and the Material node.
- Create an Import Stack Pin node and link it to the Mesh Morph Stack Application node.
Select the needed Customizable Object in the first combo box of the Import Stack Pin node. The Customizable Object is the one where the Export Stack Pin has been created.
Once the Customizable Object has been selected, a new combobox will appear. Select the needed Export Stack Pin.
The name of the Customizable Object is "CustomizableObject_MorphStackNodes". The name of the Export Stack Pin in "CharacterMorphs"
- Compile. Move the slider with name fat. The shirt and the body should change their shapes.