Learn More Contact Now
Since the dawn of time - filmic time, at least - we visual types have liked to fool around with visual effects.  And since the dawn of NLE plugins to help us do that, they've been something of a black box.  Sure, they've got a couple of knobs to adjust the effects' parameters - but at the end of the day, we're in the habit of shoving our footage into the plugins without any idea of what goes on behind the scenes.

Enter Final Cut Pro's FXBuilder.

Finally, we can look inside of most of the effects and transitions that ship with Final Cut - and tweak them, and even write our own, if we're feeling ambitious.
OK, so an example.  In our 5-day Final Cut Pro training, we discuss how to manipulate clips in 3D - and one of our applications is creating a transition that's kind of like the "Spinback3D" transition that ships in the 3D Simulation folder with Final Cut.  Try that transition out.


Notice how transition spins the first piece of footage to where you're looking down the edge - but then it rotates in the opposite direction when it's showing the second clip?  What we want is to make the transition flip all the way around, rotating in the same direction.

We have pedagogical reasons to ask our students to do this full-spin effect by hand - but trust me, it takes some time and effort.  But before FXBuilder, doing it by hand would have been our only option, even though it's just a tiny variation on an existing effect.  Former students, don't get too mad - I'm about to show you how to do the same thing in a couple of keystrokes.  (Future students?  With this trick, you can be the star of the class in this module.  But we'll still help you learn some 3D manipulations by hand.)

In the Effects pane, right-click on the Spinback3D video transition (it's in the 3D Simulation folder), and click Open In Editor.  Whoa, where did your timeline go?!  In its place, you should see a tab titled FXBuilder - and a lot of super-intimidating text.

If you're into programming or math, you may begin to recognize some of what's going on here.  If not, don't worry about it.

The first few lines set up how the effect will appear in Final Cut.

scriptid "Spinback3D" //DO NOT LOCALIZE
transition "Spinback3D";
group "3D Simulation";
wipeCode(20, 100);
You can find more detailed documentation about what's going on in your Final Cut manual - but for now, take my word for it.  Change both "Spinback3D" to read "AlexSpinback3D" - or the name of your choice (just for simplicity's sake, take my word for it and avoid spaces here).

Notice the next few lines:

input angleofaxis, "Angle of Axis", angle, 0, -360, 360 detent 0;
input borderWidth, "Border", slider, 0, 0, 10 snap 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
input borderColor, "Color", color, 255, 0, 0, 0;
Again, ugly - but we can figure out what's happening.  These are the controls that show up in the Effects tab when we apply the transition.  They're putting labels like "Angle of Axis" on variables that we'll use later in the math (angleofaxis), and describing how to get that input.

Ever wanted to "overdrive" an effect, but it won't let you jack the control up as high as you want?  Now you know how to override that - find the limit on the input line, and jack it up there.

Anyway, there's some interesting mathy stuff going on for a while, and then we arrive at these lines about 2/3 of the way down:

if ratio < 0.5
	rotate3D(target3d, center3d, 0, 180*ratio, 0);
	rotate3D(target3d, center3d, 0, 180*(1-ratio), 0);
end if;

Aha, the meat of our problem!  The "ratio" here is the percentage of the transition that's done at this point in time.  So if it's in the first half (i.e. 50%) of the transition, it'll show the first clip, and rotate it by however far we are into the transition - right at the midway point of hte transition, the first piece of footage will be rotated by 90° on the vertical axis.   If it's in the second half of the transition, it'll start going back the other way - that's the (1-ratio) part.

So what do we need to do?  Just change the fourth line there to read:

rotate3D(target3d, center3d, 0, -180*(1-ratio), 0);
end if;

What have we done?  Well, essentially, starting at -180° rather than 180° makes sure that the second clip starts on its side, spins the right direction, and ends up facing the right direction - but the math is beside the point of this lesson.  Trust me, it works - and to prove it, go to the FXBuilder Input Controls tab and drag in a couple pieces of footage.  Now, go back to the FXBuilder Text Entry tab and pick Run from the FXBuilder menu.  Look good?  Great.

So let's install the plugin into Final Cut.  I swear this is the hardest part of the process: finding where to put your finished plugin.

Go to the FXBuilder menu and pick Export Plugin.  Now, take a deep breath, and browse to:

Macintosh HD -> Users -> [your username] -> Library -> Preferences -> Final Cut Pro User Data -> Plugins

...and type a filename for the plugin - for consistency's sake, stick with "AlexSpinback3D" or whatever you used earlier in the plugin.  This will install the plugin only for your user running your copy of Final Cut.

Restart Final Cut, twirl open your Video Transitions and the 3D Generators folder - and voila, a Real, Live Plugin.

Thanks, FXBuilder!


Listed below are 0 links to blogs that reference this entry: FXScript in Final Cut Pro.

TrackBack URL for this entry: http://www.geniusdv.com/weblog/mt-tb.cgi/932

Receive FREE Tutorials by email:


    Avid Media Composer Training
  • Enrollment Cost: $50.00
  • 84 Media Composer Lectures
  • Includes Practice Media
  • Interactive Quizzes
  • Official Certificate of Completion
  • 30 Day Money Back Guarantee
  • Click to Enroll for 10% off!
    Final cut Pro X Training
  • Enrollment Cost: $20.00
  • 60 Final Cut Pro X Lectures
  • Includes Practice Media
  • Interactive Quizzes
  • Official Certificate of Completion
  • 30 Day Money Back Guarantee
  • Click to Enroll


After Effects: Heart Rate Monitor was the previous entry in this blog.

Avid Media Composer replace command is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.