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!
Preview
RSS readers: click post title to view preview video at Aetuts+.
Download Preview .flv
File size 0.7MBTutorial
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.

Plus Members
Source Files, Bonus Tutorials and
More for $9 a month for all Tuts+
sites in one subscription.















User Comments
( ADD YOURS )Daniel November 23rd
Sweet!
( )Devin Rajaram November 23rd
Nice tip you have here, thanks so much
( )freed November 23rd
cheers m8
( )tot pal November 23rd
what i need thank you very muuuch
( )IANH - BR November 23rd
Great work, thank you!
( )rich November 23rd
Can you share this effect?
Do you need to re-import it every time you start AE?
( )rich November 23rd
Is the custom effect only in this project?
Can you copy & paste?
( )Momcilo Stojkovic November 23rd
Do you mean Energy Ball custom effect?
No you don’t need to re-import every time, just save it under presets and it will be in you Effects and Presets tab.
rich November 23rd
So you share thru exporting as a preset?
Momcilo Stojkovic November 23rd
yes as a Animation Preset.
Ben McEwan November 23rd
Perfect! Exactly what I’ve been looking for for the past couple of months!!
( )Momcilo Stojkovic November 23rd
Tnx Ben, it means a lot to hear that from you
( )Jorrit Schulte November 23rd
So Here’s a list of all the controlls:
NameHere = own name NO Spaces
Name Here = own name with Spaces
# = own Number
t/f = true OR false
Controls Here = place Controls
Slider:
Optional for Slider (Before />):
DISPLAY_PIXEL=”true”
DISPLAY_PERCENT=”true”
precision=”#” (Digits after comma)
Angle:
point:
Center Pont:
Checkbox:
Color:
Layer:
Optional All But Layer:
CANNOT_TIME_VARY=”true”
Groups:
Controls Here
( )Jorrit Schulte November 23rd
ow, i see it doesn’t work… sorry guys, but you can download it here if you’d like
( )http://hetrixload.com/files/k1m8ulk4/Custom_Effect_Codes.txt.html
David W. November 25th
Thanks for that Jorrit!
Ryan Gibson November 23rd
any idea where the supports files on a mac are located? Thanks!
( )Rob Fab December 1st
Default location of the PresetEffects.xml file on Mac:
( )/Applications/Adobe After Effects CS3/ (Show Package Contents) /Resources/PresetEffects.xml
Rob Fab December 1st
I found this link helpful.
http://maltaannon.com/what-customeffects-are/
Attila November 23rd
hey, thats awesome! thanks:))
( )Remington M November 23rd
Is there a reason why you built it outside of After Effects, instead of inside? I don’t have any experience building effects, but couldn’t you just add the controls inside of After Effects and then save it as a preset?
( )Actually, I guess you couldn’t do the color. Anyways, cool idea for a tutorial, I was wanting to make a custom effect a while ago….
Remington M November 23rd
Haha, of course I read through the tutorial without looking at the preview video first. Nevermind! I see the difference between coding it outside, and adding them inside of After Effects. Its a shame you can’t do it inside of After Effects, I’m sure it would save a lot of time. Maybe in CS5
( )the ae man November 23rd
Great tutorial! But I have a problem with the german After Effects. In the Script Editor I wrote it exactly like you did but it doesn’t work. I try to translate. something like this: You can’t add a property with the name “here stand the name of my effect” to this PropertyGroup.
( )Would be great if you can help me.
wobagi November 23rd
It’s nice and it looks better, but it won’t work on other machines unless you go through the same procedure for every computer you want to share the effect with. So it’s better to build effects with Expression controls and wait for Adobe to introduce some better way to make custom effects.
( )Momcilo Stojkovic November 23rd
Actually it will work on other machines but instead of “Energy Ball” it will be “Missing: Energy Ball” but the custom effect will work.
( )Youssef Sarhan November 23rd
Thanks a million, I really wanted to know how to do this.
This is a top tutorial! Nice job guys!
( )Matthieu Dufour November 23rd
Wow! awsome.
one of the best AE article ever.
gratz.
( )Momcilo Stojkovic November 24th
Thanks for all the positive feedback!
( )Jack Daniel Jenkins November 26th
I’ve got a problem with the custom script. I copied everything exactly and when I run the script I get this: “You can not add a property with the name “vinetter” to this PropertyGroup.” Think you can help? Thanks.
( )Venkatesh November 24th
Thanks a lot. I never expect that we can create FX via After Effects itself.
( )Richard Williams November 24th
Hmmm… beyond custom naming conventions for the effect and it’s controllers, you still have to apply other effects and link them to controllers to make it all work. Not seeing how awesome and revolutionary this all is just yet. Will have to play around with it a bit more…
( )Moritz November 24th
Helpfull tutorial but it don’t work in my After Effects CS4 version. I’ve got a problem with the custom script. Like I wrote before there stands something like this: You can’t add a property with the name “here stand the name of my effect” to this PropertyGroup. Can anyone help me? Thank you.
( )Remington M November 25th
I’m having the exact same problem. I followed the tut exactly but I’m getting that error as well, when I try to import the effect.
( )Jack Daniel Jenkins November 25th
Same issue here. It’d be awfully nice if we could get a reply as to why it might not work. Thanks.
( )Jack Daniel Jenkins November 25th
Figured it out fellas. Once you’ve written your effect you have to close everything and restart before even starting in on your script editor. This worked for me anyway. Best of luck.
( )Moritz November 25th
Thank you for this solution but sadly in my case it didn’t work. Maybe it’s because i’ve got After Effects the German version?
Remington M November 25th
Oh yeah, worked for me. Thanks!
Jack Daniel Jenkins November 26th
I’m sorry, it seems it only worked one time for me, but I can’t do it again so I’m going to say the script editor is pretty buggy. Still waiting for a good solution from the author of this tutorial. I’m running CS3 on a Mac, what about anyone else with this same problem?
Moritz November 26th
I’m running CS4 on Windows in German. Maybe thats the problem?
Jack Daniel Jenkins December 3rd
It could be, I wouldn’t know about any translation issues myself. I recommend using one of the already made effects in the PresetEffects.xml file as a template instead of making it completely from scratch, just to make certain you don’t mess up any code. I tried this and to make an effect with about 6 sliders and 3 color pickers and it worked fine.
jordy November 25th
Pretty cool tutorial. Not alot of stuff that I’ve seen on code out there. So thanks for this one. 2 Thumbs up.
( )Rachl December 7th
Cool tutorial but I can’t get the script to run. I get an error message when I click the run button in the script editor in AE. It says “undefined is not an object”
( )Any Help?
Ben McEwan December 10th
I had that same issue to begin with. Check that you’re not missing a space in the “PresetEffects.xml”, and that you have a matchname (lowercase) and the effect’s name filled in.
( )Le Dinh Thi December 16th
Change “ExtendScript Toolkit CS4″ or any same one to “After Effects CS4″ in the upper combo box (beside the green “link” icon”).
(Sorry for my bad English)
( )Le Dinh Thi December 16th
In the “PresetEffects.xml”, there is a control type defined called “Popup” where you could define preset string variables to be selected, but it doesn’t seem to be used in any of Adobe’s owen pseudo-effects.
I tried to implement it but got syntax wrong.
I think it’s very useful !
Any help ?
( )H-nitro January 2nd
bravo, nisam programer ali ovo je dobra fora…
( )