Advanced Expressions – Procedural Rulers And Chronometers

Is this detailed video tutorial I will show you how to take advantage of After Effects built-in text engine in combination with some advanced expressions methods to build procedural rulers and chronometers. You can control everything, segment start, end, path shape and length. AE text engine is a deep jewel mine, it never ceases to amaze me. I’ve only recently started to dive deep into it, building things I never thought possible before. This video is packed with information on how to use some of not so well known After Effects expressions functions, like propertyGroup, pointOnPath(), tangentOnPath(), normalOnPath(), eval(), Math.atan2() etc. Follow till the end, you will surely learn a new thing or two. If you like the techniques I explain here, consider buying the project file for a modest price to support my efforts and encourage me to create other videos like this:

0:00 – Introduction
2:14 – Generate a mask path and also ruler division lines using a special character. Learn to control its scale properly. Navigate through layer properties in relative mode, using the propertyGroup() function. Utilize the mask options to position and align the division lines along the mask spline.
15:00 – Store your on a layer’s marker as a literal JavaScript object and learn to extract it for use in the expression code using the eval() function. Generate an exact number of divisions based on your input data. Adjust the margins to fit the spline.
17:43 – Center the bar vertically. Calculate their top, center and bottom anchor.
20:45 – Set the division lines scale separately for large and small divisions.
22:52 – Draw the horizontal line with a stroke effect.
23:00 – End the ruler with a long bar.
23:37 – Generate the numbers for the ruler procedurally based on the input data.
26:00 – Position the numbers correctly along the line using the pointOnPath() function.
30:04 – Make adjustments to counter the text leding offset.
31:55 – Set a custom offset from the spline the right way, using normalOnPath() function. Avoid AE confusion to decide which way is up.
34:40 – Orient the numbers to respect the spline curvature with a Rotation animator. Use the tangetOnPath() together with Math.atan2() to calculate the rotation for each point along the mask path.
38:17 – Make adjustments so the setup works with closed mask paths too. Create clock faces and chronometers easily.

Duration: 00:41:42