About Quartz Composer
Quartz Composer is a groundbreaking graphics development environment that allows you to explore the incredible power of the graphics stack of Mac OS X Tiger. With Quartz Composer, you can easily combine the capabilities of Cocoa, Quartz 2D, Core Image, OpenGL, and QuickTime, all using an approachable visual programming paradigm. Quartz Composer can be used to prototype Core Image filters, make data-driven visual effects, and create live performance animations.
Using Quartz Composer patches with VDMX5
We at Vidvox really like Quartz Composer: it's free, easy to pick up, and offers people with absolutely no programming experience a comfortable way to create stunning interactive pieces. As such, we do our best to support the aspects of it that we think are most advantageous- its ease of use and interactivity. There are several different ways to use Quartz Composer with VDMX:
The quickest way to get your Quartz Composer patches doing something in VDMX is to simply drag them into a media bin, or choose "Import Media" from the file menu. Your QC patch may then be triggered and played on a layer just like any other video file.
Quartz Composer patches can also be made available as resources that VDMX5 can use to process (FX), control (plugins), and otherwise handle playback of other sources (text and image sources).
Passing control data and images from VDMX into patches using Published Inputs
Quartz Composer consists of objects which are connected together with patch cords. The "Input Splitter" object lets you make inputs in patches; data may be passed to objects through these inputs. If you make an input splitter in the top level of your patch and publish it, VDMX will attempt to make an interface item for your input; different types of inputs (numbers, toggles, colors, etc.) get different types of interface items. The how to add a published input page includes step-by-step instructions as well as a list of several special input types supported by VDMX.
Using Quartz Composer documents as sources in VDMX
Quartz Composer patches that are loaded into a media bin in VDMX can be triggered and played on a layer just like any other video file. Once triggered the patch will start playing back immediately on the specified layer. Any published inputs (controls) for the patch can be accessed by using the Layer Controls plugin.
Patches can also be previewed by using the Media Inspector palette window. From here you can set the default settings for any of the input controls for the patch, as well as set a custom rendering resolution. If no rendering resolution is set for a patch it will play at the current canvas size.
When loading the patch VDMX will try to create a thumbnail to represent the clip. Because many patches that are generative can show up in media bins with non-descriptive thumbnails (usually just a completely black thumbnail), VDMX also will check to see if a custom QC thumbnail is included with the patch.
Special Types of Quartz Composer patches for VDMX
- QC patches as visual effects (qcFX)
If you add an image input to your Quartz Composer patch (and name it appropriately), VDMX can use it as an effect: video will be passed to the image input, your patch will be rendered, and the final image will be sent to the next effect in the chain.
- QC patches as blend modes and transitions for layers (qcCompModes)
Patches that take two video inputs and mix them together in some way can be used as composition modes for layers in VDMX. This allows for creating custom blend modes and transitions.
- QC patches for text file playback (qcTextSources)
If you add a string input to your Quartz Composer patch (and name it appropriately), VDMX can use it to trigger text files: text will be passed to your patch, rendered, and the final image will be send through your FX chain.
- QC patches for image file playback (qcImageSources)
In addition to using our built-in image player, images can be passed off to specially designed Quartz Composer patches. These patches can work with hi-resolution images to boil them down to a standard video resolution before processing with other FX. Examples of this are performing zooms without pixelation and smoother texture mapping onto 3d surfaces.
- QC patches as VDMX plugins (qcPlugins)
Patches loaded as plugins (such as the waveform) and used to generate control data (numbers, on/off states, and colors) and images that can be used to control sliders, buttons, color pickers, video taps and other receivers in VDMX.
To add a custom QC patch to the resources available to VDMX simply place them in the appropriate sub-folder located in /user/Library/Application Support/VDMX/ directory. Alternatively the patches can be places in the qcFX, qcTextSources, qcImageSources and plugins folders in the same folder as the VDMX application.
Also be sure to look at the example QC patches included in the VDMX folder which can be duplicated and used as starting points for new patches.
Creating custom FX
If you want to use a Quartz Composer patch as an effect in VDMX simply include an additional published input of type "Image" with the key "inputImage". The image to be processed by your FX will be passed to the patch from this input splitter. Any additional image inputs will show up as video taps in the control panel for the FX when it is added to a layer. Quartz Composer patches made using the Image Filter template will also work as FX in VDMX. By default custom QC FX show up in the list of available filters in the FX Manager palette under the "Quartz Composer" but a you can also create your own custom QC categories to help organize your FX.
Creating custom composition modes and transitions
Patches that take two inputs can be used to composite or transition two layers in VDMX. These patches must have two image inputs with the published keys "foreground" and "background" (for the top and bottom layers respectively) and an "opacity" number input. When the opacity value is 0 it is recommended that the "foreground" layer be completely invisible and the "background" layer should be unprocessed.
As a note, unlike other the other special types of QC patches currently there is no way to access any other input controls for QC composition modes besides the opacity.
Creating custom text sources
Text source patches are designed to take a text input in the form on a string and display it on screen. When a text file is played in VDMX5 the individual characters, words, and sentences are passed off to Quartz Composer patches to create a visual interpretation of the text. These special text patches must have an input splitter of type "String" with the published key "FileInput".
Creating custom image sources
Image source patches allow you to work with high resolution source images at regular video resolutions. These patches must have a published input of type "Image" with the key "imageFileInput". The image to be processed by the patch will be passed to the patch from this input splitter.
Using Quartz Composer patches as VDMX plugins
Any Quartz Composer patch placed in the plugins folder will show up as an available plugin in the VDMX Plugin Manager palette window and can be added to a preset like any other plugin (eg. waveform or media bin). The QC patch will appear in its own window with controls for all of it's input parameters. The plugin can also pass information back to VDMX. On load each of the published outputs of the patch will be made available to VDMX using the appropriate data-type: numbers, booleans, and colors are available as standard data-sources and any image outputs can be accessed by layers / preview windows / and FX by using video taps.
Quartz Composer resources
Example patches from Apple
In the /Developer/Examples/Quartz Composer/ or /Developer/Library/Quartz Composer/ and /System/Library/Composition/ folders on your computer there are already over 100 example Quartz Composer patches from Apple. These include sample Image Filter patches and others that can be loaded in as sources.
It is a good idea to make copies of these patches before editing them so you don't have to re-install your entire system to get them back.
Patches made by other users for VDMX
The first place to check out is the user submitted Quartz Composer patches page right here on the Vidvox Wiki. Many of the patches on this page are already designed to be loaded into VDMX as FX.
Another good place to visit is Memo.tv's keyword-searchable QC and VDMX project archive which hosts a great collection of example patches and FX.
Other useful Quartz Composer links
Apple's Quartz Composer Guide
The Vidvox user forums Examples and discussion
Vimeo has lots of tutorial and demonstration videos
QuartzCompositions.com Examples, Discussion, Wiki
Kineme Interactive Media QC custom objects and discussion forum
Futurismo Zugakousaku Examples
Sam Kass Blog Examples
QuartzComps.com Examples and discussion
Quartz Composer Lab Examples and tutorials
Quartonian QC blog, FAQ