Publishing System Settings Logout Login Register
Ghost type: Learn the basics of expressions
TutorialCommentsThe AuthorReport Tutorial
Tutorial Avatar
Rating
Add to Favorites
Posted on July 22nd, 2005
17444 views
Adobe After Effects
Today I'm going to show you how to create some random moving type "ghost look-a-like".

We are going to create this effect without any use of keyframes just with Expressions.
Before we go to work, here an explanation about Expressions ;)

What are Expressions?
An expression is a statement that produces values for a specific parameter. The simplest expression would be just a number:

6;

Obviously, this kind of expression isn�t very useful � you�d be much better off just setting the parameter to 6 directly. A slightly more useful expression would be something like:

rotation;

When evaluated, this statement will return the value of rotation for the current layer at the current time. This return value, or result, will then be used for whatever parameter the expression is attached to. If applied to a layer�s opacity parameter, this expression would make the layer�s opacity change in sync with its rotation: when the rotation was 30 degrees, the opacity would be set to 30%, etc..

Expressions use the JavaScript language and syntax (an industry-standard language commonly used for web development, and for which there are many helpful books). Javascript includes a rich set of tools for creating more complex expressions, including, of course, the basic math operations:

opacity*10;

This expression is slightly more sophisticated, but still very simple. Its result is the value of opacity for the current layer at the current time, multiplied by ten. Since opacity has a range of zero to 100, the results of this expression will range from zero to 1,000. These results will be used for whatever parameter to which you've applied the expression.
If you want to go deeper into expressions, have a visit HERE

After so much theory let's move to the fun part, let's create something cool.

- As always let start with a new composition (320x240) and 6secs of length

- Using the Horizontal type tool type something in ( I've used twodded), ensure that your type is white, this will improove the effect later on.
You can also use other colors, but I think for the beginning is white a good choice.

Here's what you should have now
Step 1

- As a next step let's create a new composition with the same settings, to make things easier just drag the fist made composition to the "new comp" button.

- Apply to the nested compostion the Fast Blur Effect. You can find it under
Effect -> Blur & Sharpen -> Fast Blur Leave the settings as they are for now.

- Next step is to duplicate this layer twice, so that we have at the end 3 layers. To make things a little bit more organized, rename the layers to "1 wiggle" "2 wiggle" and "3 wiggle" without the parenteses starting from the bottom.
Here a little screenshot as a helping hand ;)

Step 2

Do you have it? Cool, then let's start handling those Expressions.

Click the bottom layer "1 wiggler" and press "P" to open the position paremeters now press ALT and click on the small stopwatch to create an expression.
After Effects just created an expression field for you in the timeline, now just put this code in it and press Enter on the numeric keypad to accept the expression.position.wiggle(2,30,1) Explanation:"The Wiggle Expression needs 3 parameter to make it work. the first one "2" is the frequency of the effect, "30" is the variation of the effect and "1" is when in time the effect should work."
Step 3


Are you keen to see how it does look like? Then just press "0" on the numeric keypad to generate a RAM preview. :)


Let's go on with the second layer "2 wiggle".
Create following expression on the position parameter
this_comp.layer(\"1 wiggle\").position.value_at_time(time-1)
Explanation: "With this expression we are just telling that AE should take the settings from the layer "1 wiggle" and do the same, but just 1 second behind"
Step 4


Ok, moving on to the last layer"3 wiggle".
Create again a new expression on the position parameter
mul(.5, add(this_comp.layer(\"1 wiggle\").position,this_comp.layer(\"2 wiggle\").position))
Explanation: "The values of the first 2 layers have been taken and multiplied by .5, that causes a completely different movement"

Do again a RAM preview, cool ah.. :D

Do you remember the FastBlur effect? Why did we put that in? Now it's time for that.

- Go to the middle layer and create an expression on the FastBlur parameter "Blurriness"
random(2,25)
Explanation:"We are just telling AE that he should randomize the parameter between 2 and 25." easy or not?! :)

- Now just repeat the last step on the bottom layer, but this time use 4 and 8.

Hey you are done..

Make a RAM preview, and check out your cool new animation, and have you noticed that we didn't create one single keyframe?? :)
Finished

You can download my finished movie HERE

Still any questions? Then just drop me a message
Premium Publisher
Dig this tutorial?
Thank the author by sending him a few P2L credits!

Send
funkysoul

This author is too busy writing tutorials instead of writing a personal profile!
View Full Profile Add as Friend Send PM
Pixel2Life Home Advanced Search Search Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Pixel2life Homepage Submit a Tutorial Publish a Tutorial Join our Forums P2L Marketplace Advertise on P2L P2L Website Hosting Help and FAQ Topsites Link Exchange P2L RSS Feeds P2L Sitemap Contact Us Privacy Statement Legal P2L Facebook Fanpage Follow us on Twitter P2L Studios Portal P2L Website Hosting Back to Top