The central source for quartz composer creations.

HomeReferencePatchesDownloadsFAQ

Quartz Composer reference

Quartz Composer is Apple's node-based tool for building real-time graphics on Mac OS X. You wire patches together instead of writing code, and it draws the result as you go. It first shipped with Tiger (10.4) in 2005, got a big editor overhaul in Leopard, and reached version 4.0 in Snow Leopard with Collada 3D model support. The last build was 4.6.2 (2016). Apple deprecated it in macOS Catalina (2019) and pointed people at Metal, SceneKit and Core Image instead.

Compositions and .qtz files

A composition is a small procedural graphics program you build by assembling patches. It's saved as a .qtz file, a binary (or XML) property list with the type com.apple.quartz-composer-composition. A composition can take input parameters and produce output, and it can run on its own or be embedded in another app. The same file could be dropped in as a screensaver, an iTunes visualiser, a QuickTime movie, or a layer inside a Cocoa application.

The patch model

Everything in a composition is a patch. A patch is basically a function: it takes some inputs, does something, and produces a result. Input ports sit on the left of the patch, output ports on the right, and you drag a wire from an output into an input to make data flow. Patches come in three kinds, shown by the colour of the title bar:

Providers feed data in, things like Image Importer, Video Input, or the LFO. Processors take values and change them; Math and Interpolation are the obvious ones. Consumersdraw to the screen, such as Sprite, Cube, Billboard and Clear. There's a full list of the common patches on the patches page.

How a composition runs

Quartz Composer uses lazy evaluation, and the consumer patches drive it. Consumers run in order of their rendering layer (the number in the top-right corner of the patch), lowest first. When a consumer needs a value it pulls on whatever is wired into it, and only then do the processors and providers behind it run. A provider runs at most once per frame. Draw order is therefore set by layer numbers, not by patch position on the canvas.

The coordinate system

The origin is the centre of the screen. X runs from −1.0 on the left to +1.0 on the right, so the full width is 2.0 units. Y depends on the aspect ratio — on a 4:3 viewport it runs to about ±0.75. Z points out of the screen toward you. Sizes scale the same way: a width of 2.0 fills the viewport, 1.0 is half of it. By default you're looking at an orthographic projection straight on.

Macros and published ports

A macro patch is a container: a patch that holds other patches, like a subroutine. The whole composition lives inside a root macro patch. Macros are drawn with square corners instead of rounded ones, and you nest them to keep a big composition from turning into spaghetti. To get a value in or out of a macro you publish a port, which exposes an inner patch's input or output on the outside of the macro. Published inputs are also how an embedding application passes parameters into a composition.

Status

Apple deprecated Quartz Composer in macOS Catalina (2019) and removed it from Xcode, recommending Metal, SceneKit and Core Image instead. The last release was 4.6.2 (2016). Origami, the interface prototyping tool, began as a set of Quartz Composer patches.

Sources

Apple's Quartz Composer User Guide (archived in the Apple Developer documentation library) and the Quartz Composer article on Wikipedia.