Graphics Reference
In-Depth Information
into a QCCompositionLayer and add some Cocoa controls for controlling the various
input values of the composition.
Creating a Multi-Video Stream with
Quartz Composer
In keeping with the theme of the previous two chapters, we continue to use video as the
rendering medium. This composition will consist of two Movie Loader source patches and
two Billboard patches that display the movies loaded by our Movie Loader patches. Movie
Loader patches simply do what the name implies—they load movies from disk to be used
as an input source for a composition. It is a type of source patch. Billboard patches are
renderer patches that display the video for us. You connect the output image of the Movie
Loader patch to the input image of the Billboard patch and the movie will render.
Quartz Composer is found in /Developer/Applications . Go ahead and start it.
To create the composition, follow these steps :
1. Select File > New Blank in Quartz Composer to create a new blank composition.
2. Drag two Movie Loader Source patches from the Patch Browser to the editor in the
Root Macro Patch.
3. Drag two Billboard Renderer patches from the Patch Browser to the editor in the
Root Macro Patch.
4. Drag a Clear Renderer patch from the Patch Browser to the editor in the Root Macro
Patch.
5. Click the Image output of one of the Movie Loader patches, and drag it to the
Image input of one of the Billboard patches.
6. Click the Image output of the other Movie Loader patch, and drag it to the Image
input of the remaining Billboard patch.
7. Click the Clear patch number badge and set it to Layer 1. This ensures that our clear
color is the backmost layer.
8. Select one of the Movie Loader patches and provide a path to a QuickTime movie in
the Movie Location input parameter in the patch inspector (see Figure 9-1). Repeat
this for the other Movie Loader patch.
9. As shown in Figure 9-2, adjust the X Position and Width parameters for each of the
Billboard patches so that the videos display side by side.
For Billboard Layer 2, specify Width: 0.85, X Position: -0.4856.
For Billboard Layer 3, specify Width: 0.85, X Position: 0.4856.
These settings cause the videos to display side by side.
 
Search WWH ::




Custom Search