Create Your Own Custom Effects!

Tutorial Details
  • Requirements: Just After Effects... enjoy
  • Difficulty: Intermediate
  • Run Time: About 30 min

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!

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.

Momcilo Stojkovic is Mocarg on Videohive
  • Daniel

    Sweet!

  • Devin Rajaram

    Nice tip you have here, thanks so much

  • http://www.lovehatedesign.co.uk freed

    cheers m8

  • tot pal

    what i need thank you very muuuch

  • http://www.youtube.com.br/ianhpiratao IANH – BR

    Great work, thank you!

  • rich

    Can you share this effect?

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

    • rich

      Is the custom effect only in this project?

      Can you copy & paste?

      • http://www.youtube.com/user/mocarg Momcilo Stojkovic
        Author

        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

        So you share thru exporting as a preset?

      • http://www.youtube.com/user/mocarg Momcilo Stojkovic
        Author

        yes as a Animation Preset.

  • http://www.benmcewan.com Ben McEwan

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

    • http://www.youtube.com/user/mocarg Momcilo Stojkovic
      Author

      Tnx Ben, it means a lot to hear that from you ;)

  • Jorrit Schulte

    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

  • Ryan Gibson

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

    • Rob Fab

      Default location of the PresetEffects.xml file on Mac:
      /Applications/Adobe After Effects CS3/ (Show Package Contents) /Resources/PresetEffects.xml

  • Attila

    hey, thats awesome! thanks:))

  • Remington M

    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

    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

    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

    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.

    • http://www.youtube.com/user/mocarg Momcilo Stojkovic
      Author

      Actually it will work on other machines but instead of “Energy Ball” it will be “Missing: Energy Ball” but the custom effect will work.

  • http://www.keyframekid.com Youssef Sarhan

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

    This is a top tutorial! Nice job guys!

  • http://www.matthieudufour.com Matthieu Dufour

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

    gratz.

  • http://www.youtube.com/user/mocarg Momcilo Stojkovic
    Author

    Thanks for all the positive feedback!

    • Jack Daniel Jenkins

      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

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

  • Richard Williams

    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

    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

      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

      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

      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

        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

        Oh yeah, worked for me. Thanks!

      • Jack Daniel Jenkins

        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

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

      • Jack Daniel Jenkins

        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

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

  • http://rachelgardnerphotography.zenfolio.com Rachl

    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?

    • http://www.benmcewan.com Ben McEwan

      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

      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

    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

    bravo, nisam programer ali ovo je dobra fora…

  • andreas codeVFXmedia

    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.

  • Daniel

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

  • http://www.videohive.net/user/Mocarg Mocarg

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

  • maximumrfan

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

    • http://aeioweyou.blogspot.com David Torno

      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. :)

      • http://aeioweyou.blogspot.com David Torno

        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

  • c_4

    how to do this affect with code::block

  • Sebastian

    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.

  • zmultrin

    where is the .jsx file

  • Jorrit Schulte

    In CS6 You can now create a custom Pupup control as well.

  • http://http//www.iclickstuff.com/blog Ben Griggs

    I found this a while back..

    http://www.batchframe.com/custom_controls/

    It is a very easy to use web interface that will spit out custom AE effect code!
    No need to mess around with understanding the code behind it really.

  • http://www.brightblades.blogspot.com Sri Vignesh

    After creating the presets (I followed all steps and saved as a presets in “Save Animation”) and I shared that Custom control to my friend and he is having same after effects cs5.5 but, it says the preset is “Missing”. Do you have any Idea, or am i missing something??

    Thank you
    Sri Vignesh.

  • Pavle

    Tnx za tutorial covece!

  • Kyle

    With the Energy Ball Effect, how did you get it to generate the ball?

  • jack

    this tut should be removed because it’s a copy of this

    http://www.batchframe.com/_previews/tutorials/pseudo_effects/

  • AE freak

    awesome very helpful