Common Attributes (Shapes)
Intro
Most Shapes in Cavalry include the common attributes listed below.
UI
- Shape
- Fill
- Stroke
- Masks
- Advanced
Position - Set the Shape's position. 0,0 is in the centre of the Composition.
Rotation - Set the Shape's rotation. (in degrees).
Scale - Set the Shape's scale.
Skew - Slant or shear the Shape along the X or Y axis.
Pivot - Define the pivot point for the shape. This is useful when animating rotation and scale.
Opacity - Set the Shape's opacity.
Blend Mode - Set the blend mode.
Deformers - A list of connected Deformers. Use the + button to create and connect a Behaviour or drag and drop an existing one to connect it.
Filters - A list of connected Filters. Use the + button to create and connect a Filter or drag and drop an existing one to connect it.
Motion Blur - Enable/disable motion blur:
- None - No motion blur.
- Full - Enable Full motion blur. Ensure Motion Blur is also enabled for the Composition by either clicking the icon at the top of the Scene Tree or checking Motion Blur in the Composition Settings window.
- Transform Only (Fast) - Enable Transform Only motion blur.
Fill - Enable/disable the fill.
Color - Set the Shape's color using Hex or RGB values (only RGB values can be animated). Click the color swatch to set colors using HSV.
Where hex codes contain repeated sequences of characters or numbers, they will be auto-completed. For example, entering AB
and then hitting Enter will result in #ABABAB
.
Shaders - A list of connected Shaders.
Alpha - A master control for the opacity/ alpha of the entire shader network.
Stroke - Enable/disable the stroke.
Color Mode - Determine how the color is applied to the Stroke:
- Single Color - Use a single color.
- Gradient - Apply a gradient along the Stroke.
Color - When Color Mode is set to Single Color, set the Shape's color using Hex or RGB values (only RGB values can be animated). Click the color swatch to set colors using HSV.
Where hex codes contain repeated sequences of characters or numbers, they will be auto-completed. For example, entering AB
and then hitting Enter will result in #ABABAB
.
Shaders - When Color Mode is set to Single Color, connect Shaders to this list.
Gradient - When Color Mode is set to Gradient, set the colors for that gradient.
Alpha - A master control for the opacity/ alpha of the entire shader network.
Width - Set the width of the stroke.
Cap Style - Set the appearance of caps (each end of the stroke) on open paths.
- Flat - A flat end that terminates at the end point.
- Round - A hemispherical end with the end point at its centre.
- Projecting - A flat end that projects half the Width beyond the end point.
Note that Projecting caps are not supported when Tapered Width is checked. The Cap Style will fall back to Round in this instance.
Join Style - Set the appearance of joints.
- Mitre - Sharp corners.
- Round - Rounded corners.
- Bevel - Beveled/chamfered corners.
Mitre Limit - Sets the limit at which a sharp corner is drawn beveled.
Dash Pattern - Enter a number sequence separated by commas (dash, gap, dash, gap...).
Dash Offset - Offset the Dash Pattern along the path.
Align - Align the stroke along the path.
- Centre - Align the stroke along the centre of the path.
- Inner - Align the stroke along the inside of the path.
- Outer - Align the stroke along the outside of the path.
Open paths only support Centre alignment. Where multiple contours appear in a single Path, any open contours will be set to Centre regardless of the Align setting.
If Align is set to Inner or Outer and Trim enabled, closed paths will be given a Cap Style of Flat regardless of their setting. Where multiple contours exist in one Shape, any open paths will respect the Cap Style setting.
Trim - When enabled the controls below are available.
Start - Wet the percentage along the Shape the Stroke will start.
End - Set the percentage along the Shape the Stroke will end.
Travel - Move the Stroke around the Shape.
Reverse Path - Reverse the direction of the Stroke.
Tapered Width - When checked, the Stroke is tapered from the start to end of the contour.
Start Width - A multiplier for the Stroke's Width at the contour's first point.
End Width - A multiplier for the Stroke's Width at the contour's last point.
Double Taper - When checked, the Taper's Width is set to 100% at a point along the contour determined by the Taper From attribute. The Start Width and End Width attributes can then, for example, be set to 0% to create a taper that starts at zero, increases to full width and then reduces to zero again.
Cap Centres - Offset the centre of Round caps.
Taper From - With Double Taper checked, set the point along the contour at which the Width is set to 100%.
Middle Length - Set the length of the Stroke either side of the Taper From point where the Width is 100%.
Multi Stroke - Add additional Strokes or Stroke Duplicators.
Feather - Add a blurred edge to the Shape.
Clipping Masks - Connect Shapes to be used as clipping masks. Clipping Masks are a geometry mask and so use the outline of a shape rather than its colour information.
List UI options:
- Visibility - Enable/disable the Clipping Mask.
- Boolean options:
- Union - Combines the Shape.
- Subtract - Clips the Shape.
- Intersect - Clips everything outside the Shape.
Clipping Mode - Set the anti-aliasing quality for the Clipping Masks:
- Best - High quality anti-aliasing.
- Normal - Default anti-aliasing.
- Fast - No anti-aliasing.
Feather Clipping Masks - When checked, the Feather value is also applied to any Clipping Masks connected to the Shape.
When connecting a Shape as a Clipping Mask it will be automatically switched to 'wireframe' mode. To turn this off, right click on a Shape in either the Scene Window or the Attribute Editor and uncheck Wireframe.
When using a Composition as a Mask ensure that the Composition's Background Alpha is set to 0 for the Composition bounds to not be included in the Mask.
Track Mattes - Connect Shapes to be used as track mattes. Track Mattes are image based masks.
List UI options:
- Visibility - Enable/disable the Track Matte.
Track Matte Mode - Choose an option to define the transparency of the Track Matte:
- Alpha - Opaque when the alpha channel's pixel value is 100%.
- Alpha Inverted - Opaque when the alpha channel's pixel value is 0%.
It's not possible to use a Shape with a Track Matte as a Track Matte for another Shape.
2.5D - When checked, the Shape will draw in 2.5D if a Camera is added to the Composition.
Lottie Export:
- Export if Visible - Export a Shape if its visibility is set to on.
- Always Export - Export a Shape regardless of wether its visibility is set to on or off.
- Never Export - Do not export the shape regardless of whether its visibility is set to on or off.
Lottie Baking:
- Automatic - Automatically calculate if a Shape needs baking based on the connections in the scene.
- Animated Mesh - Bake the Shape information out for each frame. Materials will be static and changing point counts are not supported.
- Animated Mesh & Materials - Bake each Shape and any materials for every frame.
- Nuclear - This is the 'nuclear bake' option designed to work around shortcomings in Lottie.
- Still - The Shape will export as a still containing no animation.
Wireframe - Display the Shape as a wireframe in the Viewport. This option can also be set by right clicking on a Shape in the Scene Tree. When checked, the Shape will not render.
Hidden - When checked, the Shape will be hidden from the Viewport. This is the equivalent of toggling the eye icon in the Scene Tree to off.
Draw On Top Of Parent - When checked (default), if the Shape is the child of another Shape, it will draw in front its parent. This is useful for situations where, for example, a character's eyes are the children of its head. Uncheck this to prevent this behaviour. Note that this attribute is ignored if a Shape has 2.5D enabled.
Freeze Calculations - When checked, any input connections to the Shape will be paused. This can be used to optimise a Composition where any connections to a Shape are no longer updating. For example, keyframing this attribute from off to on will prevent any further input calculations to the Shape and instead use the last known value. Reducing unnecessary calculations in this way can result in faster playback for heavier Compositions.
- Checking Freeze Calculations blocks any input/downstream connections. Any output/upstream connections will continue to calculate but, because there are less overall calculations to consider, these will also be faster.
- Because any calculation in Cavalry is ultimately only required to render a Shape, Freeze Calculations only affects Shapes.
- Transformations (position, rotation, scale etc) have very little impact on performance and so freezing a Shape will not prevent it from transforming.
- Freeze Calculations is hierarchical. That means that if a parent is frozen then any child Shapes will also be frozen.
- Freeze Calculations is not supported when used on Shapes in Composition References (aka Pre-Comps).
In the image below, imagine Freeze Calculations has been keyframed from off on frame 24 to on on frame 25. At frame 25 the Duplicator will stop calculating the radii of the Ellipses which are being driven by the Noise. Even if the Noise had stopped changing at frame 25, Cavalry would still continue to 'listen' for any changes so, while the Shapes are not changing, playback might be affected. By checking Freeze Calculations any 'listening' is paused and so performance is greatly improved.
Vertical Layout Alignment - When a Shape is part of a Layout Group, set the vertical alignment within its cell:
- Ignore - Respect the Shape's alignment (do not set any custom alignment).
- Top - Align the Shape to the top of its cell.
- Middle - Align the Shape to the middle of its cell.
- Bottom - Align the Shape to the bottom of its cell.
Horizontal Layout Alignment - When a Shape is part of a Layout Group, set the horizontal alignment within its cell:
- Ignore - Respect the Shape's alignment (do not set any custom alignment).
- Leading - Align the Shape to the left of its cell.
- Centre - Align the Shape to the middle of its cell.
- Trailing - Align the Shape to the right of its cell.
Exclude From Layout - When checked, if a Shape is part of a Layout Group, prevent it from being included in the layout's calculations. This can be useful for debugging layouts. Making a connection from Exclude From Layout to the Hidden attribute will result in the Shape also being hidden from the Viewport if preferred.
Layout Based on Size at Frame - When checked, the bounding box of a Shape that's part of a Layout Group can be set based on its size on a specific frame.
Layout Frame - When Layout Based on Size at Frame is checked, set the frame to set the bounding box of a Shape that's part of a Layout Group. This is useful to isolate the effect an animated Shape can have on a Layout Group.
Scheduling Group Mode - Determine the Shape's behaviour when part of a Scheduling Group:
- Use - This Layer is used by Scheduling Group.
- Ignore - This Layer is excluded by Scheduling Groups.
- Use Children - This Layer is excluded, but its children are used.
Guide Layer - Determine whether or not a Shape is visible when rendered to file or when its parent Composition is a Layer within another Composition (Pre-Comp):
- Off - Do not set the Shape as a Guide Layer.
- On (Visible in Pre-Compositions) - A Shape will be visible when part of a Pre-Comp but will not appear when rendering to file.
- On (Invisible in Pre-Compositions) - A Shape will not be visible when part of a Pre-Comp and will not appear when rendering to file.