Video icon 64
Want to learn graphic design? Start your free trial today.
Advertisement

Create Your Own Custom Effects!

by
Student iconAre you a student? Get a yearly Tuts+ subscription for $45 →

For those looking for something a little more advanced and useful. Here it is! Momcilo takes us step by step into Creating Your Own Custom Effects. You don't have to wait for "somebody to come out with it..." Now YOU can!

Republished Tutorial

Every few weeks, we revisit some of our reader's favorite posts from throughout the history of the site. This tutorial was first published in November of 2009.

Tutorial


Step 1

There is no Adobe program for creating effects within AE. The only way is to go inside the code of program and tweak it.
First we need to find PresetEffects.xml file.
On PC it is located in:

%SystemRoot%/Program Files/Adobe/Adobe After Effects CS4/Support Files/PresetEffects.xml


Step 2

This file is by default set to Read Only, we need to change that.
Right Click on the file, choose Properties and under General tab and set Read Only to false, click apply.


Step 3

You must have privileges to modify this file, go to Security tab and click Edit button.
Select Users click on checkbox to allow Full Control.


Step 4

When you work with system files we always must make back up copy if we crash something.
Copy the file and call it PresetEffects.xml.old


Step 5

Open the file using Notepad or any other text editor.
Go to the end of document and make some free space before the last line.


Step 6

Each effect has "Matchname" and "Name". Matchname is a programing name that Adobe will use for expressions, and it can’t have BLANK characters.
Name is, well, your effect name that will be displayed.
Let’s start typing the effect, write the following.


Step 7

After Effects has 6 expression controls:

Point, Angle, Slider, Layer, Checkbox and Color.

Every control has matchname and name just like effect itself, but controls have default values.
To add point type the text highlighted on image, as you can see it has 2 default values, X position and Y position.


Step 8

To add Angle control, type the highlighted text on image.
This controls has only one default value, and that is value in degrees.


Step 9

To add slider to your effect, type the highlighted text on image.
This control has a lot of parameters, first one is default value of slider
Value Min and Value Max represent the limits of slide.
Slider Min and Slider Max are visual limits of slider.
Example: Your slider can slide from 0 to 100 but if you type value you can can go over 100 to the Valid max


Step 10

To add layer control type the highlighted text on image.
Layer has only one default value, default_self.
That can be set on true or false.

It depends on if you want it to select itself by default or not.


Step 11

To add checkbox on your effect, type highlighted text on image. Also one default value, true or false, checked or not checked.


Step 12

To add color picker, control type highlighted text on image.
Every color has "RGB" values (Red, Green and Blue), and those 3 are default values.


Step 13

One more line, we need to close the effect.
Type the highlighted text to close the effect.


Step 14

Now save PresetEffects.xml file and if it asks, replace the file.


Step 15

Open up After Effects.

Make a new composition, any settings.

Make a new solid, or null object, anything you want.


Step 16

Next we need to import our effect.

If you try searching in Effects palette you will see that doesn’t appear.

We need to make a script that will read PresetEffects.xml file and import our effect.

Open Script Editor, File->Scripts->Open Script Editor


Step 17

Ok here is the script, it will add our effect to first layer in active comp.

Replace "Match Name" with our effect matchname and "Display Effect Name" with our effect name.


Step 18

Once you have replaced text for "Matchname" and "Name", click green arrow to run the script.


Step 19

Go back to After Effects, select your first layer and there you go! Your first custom effect.

Remember, if you want more than one point control, just add one more line of code, and do the same for other controls.


Step 20

I hope you liked this tutorial and now go create some super custom effects!

Here is an example of my custom effect Energy Ball.

Advertisement