Layouts in Cavalry 1.5

Chris Hardcastle
Cavalry Animation
Published in
4 min readMar 10, 2023

Cavalry’s 1.5 release introduced a new hierarchy based Layouts system which makes creating responsive layouts a breeze.

Layout Groups provide a way to stack Shapes by ‘butting’ them up against each other. This means that if the bounding box of one Shape in the stack changes, the others will move to accommodate the new space required for that Shape.

This can be useful for all sorts of applications including creating dynamic layouts which can respond to changes in resolution or aspect ratio. In the example above, the logo and text elements are constrained to edges of the Composition by the Layout. The font size of the text is then being dynamically updated to fit the available space using the Text Shape’s Shrink to Fit Text Box feature.

Combine this with Cavalry’s Dynamic Rendering feature and it’s possible to create robust automations.

Check out this tutorial to see how quickly the example above can be set up.

Creating a layout is as simple as adding Shapes to a Layout Group. Just drag layers in to create a hierarchy as you would with a regular group. Shapes can then be simply reordered in the layer stack using drag and drop.

Once they are in the group, changing the size of one will push the others out of the way.

Layouts can also be embedded within other layouts meaning more complex arrangements can be created.

Layouts can be used in any way you see fit. Here, Shapes adjust to make room for a rotating Shape.

In this tutorial, learn how to set up a Layout with a Falloff to mock up a dynamic user interface animation.

Case Study — Secta

As an official software partner, we’ve been putting Layouts to work on a project with the team at Secta who run various corporate five-a-side football leagues (more sports coming soon). They have a huge amount of content to produce each week including fixtures, results, league tables and more and Cavalry has been brought in to help with automating the process.

Cavalry has been brought in to help with automating the process.

Various templates have been built including one to send to the teams to let them know who’s playing who next week. There are 4 bits of unique information for each fixture – home team, away team, pitch number and time. These are each added in order to a Layout Group which can then be used to set the spacing between the elements and the margins.

A diagram showing a collection of text and shapes positioned using a Layout Group in Cavalry.
A single row within a Layout.

If you then add this Layout Group to a Duplicator, you can start to use Cavalry’s data features to pull information from a spreadsheet and populate each duplicate.

The data driving the elements within the Layout Group

The individual elements on each row then dynamically update their position according to the width of the other elements around them.

A diagram showing a Layout Group duplicated to create a table of team names, pitch numbers and times.
The Layout Group added to a Duplicator.

Each week, as the data in the spreadsheet is updated, the rows also dynamically update while retaining their spacing. Secta can then export the animations with minimal work and be confident the creative remains in-tact.

Open Cavalry → Render → Post to socials → 😃

This is just one example of how Layout Groups can be used as a versatile tool in combination with Cavalry’s other features, speeding up your workflow and opening up new creative possibilities.

Layouts are a Professional feature that shipped as part of the Cavalry 1.5 release. Full release notes can be found here.

Cavalry is free forever to use or go Pro and unlock a world of creative possibilities. A Professional subscription to Cavalry is available from £16/month (paid annually) — sign up here.

--

--