Tutorial 45: Advanced Dynamic Rendering – Part 3

This is the last post in this 3 part series. Make sure you watch previous ones, as we are discussing Dynamic Rendering here. All the animation and motion is done. Only rendering is left. And I think it’s the most complex thing to do correctly.

When I was researching this project, I was able to render multiple videos and swap the quote, name and image for each customer. But all of them were rendered in one resolution. When I tried to render everything and swap the language with each render, things got more complex. Add in multiple resolutions output, and things get even more confusing and hard to follow.

Every time you add a variable, for example new resolution, things will get harder to figure out.

Formatted Strings to the Rescue

I did mention Formatted Strings in this series before. But in this video, you get to see their true power. Simply, I used Formatted Strings to:

  • Join Strings together (Name + Surname)
  • Rename all the videos on the export
  • Create and rename all the folders, as needed

It sounds simple, but image if you had to rename all the files after export. And do it again and again, if you made a mistake or had to re-run the render again? It would have taken more time, than correcting any potential mistakes.

Here are the things you should read in Cavalry Doc’s to make your workflow more powerful:

Above pages will give you solid baseline and up to date information on how to render files, at scale. Combine it with Formatted Strings tool and you unlock true potential of Cavalry.

Dynamic Index

Dynamic Index is located in Render Manager as read only attribute. It increments with each render. 0, 1, 2, 3, 4, 5 …. and so on. When you set your renders in Dynamic Tab > Dynamic Render > ON and specify Render Range (Start and End), then Cavalry will render X amount of videos for you. Dynamic Index will keep increasing, until the End value in Render Range.

We can use this data to automatically swap text in your Spreadsheets, images in Image Smart Folder and so on. At the end it is all about:

  • How you structured your data in Spreadsheets
  • Using Math or JavaScript to repeat data range (Modulo operator)

Swap Language formula

Copy to Clipboard

This is the first difficult part of this setup. We need to use Dynamic Index to automatically advance our Array and swap language from English to Spanish / Italian / French and so on. We can use Math to achieve this. Let’s examine the code in more detail.

  • Array > Index accepts Integer values 0, 1, 2, 3 and so on
  • Each language is located on separate Index in this Array
  • Math.floor() will round down all the values, until they get “big enough” to swap from 0 to 1 to 2 and so on
  • We can use this to automatically advance to next row after X amount of renders

As you can see, we can use simple rounding to advance through our array and swap languages easily. Now, how do you know, when to swap your language from English to Spanish?

  • We have to render 3 different resolutions
  • We have 5 different quotes
  • We need to render each quote 3 times
  • 3 * 5 = 15 videos (5 separate quotes in 3 different resolutions each)

This lets us easily swap to new language, once we render each customer quote in 3 resolutions. Pretty straight forward and simple.

Change Quote formula

Copy to Clipboard

You need to get familiar with Modulo concept and how to use it. Once you do it and get comfortable in applying it in your designs and rigs, then you will have more options to play with than before. Let’s look at this formula in more detail.

  • This formula goes into Spreadsheet > Row Index
  • Row Index only accepts Integer numbers – o, 1, 2, 3, 4, 5 and so on
  • Math.floor() rounds down everything, so we don’t get accidental swap of data
  • Dynamic Index goes up and up with each render
  • We are dividing it by Resolution Number – in our case 3 resolutions
  • Resulting value is then “modulated” with Modulo function – Number of Quotes per each customer
  • This means that once we render 15 videos (5 quotes in 3 resolutions), our Row Index goes back to 0 again
  • Once this happens, previous expression (Swap Language) will swap advance our Language Array to new Index (new language)

This way, both formulas / JS Math nodes work together and auto advance our renders to next data points, next resolution and so on.

Start small, then scale

All this can be overwhelming. This is why, in the video, I have shown you how to render 1, 5, 35 and 105 videos. Slowly advancing with complexity of the setup. Do the same in your case. Your formulas and setup will depend on your data and how everything is structured. You may have to use more Math nodes. Or split your project per resolution, if you need more precise control. Perhaps adjusting text position in certain resolutions?

Either way, start small and run test renders. Then scale to final output.

Get Project File From Gumroad

This project file contains all the assets necessary to make animation in the tutorial in final form. Everything is labeled, linked, with expressions and ready to use, if you wish to make your own version or just play around with it.

If you have any suggestions for tutorials or how I can improve, please do get in touch. I would love to hear from you.

Found it helpful? Consider sharing it with others.

Other tutorials

2026-01-14T13:07:10+00:00
Go to Top