Quartz Composer Help

Oct 30

Random-Position in Iterator Module

Setting objects in iterator modules “freely” or “random” can be a little hard, because you can get “Iterator Variables”, that are only linear scales of the single objects. For example you get variables like 0, 1, 2, 3… or variables between 0..1. Setting your objects with that value you can get easily linear distributions, but nothing by random.

There is a simple quick method to place the objects by random. The module you need it “Perlin Noise”. Set different x and y settings to get a nice random distribution. There are also opportunities with Perlin to make decent animations. 

Sep 23

Simple Scene Manager

This is a simple, but effective approach, to make a scene manager in Quartz Composer patches. The Boolean Demultiplexer works as input source. You put in the number of the scene you want to show. The type of output is “Boolean”, so only 1 or 0. This enables or disables the connected scenes. The bool-values are connected the enable-input of the patches. So if not used, than the patch went to “sleep mode”. Very important: The Use Reset Value flag must be set. If not set, the enable-values of the non-active outputs stay at 1 and will not be set to 0 automatically.

Jun 17

Sample and Hold: Temporary save a value

This patch saves a value in the sample and hold module. In that case pressing the “key-down” triggers the saving of the value. You can feed any other changing signal into the sampling input.

May 31

Video-Framebuffer with Queue Module

This is how to build a simple “Framebuffer”, using the Queue-module: The video-input is feed into the Queue-module. The Queue Size set the length of the framebuffer-delay. To get the delayed image, we use the Structure Index Member module. Set the Index to “0” (zero) to get the frame, that is delayed by the Queue Size value. Of cause you also have access to all other structure-members from the queue, settings the index value from the Structure Index Member from 0..(Queue Size-1).

To get a bigger delay, you would normally set to Queue Size to a higher value, while setting the Index of the Structure Index Member always to 0.

You do not has to use a video-signal as input source. With that given design, you can build a buffer for any value that are present in your patch.

May 03

Edit Core Image Filter Code in Quartz Composer

If you want to write Core Image Filters, you will use the Core Image Filter module in Quartz Composer. Click on the Core Image Filter Module, open the Preferences Panel, go to the Settings drop down. There you got the code. Notice the additional options like “Edit Filter Function” (that will open another window with editable code). “Show Advanced Input Sample Functions” will show additional input-nodes at the module view.

There is a comprehensive documentation about the Core Image Filter programming language at the dev-site of Appel. Core Image Filters are also known as Core Image Kernels. A beginners guide is also available at the Apple Documentation.

Apr 28

HOW DO I FORCE PATCHES TO EXECUTE?

Showing a patch output tooltip showing an incorrect result until the output is connected to a patch that renders.

While learning how to use patches, it is handy to use tooltips to investigate what outputs are produced given specific inputs. The problem comes when the tooltip results don’t seem to change whatever the inputs are set as.

As compositions are executed ‘from graphics back to the logic’, patches don’t execute unless they are connected (either directly or through other patches) to a patch that draws on the screen.

However some patch outputs can’t be connected directly to patches, but all outputs can connect to the ‘Enable’ input of the Billboard patch. Once an output is connected, the tooltip result will update correctly.

- alex4d

Apr 28

Simple Debugger / Text-Console in Quartz Composer

This is how you can build yourself a simple text-console like debugger. You use a Image with String module and connect it to a Sprite or Billboard renderer. The string-input of the Image with String is where you feed your debug-values.

Apr 28

Where do I edit the GLSL-Shader-Script?

If using the GLSL Shader Module, it can be hard to find the actual shader script to view and edit. Where to find it? You have to click on the Patch Inspector, than on the GLSL Shader. Then in the Patch Inspector itself select “Settings” in the drop-down menu. There is the editor, where the GLSL-Script is edited.

Apr 27

Get Color from Image-Pixel

This is how to use a color from an image-pixel as background-color. This patch uses Clear, Image Pixel and RGB Color. The values of Pixel X and Pixel Y in Image Pixel are useful to use int, although parameters can also be float.