Meshes in Cavalry can contain a hierarchy of other Shapes within them. We refer to these meshes as ‘Sub-Meshes’. This hierarchy is a tree structure, much like the Scene Window, only it exists inside a Shape.
For example, Text consists of Lines, Words and Characters, a Duplicator is built of many Input Shapes and SVGs can have any number of layers. The Sub-Mesh Behaviour provides a way to access and affect these individual meshes by specifying the level(s) within a hierarchy.
Position - set the X and Y position. 0,0 is in the centre of your comp.
Rotation - set the rotation (in degrees).
Scale - set the X and Y scale values.
Visibility - affect the sub-shape's visibility on a per shape basis.
Time Offset - set the animation curve for duplicates on a per shape basis. Tip - connect a Stagger node
Center Pivot - centre the pivot to each sub-mesh's bounding box.
Deformers - a list of connected Deformers.
Filters - a list of connected Filters.
Level Mode - these presets set the Level values for you:
Custom... - manually set Levels attribute.
Text (Lines) - sets Recursion values of 1, 1.
Text (Words) - sets Recursion values of 2, 2.
Text (Characters) - sets Recursion values of 3, 3.
All - sets Recursion values of 0, x where x is the highest depth in the Shape's hierarchy.
The Level Mode is just a preset. For example, the Text (Words) mode just sets Level values of 2, 2 which may also be valid for an SVG.
Level - set the level within the Sub-Mesh's hierarchy to affect. It's also possible to set a range here - this is useful, for example, when overriding color on an SVG. You may want to set everything on levels 1 and 2 to green but leave everything on level 3 untouched.
As the Level value increases the Sub-Mesh travels deeper into the Shape's hierarchy.
Sub-Mesh also has Fill and Stroke tabs. They are identical to those found on Shapes apart from two exceptions.
Replace Fill/Stroke - when checked the Sub-Mesh will overwrite any materials on the shapes it is connected to with the Color and/or Shaders set in this tab.
Fill/Stroke Overrides - see Color Material Overrride and Alpha Material Override.
Levels for Text are as follows:
Line.
Word.
Character.
Example usage:
Create a Text Shape.
Create a Sub-Mesh node.
Connect subMesh.id > textShape.deformers
Set Position Y on the Sub-Mesh to 30
Right click on the Falloff attribute and select 'Add Falloff'.
When you animate the Falloff through the text each letter will move up 30px.