Tutorial 50: Extrude Text Layers

Just a heads up – this tutorial convers 3 separate examples:

  • Single Word or Line Extrusion
  • Colour Change accross characters and extruded mesh
  • Multi-Line Text Extrusion

I slowly go higher and higher in complexity, but I hope I was able to explain all the concepts carefully and correctly. Main idea for this tutorial was to setup a system or a template, where I can update a single layer (Input Text – String), and the whole animation will be updated. This makes it easy to adapt this rig to a template or to render similar animation at a scale.

Overall, the main concept in setting this rig up, is to:

  • Take Input String (word or line)
  • Split it into individual characters
  • Extrude them all
  • Reposition Anchor Point per each Characters
  • Reconstruct Words or Lines with a Duplicator

Thats about it. However, details are important, if you want to make this setup responsive, easy to update or render at scale.

Custom Shape vs Group

Main reason I used Group inside Custom Shape is that it allows me to move Anchor Point for the whole word or line. Plus Custom Shape allows me to see mesh data with Mesh Explorer to diagnose potential problems or see how the final design is build at a mesh level. If you skip Custom Shape step, you will struggle to reposition each Extruded Character in a way, that they appear like “extruding out” or coming out of the wall.

If your Extrude tool Angle is different, than mine in the tutorial, you will have to use different values in the Align Tool.

Rig 1 – String to an Array Conversion JavaScript Code

This JavaScript code will convert input String into an Array. Simple as that. At the end, it will output one character at a time, when text layer is used in a Duplicator. It will use Duplicator’s Index Context to output correct character.

This is super useful, not only in this tutorial’s context. Instead of creating an Array and populating it with single letter at a time, you can use JavaScript to do the same job for you. You can rig it in a way, where a spreadsheet will drive Input Text and you can render out hundereds of customised videos with this method.

Copy to Clipboard

Rig 2 – Index to Color problems

This problem took me quite a while to figure it out. Special thanks to Yevgeny Makarov on helping in diagnosing it and finding the correct solution. Check out his Cavalry Scripts here – I use a number of the myself.

The reason that Index to Colour does not work correctly on an Extrude Mesh is that it is “wrapped” in an extra invisible Group. This could be a bug or a feature. I think it could be a bug in the Cavalry 2.6 version. This Group “steals” a colour for itself, like it is a mesh. This is why Extruded shapes have gradient stretching over 50% of input characters – rest are inheriting last colour.

To fix this, you need to “collapse” all the Sub-Meshes into single meshes. This will allow us to apply Index to Color correctly.

Rig 3 – Convert String into Array – One Word at a Time

Output One Word at a Time in Duplicator 1

This code is different, than in the Rig 1. In Rig 3 setup, I’m using 2x Duplicators. Duplicator 1 is creating individual Words. Duplicator 2 creates whole sentences.

Make sure this JavaScript layer has String and Integer as an Inputs. Integer provides Index Context data from a Duplicator 2.

Copy to Clipboard
Count Characters per Each Word

This code counts characters per each word, and outputs them as needed in Duplicator 1. For example:

  • Input String: How are you today?
  • How – 3 characters
  • Are – 3 characters
  • You – 3 characters
  • Today? – 5 characters

When you put this Duplicator 1 into Duplicator 2, you want to create correct number of characters to recreate Input Text. Thats the whole logic behind it. You could do the same thing with an Array (3, 3, 3, 5). But then you would have to update an array every time your string changes. This way allows us to automate this step.

Finally, you need an Integer as an Input in this JavaScript layer as well with an Index Context plugged in, too.

Copy to Clipboard

Index Context Depth 1 vs 2

This concept is a bit tricky to understand, without Dependency Graph. In the above image, you can see the whole final setup from Rig 3. 2x Index Context ((IC1) Layer. One is using data from Duplicator 1 (Index Context Depth 1). This means that this IC1 layer is using first available Context data (Purple Dotted Line).

Second Index Context (IC2) layer is using data from Dupliactor 2. But it has to “by pass” Duplicator 1 first. This is why Index Context Depth is set at 2. Green Dotted lines are showing how data travels – first to Duplicator 1, the one that creates Single Words. We skip it, and carry on until we encounter Duplicator 2, which provides data we need.

Essential, this means “don’t use the first Index Context data you encounter, use one level after it”. This is advanced concept, but with my tutorial and above image, I hope it makes it easier to understand.

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-02-15T12:51:38+00:00
Go to Top