Back to Blog Index

Everything About Expressions You Didn't Know...Part Deux: Semicolon's Revenge

No items found.

Enhance your expression knowledge with a close look at the Light, Camera, and Text Expression Language menus

The Expression Language Menu holds a lot of little pieces for you to assemble. Where do you even start?! This series will walk you through each category and highlight a few unexpected items in each, leaving you better equipped to start expressing yourself via expressions.


In Part 2 of our series, we're diving into some of the newer—or ignored—menus. Today, we're going to be looking at:

  • Light
  • Camera
  • and Text
Article 2 Menu.png

Check Out the Full Series!

Can't express yourself enough? Check out the rest of the series:

Part 1 - Property and Effects, Layer, Key, Marker Key

Part 3 - Javascript Math, Random Numbers, Path Properties

Part 4 - Global, Comp, Footage, Project

Part 5 - Interpolation, Vector Math, Color Conversion, Other Math



While I'm sure somebody out there is using 3D Lights in After Effects, they're not very common! So the chance of someone using lights and expressions is pretty slim.  We came up with a few creative uses of these properties, though they're definitely not everyday tasks and are a little contrived.

We'll explore:

I have a good feeling that learning about the Light category will be just as illuminating for you as it was for me, so let's go!


We can use the intensity property to... see how intense the light is!

Let's say you've set up a flickering light, and you want a layer to glow more based on how intense the light is. We can do that!

On our glow effect's intensity, we can use this expression:

const lightIntensity = thisComp.layer("Light").intensity;
const multiplier = 1.5;

lightIntensity * multiplier;

Now, for every 1% of intensity, the glow will get 1.5x brighter!



Looking at our scene, we have a light with a specific color casting onto our scene, coloring the ground plane.

In this case, though, the sun doesn't match the light this looks a little weird.

To fix this, we don't need any fancy tricks; we'll just pickwhip from the shape layer fill color to the light color, and get this expression that leverages the light’s color property:


Now as we change the light's color, the sun color will change too!

Turning Out the Lights

Hopefully this small glimpse into the world of Light expression category has set off some cartoon lightbulbs above your head.



3D cameras in AE are a topic of much contention and argument, but nobody can deny that—just like with peanut butter—everything is made better with expressions.

To that end, here are some neat tricks that use expressions with Camera properties to great effect.

We'll look at:

  • Preserving layer scale during camera zooms
  • Ensuring your hero layer is always in focus

Without further ado: Lights! Action! Camera! ...or something.



It's a little weird to think about, but you can use the zoom value of a camera layer to control the scale of other layers—so no matter how much you zoom in or out, they'll appear the same size on screen!

Consider: the more you zoom in on something, the bigger it appears. But sometimes you don't want it to scale up. Maybe you want it to stay a fixed size. For example, having 2D labels attach to your objects that still respect the 3D environment of your comp.

const camera = thisComp.activeCamera;
const distance = length(sub(position, camera.position));
const scaleFactor = distance / camera.zoom;

value * scaleFactor;

By applying this to our layer scales, we can still tweak the individual scale of each layer but have it ignore the camera zoom altogether.



If you find yourself using 3D cameras in AE, there's an old trick to make sure that your camera's target is always in focus.

You can apply this expression to the Focus Distance property. It will look at the distance between the camera itself and its Point Of Interest, and use that distance as the focus distance. No matter how near or far they are, your interested layer is always sharp.

const cameraPosition = thisLayer.position;
const cameraPOI = thisLayer.pointOfInterest;

length(cameraPosition, cameraPOI);

aaaand cut!

These two tips can make working with Cameras in AE a little bit more accessible. As we all know, every little bit of speed and easiness adds up when on the clock.



Text plays a HUGE role in AE animation, so of course we can work with so much of it via expressions too!

The most useful commands here are only available as of AE 17.0 (released in January 2020), but they're great and well worth the update:

This article will take a look at:

Without further ado let's stop reading Text and start expressing it.



Within the main Text menu is the most unique button in alllll of Expressionland: a menu item that... doesn't give you any code! Instead, it lets you select a typeface (and weight), and it'll give you the internal name of it.

On its own, maybe not the most useful! But when paired with setFont(), you can actually change the font of your text layer itself right from an expression!

Here's this in use, on the Source Text property. Note that I selected 'Roboto Mono' and 'Medium' in the Font... menu:

const font = "RobotoMono-Medium";
const style = text.sourceText.createStyle();


text 2.png



We can use the text style property to get all of the font styling info from a text layer!

You can use this to get things such as the font, fill color, leading, font size, and so on from another layer— that's right, you can style one layer, and have it control the look of another layer.

This example will look at our layer 'Main Text' and inherit all formats of its style, just like that.

const otherLayer = thisComp.layer("Main Text");
const otherStyle =;


Now, on the surface this is pretty straightforward, but I use this simple technique a ton with toolkit projects. The users can adjust the text style and formatting in one place, and have it propagate to every text layer in the rest of the project.

Still Tracking?

This category is a newer addition to the expression repertoire, and so uses and features are actively being explored!

Some of the other items here let you get (and set) other font features such as tracking, leading, kerning, font size, font fill and stroke colors, and so on. There's a lot more to explore, now that you've had a taste!

Expression Session

If you're ready to dive into some radioactive goop and gain a new superpower, don't do that! It sounds dangerous. Instead, check out Expression Session!

Expression Session will teach you how to approach, write and implement expressions in After Effects. Over the course of 12 weeks, you'll go from rookie to seasoned coder.


Dive into real-time 3D with our Unreal Engine beginner's course by Jonathan Winbush. Master importing assets, world-building, animation, and cinematic sequences to create stunning 3D renders in no time! Perfect for motion designers ready to level up.

Explore this Course

Unlock the secrets of character design in this dynamic course! Explore shape language, anatomy rules, and motifs to craft animation-ready characters. Gain drawing tips, hacks, and Procreate mastery (or any drawing app). Ideal for artists seeking to elevate their craft.

Explore this Course

Elevate your freelance motion design career with our guide to client success. Master a repeatable method for finding, contacting, and landing clients. Learn to identify prospects, nurture leads, and develop a thriving freelance philosophy amidst chaos.

Explore this Course

Rev up your editing skills with After Effects! Learn to use it for everyday needs and craft dynamic templates (Mogrts) for smarter teamwork. You'll master creating animated graphics, removing unwanted elements, tracking graphics, and making customizable templates.

Explore this Course

Stand out with Demo Reel Dash! Learn to spotlight your best work and market your unique brand of magic. By the end, you'll have a brand new demo reel and a custom campaign to showcase yourself to an audience aligned with your career goals.

Explore this Course

Illuminate your 3D skills with Lights, Camera, Render! Dive deep into advanced Cinema 4D techniques with David Ariew. Master core cinematography skills, gain valuable assets, and learn tools and best practices to create stunning work that wows clients.

Explore this Course

Master After Effects at your own pace with Jake Bartlett's beginner course. Perfect for video editors, you'll learn to create stylish animated graphics, remove unwanted elements, and track graphics into shots. By the end, you'll be equipped for everyday AE needs and more.

Explore this Course

Revolutionize your Premiere workflow with customizable AE templates! Master creating dynamic Motion Graphics Templates (Mogrts) in After Effects to speed up your team's work. By the end, you'll craft easily-customizable templates for seamless use in Premiere Pro.

Explore this Course
Your download is in your inbox!!!
Check your email (spam, too) for the download link!
Please check the spam folder if you don't see the message within a minute or two. Google likes to hide your downloads, sometimes.
Oops! Something went wrong while submitting the form.

Not sure where to start?

If you’re a beginner, here are some great courses to help you get started:

After Effects Kickstart

Dive into the fundamentals of motion design with our most popular (and recently updated) After Effects course.


Photoshop + Illustrator Unleashed

Master the basics of Photoshop and Illustrator and gain invaluable insights in this introductory level course.


Design Kickstart

An introduction to the design principles behind all great work.


More Advanced?

If you’re a more advanced student looking to up your game, here are some great options:

Animation Bootcamp

Learn the art and principles of creating beautiful movements in Adobe After Effects.


Design Bootcamp

Learn to design for motion in this intermediate-level, project-based course.


Cinema 4D Basecamp

Learn Cinema 4D from the ground up in this exciting introductory C4D course.


Now is the time to learn the skills you need to advance in your motion design career: