Skip to main content

Sub-Mesh

Intro

Meshes in Cavalry can contain a hierarchy of other Shapes within them. We refer to these meshes as ‘child 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 within layers. The Sub-Mesh Behaviour provides a way to access and affect these individual child meshes by specifying the level(s) within a hierarchy.

UI

Common Attributes +

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.

Opacity - Set the opacity.

Visibility - Affect the visibility on a per child mesh basis.

Time Offset - Offset the animation curve on a per child mesh basis. Tip - connect a Stagger.

Centre Pivot - Centre the pivot to each child meshes bounding box.

Deformers - A list of connected Deformers.

Filters - A list of connected Filters.

Level Mode - Choose which level(s) of a Mesh's hierarchy to affect.

  • Custom... - Manually set a Custom Level Range.
  • Text (Lines) - Used with a Text Shape, this will affect each line.
  • Text (Words) - Used with a Text Shape, this will affect each word.
  • Text (Characters) - Used with a Text Shape, this will affect each character.
  • All - Affects all sub-meshes, regardless of level.
info

The Level Mode provides several settings designed to make working with Text easier. For example, the Text (Words) mode sets internal Custom Level Range values of 2, 2. While these settings will affect any words in a Text Shape, the same settings can also be valid for an SVG Shape.

Custom Level Range - Set the level within the Mesh's hierarchy to affect. This can also be used to set a range of levels. For example, setting a range of 1, 2 might be used to override the color of an SVG for all the shapes on levels 1 and 2 but not on level 3.

info

As the Level value increases, the Sub-Mesh travels deeper into the Shape's hierarchy.

Flatten Mesh at Level - All child meshes below this level will be merged and brought up to this one.

Fill and Stroke

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.

Replacement Mode - By default, all materials will be replaced but, by using this option, you can target certain conditions:

  • Replace All - Sub-Mesh will replace the Fill/Stroke of all sub-meshes.
  • Replace Missing - Sub-Mesh will only replace the Fill/Stroke of any sub-meshes that do not have Fill/Stroke enabled.
  • Replace Existing - Sub-Mesh will only replace the Fill/Stroke of any sub-meshes that do have Fill/Stroke enabled.

Fill/Stroke Overrides - See Color Material Override and Alpha Material Override.

info

Levels for Text are as follows:

  1. Line.
  2. Word.
  3. Character.
Example usage
  1. Create a Text Shape.
  2. Create a Sub-Mesh Behaviour.
  3. Connect subMesh.idtextShape.deformers
  4. Set Position Y on the Sub-Mesh to 30.
  5. Right click on the Falloff attribute and select 'Add Falloff'.

When the Falloff is animated over the text, each letter will move up 30px.