mocha Logo
developed by
imagineer systems
Sections
Home > Support > Documentation > Exporting Mattes

Exporting Mattes

Note: Some export formats listed below are not available for mocha AE. For a full comparison of features, please refer to the comparison chart online.

Note: This feature is only available in some applications.

When your roto work is complete and you’d like to export your mattes, choose the menu item File -> Export Rendered Shapes... to be guided through the rendering process.

 

The render dialog will give you options to choose either the currently selected layer, all visible layers or all the layers in the project.

 

Some applications do not support all the export formats described below. Importing mocha shape data into other applications requires the mocha shape plug- in for that application.

Exporting as G-Masks and Shake Rotosplines

Choose a shape (not a layer) and select Export Shape Data... from the File menu. A dialog will show with a drop-down containing 3 different saving options.

Choose the target application and hit Save. The data going into the file is not binary, and is shown in the dialog so that you may copy and paste it directly into a text editor if you prefer to work that way.

Because of differences in the way Splines are handled in the applications (Combustion and Flame handle splines differently), maintaining accurate keyframe interpolation between our software and the other applications requires that the exported shapes have a keyframe on every frame. This is not a bug but required to ensure your mattes look right once they’ve been imported into your compositing application.

Exporting as mocha shape for After Effects Data

It is important that the clip length, frame rate, frame size, interlace mode, pulldown mode and pixel aspect ratio in the project match the corresponding settings in the After Effects project where you plan to use the data. You can change the frame rate and pixel aspect ratio settings in the Film and Time sections of the Clip tab.

The mocha shape plug-in will import the following data into After Effects:

  • One or more shapes, which may be either Bezier or X-Spline

  • The 'plane' that was generated by the Planar Tracker. This defines the overall movement of the shape(s)

  • Shape point keyframes set in the project

  • Per-point feathered edges

If you wish to export a single layer, select it before proceeding with the export.

When you are ready to export, select Export Shape Data button. On the dialog that opens, choose if to export the selected layer, all visible layers or all layers.

When you have made the right selection, click Copy to Clipboard, then switch to After Effects.

In After Effects, import the same footage and ensure that the frame rate and pixel aspect ratio are the same as those used when generating the shape. You can change these values in After Effects by selecting File | Interpret Footage | Main....

Bring the footage into a composition, then select Edit | Paste to add the shape effects to the composition. Each shape exported will come across as its own plug-in effect.

In the plug-in controls you can change the following parameters:

Blend mode

You can choose to change the blend mode from the one assigned to the shape by selecting Multiply, Add or Subtract from the dropdown menu.

Invert

When checked, inverts the matte.

Render soft edge

If you have created the shape with feathered edges but wish to switch these off, untick this parameter. Note that if you have not created feathered edges this will have no effect.

Render type

This setting allows you to choose between various render effects. The default is the 'Shape cutout' which uses the matte to cut out the corresponding area in the background footage. 'Color composite' will apply a single color to the area within the matte, useful when wanting to preview the positions of multiple layers. Note that the Opacity setting affects this color fill, allowing you to blend it with the background footage. 'Color shape cutout' combines the effects of the previous two.

Shape color

Defines the color of the color fill applied when selecting the 'Color composite' render type.

Opacity

Defines the opacity of the color fill applied when selecting the 'Color composite' render type.

Exporting as mocha shape for Final Cut

The mocha shape plug-in will import the following data into Final Cut:

  • One or more shapes, which may be either Bezier or X-Spline

  • The 'plane' that was generated by the Planar Tracker. This defines the overall movement of the shape(s)

  • Shape point keyframes set in the project

  • Per-point feathered edges

If you wish to export a single layer, select it before proceeding with the export.

When you are ready to export, select Export Shape Data button. On the dialog that opens, choose if to export the selected layer, all visible layers or all layers.

When you have made the right selection, click Save and select a destination to save the XML file to, then switch to Final Cut.

In Final Cut, import the XML file by CTRL-clicking in the project asset window.

 

Select 'Import', then 'XML...' and finally select the XML file that you exported.

Accept all the defaults in the 'Import XML...' dialog.

Your mocha shape sequence will now appear in your list of project assets.

 

To use the shape to composite the rotoscoped object over a new background, simply place the mocha shape sequence in a video track above the background sequence.

 

Additional controls

If you want access to the actual matte, individual layers of the matte or control that affect the appearance of the matte, double click on the mocha shape sequence to reveal the two main sequences it consists of - the original sequence and the ContourSequence.

Double clicking the ContourSequence will reveal the individual layers that the ContourSequence consists of. Dragging a layer into the viewer and selecting 'Controls' will give you access to controls of that layer, as shown below.

Invert

When checked, inverts the matte.

Soft edge

If you have created the shape with feathered edges but wish to switch these off, untick this parameter. Note that if you have not created feathered edges this will have no effect.

Render mode

'Luma' will cause the layer to render itself in the RGB channels, whereas 'Alpha' will cause the layer to render itself in the alpha channel of the generated sequence.

Matte color

Defines the color of the matte being rendered.

 

Exporting RotoPaint nodes to Nuke

You can export a RotoPaint node straight to the clipboard or to a .nk script by choosing Nuke Roto Paint (*.nk) from the Export Shape Data dialog. If you choose Copy to Clipboard you can immediately switch over to Nuke, select the node you wish to apply the shape data to and Paste the data. Alternatively you can import your saved Nuke Script from the File menu.

Document Actions