Create Your Own Custom Effects!

Final Product What You'll Be Creating

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!

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.

Momcilo Stojkovic is Mocarg on Videohive
Add Comment

Discussion 54 Comments

  1. Devin Rajaram says:

    Nice tip you have here, thanks so much

  2. tot pal says:

    what i need thank you very muuuch

  3. IANH - BR says:

    Great work, thank you!

  4. rich says:

    Can you share this effect?

    Do you need to re-import it every time you start AE?

  5. Ben McEwan says:

    Perfect! Exactly what I’ve been looking for for the past couple of months!!

  6. Jorrit Schulte says:

    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

  7. Ryan Gibson says:

    any idea where the supports files on a mac are located? Thanks!

  8. Attila says:

    hey, thats awesome! thanks:))

  9. Remington M says:

    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….

  10. Remington M says:

    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 ;)

  11. the ae man says:

    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.

  12. wobagi says:

    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.

  13. Thanks a million, I really wanted to know how to do this.

    This is a top tutorial! Nice job guys!

  14. Wow! awsome.
    one of the best AE article ever.

    gratz.

  15. Author

    Thanks for all the positive feedback!

    • Jack Daniel Jenkins says:

      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.

  16. Venkatesh says:

    Thanks a lot. I never expect that we can create FX via After Effects itself.

  17. Richard Williams says:

    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…

  18. Moritz says:

    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 says:

      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 says:

      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 says:

      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 says:

        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 says:

        Oh yeah, worked for me. Thanks!

      • Jack Daniel Jenkins says:

        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 says:

        I’m running CS4 on Windows in German. Maybe thats the problem?

      • Jack Daniel Jenkins says:

        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.

  19. jordy says:

    Pretty cool tutorial. Not alot of stuff that I’ve seen on code out there. So thanks for this one. 2 Thumbs up.

  20. Rachl says:

    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 says:

      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 says:

      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)

  21. Le Dinh Thi says:

    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 ?

  22. H-nitro says:

    bravo, nisam programer ali ovo je dobra fora…

  23. andreas codeVFXmedia says:

    Hi

    Ive tried something easier, taht works too.

    Start AE,
    Open new Comp,
    Apply new layer (whatever can get effects),
    apply effects combination you want for that layer (i´ve followed the effects used in that tutorial and applied all the expression effects to that layer),
    then make room in your effect and preset tab, so that you have room at the bottom,
    then select all the applied effects
    and drag and drop them to the effect and preset tab.

    A window apear where you want to save your effect.
    Save it!

    Refresh List or resart AE.

    Make new Comp, new layer and then try to find your effect and apply it.
    All effects should be on your layer!

    No code-typing, no scripting, and your effects are ready to use with a name that you chose.

  24. Daniel says:

    Great tutorial, but how can i create some categories in this custom effect?
    thx a head, Daniel

  25. Mocarg says:

    @andreas codeVFXmedia : but then you don’t have the clean UI for effects, everything is in separate effect…

  26. maximumrfan says:

    Well what about the popup controller? How do I use that one? D:

    • David Torno says:

      This will work in CS5 for a basic one item popup use, but I am still trying to figure out how to get more than one item to show in the list though. If anyone has that answer, please share. :)

      • David Torno says:

        grrr, it removed the code. Very ugly looking but replace the ALL CAPS words with the actual symbol. :)

        LESSTHAN Popup name EQUALS DOUBLEQUOTE Artist DOUBLEQUOTE popup_string EQUALS DOUBLEQUOTE Item1 DOUBLEQUOTE default EQUALS DOUBLEQUOTE 0 DOUBLEQUOTE BACKSLASH GREATERTHAN

  27. c_4 says:

    how to do this affect with code::block

  28. Sebastian says:

    I have purchased Cinema Looks on VideoHive… it doesn’t work on After Effects CS5.5! I can’t find, “PresetEffects.xml” to change that you indicate in help file. Please, can you help me?
    Thanks, kind regards.

    Sebastian.

  29. zmultrin says:

    where is the .jsx file

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.