Table of Contents
Creating Motion Templates for Final Cut Pro X
This document describes the steps required to deliver an existing FxFactory product to Final Cut Pro X. At this time, Final Cut Pro X does not support FxPlug plug-ins natively. It does support a newer, more powerful version of Motion Templates. They are divided in four categories:
- Final Cut Effects - filters, applied to a single clip.
- Final Cut Generators - dragged as a new track to any location in the timeline.
- Final Cut Transitions - applied at clip boundaries.
- Final Cut Titles - an enhanced filter which employs Motion's titling abilities.
Within Final Cut Pro X, these template-based effects appear and work just like a native plug-in. The first three of these categories are a direct match for the categories we have been using in FxFactory all along: filters, generators and transitions.
It follows that in order to deliver your existing plug-ins to Final Cut Pro X, you must create an equivalent Final Cut Effect, Generator or Transition.
Getting Started
For the purpose of this tutorial, let us assume that you are creating a new Motion Template to bring an existing filter to Final Cut Pro X.
Launch Motion 5 and create a new Final Cut Effect project:
The dimensions and duration of the project do not matter greatly when converting an existing filter. They are of greater importance when creating pure motion graphics templates, a fact that you will become more obvious once you have a full grasp on this technology1).
To keep things simple, choose 720p or 1080i/p, which matches the type of media and aspect ratio most users will be working with.
When the new project is created, you will notice a placeholder track called “Effect Source”:
Apply your filter to the placeholder track.
Publishing Parameters
The next step is to advertise certain parameters of your filter to the user, so that when the effect is applied in Final Cut Pro X the user will be able to customize it. Bring up the parameter inspector, and point the mouse over the empty area on the right of an effect parameter. A popup menu arrow will appear. Select the Publish command to publish that parameter to the user:
Motion Templates only allow basic types of parameters to be published, notably sliders, angles (also implemented as sliders), popup menus, checkboxes and colors. This means presets, custom parameters (banners, path choosers, file lists, etc.) cannot be made available to the user.
Dynamic parameter UI (a.k.a. context-sensitive parameters) is also absent from Final Cut Pro X, so you must publish only parameters that are visible and active by default.
Motion 5 introduces another feature called Parameter Rigging (menu command Add To Rig). It is largely useless for converting existing plug-ins to templates. Parameter Rigging is an excellent way to build a simple UI (a single parameter) that controls multiple parameters behind the scenes. Your plug-ins likely have this logic already implemented inside the Quartz composition2).
All recent versions of Final Cut Pro X support dynamic parameter UI (hidden or displayed based on the state of other parameters) as well as parameters with custom UI.
Unfortunately it is still not possible to publish Image Well parameters 3). If your plug-in requires additional image inputs, read the Appendix at the end of this document on adding image inputs to a template.
Reordering and Renaming Parameters
As you publish parameters, you may want to change the order in which they appear to the user. To do that, select the Project entity that appears above all layers in the Timeline:
Next, switch to the Inspector and select the “Project” tab:
You will notice that the default category, “Publishing”, lists all parameters that have been currently published by the template. You can rearrange them by dragging them to the desired location. You can rename them by double-clicking the parameter label.
The parameter value that you set in this section is also the default parameter value used by Final Cut Pro X when the effect is first applied.
Saving the Template
When you're done creating your Motion Template, clear any media that has been assigned to the “Effect Source” before you save the template. To do that, click the “Clear” button in the Inspector tab:
The reason for clearing the “Effect Source” is that you do not want it to reference any media you used during development. Following Motion's media management rules, as soon the “Effect Source” stops referencing the media it should disappear from the project's assets. This will prevent massive media files from being copied to the template folder, when in fact your customers will never need/use that media.
When saving a template for the first time, Motion will display the options sheet below. Leave the “Save Preview Movie” option off:
You will also want to create the template in your own category (your vendor name or product name). The category can be easily changed later.
Deploying Motion Templates
Final Cut Pro X will load templates from two locations. One is inside your home folder, thus accessible only to the current user:
~/Movies/Motion Templates.localized
The above is the default location where Motion 5 saves all templates that you create.
There are different sub-directories within the Motion Templates.localized4) folder which contain Effects, Generators, Transitions and Titles:
~/Movies/Motion Templates.localized/Effects.localized/<CATEGORY_NAME>/<TEMPLATE_NAME> ~/Movies/Motion Templates.localized/Generators.localized/<CATEGORY_NAME>/<TEMPLATE_NAME> ~/Movies/Motion Templates.localized/Transitions.localized/<CATEGORY_NAME>/<TEMPLATE_NAME> ~/Movies/Motion Templates.localized/Titles.localized/<CATEGORY_NAME>/<TEMPLATE_NAME>
Assuming that you just built a Final Cut Effect named “Super Fun Filter” and saved it to the category “ACME”, Motion 5 will have saved it to the following location:
~/Movies/Motion Templates.localized/Effects.localized/ACME/Super Fun Filter
The “Super Fun Filter” directory contains the Motion project as well as supporting files:
large.png Media/ small.png Super Fun Filter.moef
Each template has its own directory, which also contains two interesting files: large.png and small.png. These are the thumbnails Final Cut Pro X will use to advertise your effects in its browser interface. Most likely, you will not be happy with the default previews saved by Motion 5. You may want to provide better thumbnails, probably the same you are using for plug-in thumbnails in the FxPack. Please keep the following in mind:
- Your thumbnails must have the same dimensions and filename as the ones you are replacing:
- small.png: 100x56px
- large.png: 640x360px
- The thumbnails are overwritten by Motion 5 every time you save the template. You should probably assign custom thumbnails as the last step, when you are ready to ship. You should also keep backups of your thumbnails so that they can be easily dropped in to replace the ones generated by Motion.
Although the filenames seem to imply that you must store your thumbnails in the png file format, you can use a trick to save space. You can create thumbnails using jpeg instead, and then artificially assign the png file extension. The thumbnails will still be recognized by Final Cut Pro X, but you will save significant disc space in the process.
Following the recommendations made earlier, the Media folder should be empty.
When delivering templates to your customers, you will want to install them in a second location which is accessible by all users. That location is inside the Application Support folder:
/Library/Application Support/Final Cut Pro/Templates.localized/Effects.localized /Library/Application Support/Final Cut Pro/Templates.localized/Generators.localized /Library/Application Support/Final Cut Pro/Templates.localized/Transitions.localized /Library/Application Support/Final Cut Pro/Templates.localized/Titles.localized
Appendix: Final Cut Transitions
FxFactory already gives you the ability to apply a transition as a filter inside Motion and After Effects. What this means is that transition effects that appear as transitions inside Final Cut Pro, are also available inside Motion and After Effects as filters. Until now, this feature was of importance only to end-users. You can use it to create Final Cut Transitions (template-based transitions) very easily.
Start by creating a new Motion project based on the Final Cut Transition template.
Initially, Motion will arrange your incoming and outgoing clips (named Transition A and Transition B) so that they each occupy the first and second half of the timeline. Change the duration of each clip so that their in and out points match exactly the project duration:
Next, apply your transition filter to the Transition A track 5).
Display the parameter inspector, and drag the Transition B layer to the Transition Layer parameter:
Add keyframes to the Transition Progress parameter at the beginning and end of the timeline. Make the parameter animate from 0.0 to 1.0 over the duration of the project:
Because you are animating the Transition Progress parameter in the Motion Template, you should not publish the parameter.
Last, you can disable the Transition B layer, since you are only rendering it indirectly (through the transition effect applied to the top layer). You'll end up with something like this:
This last step will likely save you some rendering time since Motion can skip rendering that bottom layer more than once.
Appendix: Using Drop Zones to Publish Additional Media Inputs
Although “Image Well” parameters cannot be published, the following technique allows you to work around this limitation.
Suppose that you want to create a Final Cut Effect based on an existing plug-in that requires a secondary image input. For this example, we'll take the Mask With Geometry plug-in that is part of FxFactory Pro.
The project initially contains only one drop zone, the default Effect Source layer. Apply your filter to the Effect Source layer as normal.
- Create a new drop zone by selecting the New Drop Zone command under the Object menu:
- Disable the newly created drop zone in your timeline. This is necessary to avoid having the media be composited in the final output, and it improves performance:
- Switch to the parameter inspector for your filter and drag the second drop zone from the list to the image well:
- Save the Motion template, and you are done. When you apply the Final Cut Effect inside Final Cut Pro X, you will notice that a new drop zone is advertised in the parameter inspector: