Как открыть expression after effects

Обновлено: 05.07.2024

Использование горячих клавиш - это неотъемлемая часть работы в After Effects. Горячие клавиши значительно упрощают жизнь и повышают скорость работы. Не секрет, что в программе After Effects довольно-таки много горячих клавиш. Возникает вопрос: какие именно клавиши использовать в ходе работы?

Ниже я привожу список горячих клавиш, которые в своей работе использую я (Артем Лукьянов). Необязательно использовать все из них. Выберите и запомните для начала несколько сочетаний клавиш, обозначающих самые распространенные операции в вашей работе. Я уверен, что они сэкономят Вам кучу времени и работать в AE станет чуть приятней!

Основные:
Ctrl+Alt+N - Создание нового проекта
Ctrl+N - Создание новой композиции
Ctrl+K - Переход к окну с настройками композиции
Shift+F3 - Переход в Graph Editor
Ctrl+Y - Создание сплошного слоя
Ctrl+Alt+Shift+T - Создание текстового слоя
Ctrl+Alt+Shift+L - Создание источника света
Ctrl+Alt+Shift+C - Создание камеры
Ctrl+Alt+Shift+Y - Создание нуль объекта
Ctrl+Alt+Y - Создание корректирующего слоя
F3 - Переход к панели Effect Controls
Пробел - Воспроизведение композиции
Нуль на цифровой клавиатуре - Воспроизведение композиции со звуком
Ctrl+Z - Отмена действия
Ctrl+Shift+Z - Повтор действия
Ctrl+S - Сохранение проекта
Ctrl+M - Отправка композиции в очередь вывода

Инструменты:
V - Selection Tool
H - Hand Tool
Z - Zoom Tool
W - Rotation Tool
C - Camera Tools
Y - Pan Behind Tool
Q - Shape Tools
G - Pen Tool
Ctrl+T - Type Tools
Ctrl+B - Brush Tool, Clone Stamp Tool, Eraser Tool
Ctrl+P - Puppet Pin Tool

Работа со слоями:
A - свойство Anchor Point
P - Свойство Position
S - свойство Scale
R - свойство Rotation
T - свойство Opacity
L - свойство Audio Levels
M - отобразить маски
E - отобразить эффекты
EE - отобразить выражения
AA - отобразить свойства из вкладки Material Options
U - отобразить свойства с ключевыми кадрами
UU - отобразить свойства, которые были изменены
Ctrl+D - создать дубликат слоя
Alt+[, Alt+] - обрезание длины слоя
Enter - переименование слоя

Работа с ключевыми кадрами:
J, K - переход к предыдущему, следующему ключевому кадру
F9 - Easy Ease
Shift+F9 - Easy Ease In
Ctrl+Shift+F9 - Easy Ease Out

Навигация по времени:
Home, End - перемещение к первому, последнему кадру композиции
Ctrl+стрелка влево, Ctrl+стрелка вправо - перемещение на один кадр назад, вперед
Shift+Ctrl+стрелка влево, Shift+Ctrl+стрелка вправо - перемещение на десять кадров назад, вперед
B, N - выставление начальной, конечной границ рабочей области

Выражения — это своего рода команда для определенного свойства, написанная на языке JavaScript. Эта команда задает значение свойству для которого она написана.

Откроем композицию «Квадраты» из прошлых статей. Выполним предварительный просмотр чтобы вспомнить как она выглядит. На протяжении первых двух секунд квадраты вращаются, а так же увеличивается масштаб. Отобразим свойство Rotation для синего и красного квадратов. Для этого выделим слои Red и Blue и нажмем клавишу на клавиатуре.

Выражения в After Effects

Выделим свойство Rotation красного квадрата и выполним команду меню Animation->Add Expression. Под свойством у нас появилась новая строка Expression:Rotation. Это и есть выражение для свойства Rotation слоя Red solid. А значение свойства отображается красным цветом. это говорит о том, что сейчас это значение не активно.

Выражения в After Effects

Значение этого свойства теперь будет определяться командой записанной в правой части панели Timeline в строке Expression. Сейчас она имеет вид «transform.rotation».

Выражения в After Effects

Это означает что значение свойству Rotation будет равно значению свойства Rotation из группы Transform. Сейчас команда ничего не изменяет, так как значение равно самому себе. Но мы можем изменить команду. Проще всего это сделать при помощи пиктограммы Pickwhip. Для этого зажимаем пиктограмму и перетаскиваем ее на название нужного свойства, а именно Rotation слоя Blue.

Выражения в After Effects

Наша команда приняла следующий вид: «thisComp.layer(„Blue Solid 1“).transform.rotation». По сути здесь указан путь откуда взять значение свойства. Этот путь выглядит следующим образом: «эта композиция\слой Blue Solid 1\группа свойств трансформации\свойство вращения». Обратите внимание, что названия «мест» разделены точками. Теперь значение вращения слоя Red будет всегда совпадать со значением вращения слоя Blue. Мы можем подкорректировать значение дописав в конце выражения например «*2». Для этого щелкните левой кнопкой мыши по тексту выражения. Весь текст будет выделен. Снимите выделение щелкнув мышью в конце текста. далее вводим нужные символы и нажимаем клавишу Enter на цифровом блоке клавиатуры. При нажатии на привычную клавишу Enter, как и в случае с текстовыми слоями, будет создана новая строка. Так же для активизации выражения можно просто щелкнуть мышкой в пустой части панели Timeline.

Выражения в After Effects

Таким образом значение свойства будет постоянно умножаться на 2. Таким образом можно использовать знаки сложения(+),вычетания(-), деления(/) и умножения(*). С одномерными свойствами понятно, но что делать если мы используем двумерные свойства, такие как Position или Anchor Point. Отобразим свойство Scale слоя Red. Выдели его и нажмем комбинацию. Попробуем перетянуть на это свойство пиктограмму Pickwhip нашего выражения. В конце выражения появился набор [0]. Это значит будет использоваться значение X.

Выражения в After Effects

Если поменять [0] на [1], то будет использоваться значение Y. Для трехмерных слоев можно использовать и значение по оси Z, обозначается набором [2].
Чтобы написать выражение для двумерных свойств нам придется вводить две команды в квадратных скобках, для оси X и для оси Y. [X,Y]
Прежнее выражение можно отключить. Для этого нажмем кнопку Enable Expression.

Выражения в After Effects

Кнопка примет вид

Выражения в After Effects

, а значение свойства вновь будет отображаться оранжевым цветом.
Создадим новое выражение для свойства Scale слоя Red. Для этого удерживая клавишу Alt щелкнем по значку секундомера данного свойства.

Выражения в After Effects

Перетащим пиктограмму Pickwhip на свойство Rotation того же слоя. Увеличим высоту отображения текста выражения и посмотрим результат.

Всем привет! В этой статье я хочу поговорить с Вами о 5 простых, но тем не менее очень полезных выражениях. Эти выражения я использую чуть ли не в каждом втором проекте и они существенно облегчают мою жизнь.

1) Итак, первое из них - это loopOut(). Простенькое выражение для зацикливания анимации. Допустим, у нас есть бабочка, собранная из трех частей: левое крыло, правое и тело.

5 простых выражений для After Effects

И нам необходимо сделать так, чтобы крылья без остановки вращались вокруг оси Y, создавая тем самым эффект реалстичных махов крыльями. Но представляете, сколько ключевых кадров нам нужно поставить, чтобы анимировать крыло на протяжении маленькой пятисекундной композиции. По моим подсчётам около 60! И, чтобы не возиться с этим огромным количеством ключевых кадров, разработчики программы придумали одно простое выражение - loopOut.

Поэтому, мы находим параметр Rotation Y и слева от него кликаем по значку с секундомером. После чего, в начале композиции появится ключевй кадр, измените значение параметра для этого ключа на -80. После этого мы переходим на 4 кадра вперед и изменяем значение параметра Rotation Y на 80. Затем ещё 4 кадра вперед и меняем значение параметра обратно на -80. Таким образом мы получили 3 ключевых кадра.

5 простых выражений для After Effects

После этого мы зажимаем клавишу Alt и кликаем ещё раз по значку с секундомером. Появится текстовая область для выражения. В ней мы пишем loopOut().

5 простых выражений для After Effects

Всё, теперь наша анимация продолжается до самого конца композиции без всяких ключевых кадров.

2) Ок, правое крыло мы анимировали. Теперь займемся левым. Не будем повторятся, и левое крыло анимируем немного другим способом. Все Вы, наверно, ещё со школьной скамьи помните замечательную математическую функцию синус. Так давайте воспльзуемся ею и здесь. Делаем Alt+клик по значку с секундомером слева от параметра Rotation Y левого крыла. В появившемся окне пишем Math.sin(time).

5 простых выражений для After Effects

Крыло перемещается, но совсем незаметно. Попробуем увеличить частоту вращения, для этого в скобках time умножим на 15.

5 простых выражений для After Effects

Отлично частоту мы увеличили, но, как Вы помните, значения синуса находятся в диапазоне от -1 до 1. Поэтому и амплитуда вращения крыла у нас такая маленькая. Чтобы увеличить её умножим всё это выражение на 80.

5 простых выражений для After Effects

В итоге получим: 80*Math.sin(time*15). Можно, конечно, немного увеличить частоту, но это уже на Ваше усмотрение.

3) Wiggle. Наверно, самое используемое выражение в среде After Effects, и всё-таки не все знают для чего оно предназначено. Wiggle отвечает за хаотичные перемещения. Вообще функция wiggle имеет целых пять аргументов, но в основном используются только два. Первое - это частота, второе - амплитуда колебаний. Рассмотрим на примере. Я анимировал положение бабочки, теперь она перемещается из левого нижнего в правый верхний угол.

5 простых выражений для After Effects

Движение ожидаемо смотрится линейно и неправдоподобно. Если мы хотим сохранить направление движения, но при этом добавить немного органичности, то нам не обойтись без wiggle. Итак, делаем Alt+клик на значке с секундомером слева от параметра Position и в текстовой области вбиваем wiggle(3,400). Смотрим и видим, что полёт бабочки стал более реалистичным. Что же означает написанное выражение wiggle(3,400). А означает оно то, что три раза в секунду с амплитудой в 400 пикселей в любом направлении будут происходить случайные колебания. Самое интересное это то, что wiggle можно применить практически к любому параметру в AE.

4) Данный пункт является не столько выражением, сколько очень интересным приёмом при работе с wiggle. Многие меня спрашивают, как можно изменять настройки функции wiggle с течением времени, или по-другому, как анимировать один из аргументов функции wiggle. Очень просто! - отвечу я Вам. Создаём нуль-объект. Затем идём Effect => Expression Controls => Slider Control. Пускай у нас будет изменятся амплитуда. Переходим к выражению, которое мы создали в предыдущем пункте. Выделяем амплитуду,

5 простых выражений для After Effects

берём pickwip и тянем его до параметра Slider нуль-объекта.

5 простых выражений для After Effects

Вот такое выражение мы получим в итоге:

5 простых выражений для After Effects

Теперь Вы можете с легкостью анимировать значение параметра Slider и таким же образом будет менятся амплитуда.

5) И последнее о чем я хотел Вам сегодня поведать - это наипростейшее выражение с управляющей переменной time. Вы, наверное, не раз сталкивались с такими выражениями. На пример, у нас есть какой-нибудь сплошной слой, мы применяем к нему эффект Fractal Noise и, чтобы данный эффект не был статичным нам нужно анимировать параметр Evolution.

5 простых выражений для After Effects

Да, можно поставить 2 ключевых кадра в начале и в конце композиции, но есть и другой путь. Делаем Alt+клик по значку с секундомером слева от параметра Evolution и пишем time. Теперь, если мы перемести индикатор текущего времени в позицию одной секунды, то значение параметра Evolution будет равнятся одному градусу. 1 секунда = 1 градус - всё очень просто!

5 простых выражений для After Effects

Если нам нужно ускорить анимацию, допустим в пять раз, то мы пишем time*5.

An overview of expressions and relevant examples you can use in your next project


Expressions are a smart addition to any workflow or project. These snippets of code can reduce keyframes and layers on the timeline, convert values for animation flexibility, and condense multiple properties to a single control. They give artists the ability to affect values with math operations and create dynamic animation controls, but you don’t have to be a programmer to use them.

Imagine being able to edit thousands of shape layer fills and color properties across your project with a single control; or arranging hundreds of layers in a perfect grid and then updating (or even animating) the grid spacing with a quick value change. All possible with a bit of code like this:

In this post, we’ll take a look at the basics, apply an expression to a property, dive into four of my favorite one-line examples, and learn how to use them in your own projects. And if you’d rather watch video lessons, check out The World of Expressions training course for free on Animoplex. I encourage you to try expressions in your next project, even if you aren’t quite comfortable with writing code yet. Your workflow will thank you!

Expressions are snippets of code that manipulate property values in your project. In Adobe’s own words:

“An expression is a little piece of software — much like a script — that evaluates to a single value for a single layer property at a specific point in time.”

These code snippets can link values across layers, compositions, time, and even spatial dimensions. This is useful when linking one property value to another. You’re writing instructions to copy — and remain linked to — the source, so that all linked values update at once. Another benefit is swapping keyframes for expressions, which generates easily-configurable values at pinpoint accuracy. This is most notable with expressions like wiggle or loop; increasing the intensity or changing the loop duration is a quick number swap instead of copying, pasting, and removing keyframes.

Alt + Click (Windows) or Option + Click (Mac) the stopwatch to add an expression

Any property that is keyframe-able can use an expression. To add or remove an expression, reveal the property in the Timeline and Alt + Click (Windows) or Option + Click (Mac) the stopwatch icon. When activated, options appear under the property and the value turns red. You can temporarily enable and disable an expression by toggling the equal sign (=) on and off.

The expression field is where you write the expression, and it’s the text field on the timeline directly next to the expressed property. It works just like any text field; copy, paste, select, or click and drag text. Pressing enter creates a new line, and you can resize the height.

Drag and drop the Pick Whip to generate syntax for another property

The “Pick Whip” is the drag-and-drop selection tool for linking in After Effects. Click and hold the spiral icon next to the expression to enter selection mode. A whip links to your cursor as you drag to another property. Releasing your click targets the property underneath, generating expression syntax automatically. This is a great way to learn expression syntax, let After Effects do all the work for you!

To unlock the magic of expressions, we need to understand how code affects a property value. Next, we’ll cover a few expressions that are easy to write and can be used creatively in many different situations.

If you’ve used After Effects, you’re probably no stranger to the wiggle effect. For those who have not used wiggle, it’s a great way to generate random and infinite movement. It can be applied using the Wiggler panel in the After Effects interface, but this process generates a lot of keyframes. The leaner method uses an expression, and is written with one line of code which results in clean motion and requires no keyframes.

To create a wiggle effect, enable an expression on a property and start with the word wiggle in the expression field. You’ll need to know two important numbers: the wiggles per second (frequency) and the max amount of wiggle (amplitude) desired. Those numbers are then placed inside a set of parentheses; the first number is frequency and the second number is amplitude. Here’s an example for the position property:

Wiggling 2 times per second with a maximum of 20 value change

In addition to frequency and amplitude, advanced parameters can provide more control. These are optional third and fourth parameters that can be added inside the parentheses; the third is noise detail (octaves) and the fourth is amplitude multiplier. You can create a realistic steadicam wiggle effect on a camera’s position by combining all four parameters like this:

Wiggling 1 time per second, max of 10 pixels, with 2 octaves and .25 intensity

When it comes to automating trivial tasks like random values, After Effects has a solution — use expressions!

Time is the backbone of After Effects, and there’s a lot of potential unlocked when you mix time with expressions. A useful application for time-based animation is on Rotation or Fractal Noise. For constant motion, typically you’d add a keyframe on the first and last frames of the animation, then calculate the start and end values based on the desired speed. With expressions, simply multiply time by the value increase per second, and code does the rest.

To reference the current time in seconds, type the word time in the expression field. Pairing time with a math operation produces infinite animation, written like this:

Infinite animation rotating 90 degrees per second in time

You can alter the frames per second of a single property using the posterizeTime expression. This is possible without pre-comps or changing the composition frames per second. The posterizeTime expression creates a stop-motion effect on the property’s final output. The number placed in parentheses sets the desired frames per second, and the expression requires a reference to the output. In most cases, you can use value like this:

Position playing back at 3 frames per second versus 15 fps in the same composition

You can think of time like an engine — a duration of steady output. Using time as a tool for animation is a smart way to work!

One the most useful expressions is the value attribute. It represents the property value at the current time, including the keyframed value. You can manipulate value with math operators and JavaScript methods, allowing systematic changes to the base property. Without value, many expressions would be difficult to implement. For value changes to a keyframed property, you’d need to edit every single keyframe every time you make a change. Value expressions allow you to add or remove numbers to existing keyframes, or even separate dimensions and affect a single axis.

To reference the current property, just add the word value in the expression. In this example, the property value (including keyframes) is divided by 2 across the entire timeline:

Animation using original values vs the same animation divided by 4

Another variation is the valueAtTime expression. It’s used just like value except for one difference; the value is not locked to the composition’s current time. You can use this to create delays across multiple properties and layers. Start with valueAtTime followed by a set of parentheses. Next, specify the time you want to evaluate, in seconds. This example replicates the scale value of the previous layer on a 1 second delay:

Animated scale values with a delay of 1 second from the previous layer

Value is extremely versatile and is the best way to build relative expressions that utilize existing values and keyframes.

The linear and ease expressions are useful for converting values, perfect for Slider Controls and connecting numbers of different types. You’re essentially taking a range of inputs and scaling them to a new set of outputs. This is near-impossible to do with a keyframe-only approach, and it demonstrates the power of dynamic values with expressions.

It starts with the word linear or ease and the input being converted is the first parameter inside the parentheses. The input min and max ranges are the 2nd and 3rd parameters, which then get mapped to the 4th and 5th parameters as the output range. This example uses ease to convert a rotation input to an opacity and scale output, simulating a dimmer switch:

Layer opacity and scale changes from 100 to 0 as the dial layer rotates from 0 to 360

An advanced example of the linear expression uses it to combine two outputs and fade between them. This is achieved by mapping an input to control the fade from one expression to the other. Start by linking a Slider Control to a variable, s in this example. Next, add two expressions as variables to fade between a and b . Finally, add a linear expression to map the input and output, crossfading between both expressions as the Slider Control animates. In this example, the expression fades from the keyframed position to a wiggle expression:

Two expressions fading back and fourth using a Slider Control

As a bonus, linear can be paired with time to create auto-fading expressions based on layer in and out points. Very handy for editing!


For those interested in learning more about After Effects expressions, I’ve provided a free 5 hour expressions course on Animoplex. It’s called The World of Expressions and is geared towards artists of all skill levels, designed as a visual programming course created for animators:

Animoplex - The World of Expressions Course

Master your programming skills with the World of Expressions. Push your creativity to new limits with AE JavaScript.

The course starts with an introduction and tour of the expression interface, followed by a casual walk through of the expressions found in this post. You’ll then practice some intermediate expressions, working with different types of data and how to leverage property values in interesting ways. Advanced concepts are next and cover useful workflows and expert-level tips and tricks. Finally, the JavaScript series focuses on the core of expressions, programming syntax and the fundamentals of how expressions are written.

To access the project files and offline lesson videos, you can purchase the optional course materials for $10 USD on Gumroad. This helps support future course development, including an upcoming UX Rigging course!

This is my first post to Medium, it’s been a fun process condensing everything to a short format write-up for a general audience. If you’d like to see more of this, clap or comment below to let me know. If there’s an interest, I’ll turn this into a series. Thanks for reading!

Читайте также: