background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "After Effects Expressions 202 - Time Expression"

input logo icon
Video tags
|

Video tags

adobe
after effects
tutorial
how to
animoplex
parker young
create
motion
graphics
software
website
expressions
course
time
syntax
attribute
using
applying
position
posterize time
stop motion
stutter
scripting
programming
learn
guide
walk through
class
javascript
action script
time remap
composition
multiplier
re-time
slow
fast
playhead
basics
lesson
intro
beginner
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:09
You've probably seen (or used) the time expression before.
00:00:13
A useful application of time is on a Rotation property, or a parameter like Evolution.
00:00:21
Time is a global attribute, and is simply represented by the word "time"
00:00:25
It outputs the current composition's elapsed time in seconds.
00:00:29
You can think of the time attribute like an engine - a steady output over time.
00:00:34
When you pair the time attribute with an operator, you can create steady, infinite animation.
00:00:42
What can we do with time?
00:00:44
Well, you can use the time engine to drive almost anything.
00:00:48
Let's start with the Rocket.
00:00:49
It's currently parented to the Rocket Null, which drives the Rotation.
00:00:53
You can attach the time attribute to the Z Rotation of the Rocket Null.
00:00:57
So, first, if you make Rotation visible by pressing "R" on your keyboard,
00:01:01
you can add a new expression to the Z Rotation property by "Alt (or Option) + Click" the stopwatch.
00:01:06
Now, all you have to do to add this expression is type the word "time"
00:01:10
Now, when you click outside of the expression field, it's gonna save your changes.
00:01:13
And if you quickly scrub the Timeline, you'll see that the Rocket changes
00:01:16
just slightly in value across 5 seconds.
00:01:20
This is because the time attribute increases the Rotation of the Rocket by 1
00:01:25
every second in time.
00:01:27
So, here I'm at 4 seconds in my composition, and the Z Rotation value is set to 4.
00:01:32
But this is pretty slow, so let's add an operator to speed things up.
00:01:36
If you click into the expression and after time, we're gonna add a multiplication operator
00:01:40
with an asterisk (*) and then you want to type the value 360.
00:01:44
So now if you click outside of the expression field, and RAM Preview the scene,
00:01:48
the Rocket goes much faster.
00:01:49
This is going 1 rotation per second.
00:01:53
So, if I come over to 4 seconds in composition time, you'll notice the value is 4 rotations
00:01:59
instead of 4 degrees.
00:02:00
But this is going pretty fast, so let's slow it down a bit.
00:02:03
Now, we know that the composition is 5 seconds in length, so you can use a simple
00:02:08
order of operations to slow this down.
00:02:10
So, if you add an open parenthesis before 360 and add a division operator,
00:02:14
which is a forward slash (/) and then add the value 5 with a close parenthesis.
00:02:19
So now, with the beauty of some simple math, we have a perfect Rotation around the Planet
00:02:24
every 5 seconds.
00:02:28
Now, you can apply this same expression to the Y Rotation of the Moon Null.
00:02:32
So, if you click into the expression and hit "Control + C" or "Command + C" on a Mac to copy,
00:02:37
come down to the Moon Null, open Rotation by hitting "R"
00:02:41
come down to the Y Rotation,
00:02:43
add a new expression by "Alt (or Option) + Click" the stopwatch,
00:02:46
and "Control + V" or "Command + V" on a Mac, to paste.
00:02:49
And now if you RAM Preview your scene, you'll see that the Moon and the Rocket both rotate
00:02:54
around the Planet every 5 seconds, so this creates a perfect loop.
00:03:02
So you might have also noticed that there's a Comet layer in this composition.
00:03:06
So I'm gonna hit "U" on my keyboard to collapse these.
00:03:08
So, you can offset the Position of this Comet to streak across the sky.
00:03:12
Instead of working with the Null, we're gonna work with the Comet layer.
00:03:15
So, if you open up Position by hitting "P" on your keyboard,
00:03:18
we're gonna separate the Position dimensions because we only want to work with the Y axis.
00:03:23
So, if you right-click Position and hit Separate Dimensions,
00:03:27
it's gonna give us X, Y, and Z as separate values.
00:03:30
So I'm gonna highlight Y Position and I'm gonna "Alt (or Option) + Click" the stopwatch
00:03:34
to add a new expression.
00:03:35
And if you type "value" it will act as a temporary reference to itself.
00:03:40
So, we wanna take its original Position, which is value, and then add time to it.
00:03:45
So I can do this with an addition operator, which is a plus (+)
00:03:48
and then I'm gonna use the attribute time,
00:03:50
and then really speed it up, by using a multiplication operator.
00:03:54
And then I'm gonna times this by negative 1000 so it goes really fast.
00:03:58
And now, if you preview your scene, you'll see the Comet streak across the sky.
00:04:02
This expression affects the Y axis and it steadily decreases its axis value by 1000 every second.
00:04:08
To show you what I mean, I'm gonna come over to 4 seconds in time
00:04:12
and you'll notice that the Y Position is now set to -4000 because of our expression here.
00:04:20
If you're a fan of stop motion, you're going to love the posterize time expression.
00:04:24
If you've ever used the Posterize Time effect in After Effects, the results are identical.
00:04:29
The difference is the ability to affect a single property instead of an entire layer's contents.
00:04:34
The Posterize Time method has three parts: the method name, posterizeTime with a capital t,
00:04:40
followed by one argument in parenthesis, which is the desired frames per second.
00:04:45
And you finish it off with value to serve as a callback function for the method to work properly.
00:04:53
So, if you select the Rocket Null layer and hit "R" on your keyboard to open Rotation,
00:04:57
and twirl down the Z Rotation property, we're going to go ahead and add
00:05:01
posterizeTime to the existing expression.
00:05:03
So, right before time, I'm gonna set my cursor and I'm gonna type posterizeTime
00:05:08
with a capital t, followed by an open parenthesis.
00:05:11
For this example, set a frames per second, I'm gonna use 3, followed by a close parenthesis.
00:05:17
And then add a semi-colon to end that phrase, and then a space to make it more legible.
00:05:22
So now, if you click away from the expression, nothing has changed yet.
00:05:25
And now if you RAM Preview the scene, you'll notice that everything moves smoothly,
00:05:29
except for the Rocket layer, which is interpolated at 3 frames per second.
00:05:36
Posterize time only updates the expression at the frequency you specify,
00:05:40
and it requires the value to be called back.
00:05:42
It will not work as a standalone global method, you'll have to use value, valueAtTime,
00:05:47
or something like a linear function to complete the expression.
00:05:50
In this case, we're using time.
00:05:56
You can find the time expression syntax in the Expression Language Menu under the Global category.
00:06:03
We've arrived at the end of Lesson 202: How to Use the Time Expression On A Property
00:06:12
If you enjoy this expressions course, consider purchasing the paid content.
00:06:15
It includes in-depth documentation, extra tutorial content, high definition videos,
00:06:20
and all the project files used in the training.
00:06:23
Your purchase will help to create more free courses like this in the future.

Description:

Get the Course Materials: https://animoplex.gumroad.com/l/animoplex-expressions World of Expressions - Full Playlist: https://www.youtube.com/playlist?list=PLvr5U5ZSt6IzHyvSL9fo0M9NRPsTvra31 0:00 - Intro 0:17 - Time Syntax 0:39 - Using the Time Attribute 2:59 - Applying Time to Position 4:17 - Posterize Time Syntax 4:51 - Using Posterize Time 5:53 - Lesson 202 Wrap Up View Course: https://www.animoplex.com/learn/expressions.html If you enjoy this expressions course, consider purchasing the paid content! It includes in-depth documentation, extra tutorial content, high definition video files, and project files used in the training. Your purchase will fund the release of this free course online for everyone to enjoy. Your support is greatly appreciated, and you’re helping to build more free courses like this in the future! For additional questions and help, reporting issues, or to share examples of how you used the World of Expressions tutorials, please email [email protected] or post in the comments below.

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "After Effects Expressions 202 - Time Expression" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "After Effects Expressions 202 - Time Expression" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "After Effects Expressions 202 - Time Expression" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "After Effects Expressions 202 - Time Expression" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "After Effects Expressions 202 - Time Expression"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "After Effects Expressions 202 - Time Expression"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.