Masked Filters

Masked Filters

Masked Filters Designate a region to which you apply video filter by using a collection of masks.

Overview

Use a filter-video-mask element to apply video filters to a portion of the image described as a mask, or apply two different filters, one inside the mask and one outside. Together, the Mask Elements define a single region to which the effect applies. The actual video filter is described with a video-filter element as a child of the filter-video-mask element.

Note FCPXML 1.5 added support to apply video filters to a region defined by a collection of masks.

A mask may consist of multiple shapes or color isolations. For a color correction filter, in addition to the correction you apply inside the mask, there may be another set of correction parameters to apply outside the mask. The code below represents a masked video filter with a single shape mask.

 <filter-video-mask>
    <mask-shape name="Shape Mask" blendMode="add">
       <param name="Radius" key="160" value="750 150"/>
       <param name="Curvature" key="159" value="0.7"/>
       <param name="Feather" key="102" value="170"/>
       <param name="Transforms" key="200">
          <param name="Position" key="201" value="10 110"/>
          <param name="Rotation" key="202" value="14"/>
       </param>
     </mask-shape>
     <filter-video ref="100"/>
</filter-video-mask>

The next code example represents a color-correction filter with a single shape mask and different correction parameters that the example applies inside and outside of the mask. The first filter-video element represents the inner correction and the second corresponds to the outer correction.

<filter-video-mask>
     <mask-shape name="Shape Mask" blendMode="add">
        <param name="Curvature" key="159" value="0.7"/>
         <param name="Transforms" key="200">
            <param name="Position" key="201" value="260 -30"/>
          </param>
      </mask-shape>
      <filter-video ref="1000">
           <param name="color_global" value="0.2 0.8"/>
      </filter-video>
      <filter-video ref="1000"/>
           <param name="color_highlight" value="0.3 0.6"/>
       </filter-video>
 </filter-video-mask>