Quartz composer lighting patch




















Change Attenuation to 0. Click on the color box next to Light 1 Color to bring up a color wheel. Pick a new color and observe the changes in your viewer. In the Inspector for the Interpolation patch, choose a Start and End Value of 0 and , respectively.

This tells the Interpolator what values we want it to output. Change the Duration of your Interpolation from 1 to 0. Change it to 10 and observe it slow down. In your viewer, your cube should now be responding to your default system input — on a laptop, this will be your internal Mic.

On a desktop, you may need to plug in a Mic or some other External Audio source to see it respond. In Tiger you will default to having two operations — you can leave the other one blank. It will take a little while to follow all the steps, but I promise the results will be worthwhile.

Here's a friendly warning: Quartz Composer is supercool and highly addictive. Before you start using it, be sure you have several hours or perhaps an entire night to dive in and try things out, because you might find it hard to walk away. As the program starts up, you might get an alert complaining that your Mac's video hardware won't support all the program's greatest features, but that's OK. If you get the alert, read what it says and click Continue. Next, you see the New Composition Assistant offering several types of templates to start our composition.

For this example, we're going to start from scratch, so just click Cancel to make the Assistant go away. You see two windows: The one that looks like a checkerboard is called the viewer; and the other is the editor. On the left side of the editor window, make sure Patch Library is selected. In Quartz Composer, a patch is an individual graphical element or process. Patches are the building blocks you use to make compositions.

We'll start this one with a cube. Look down the Name column in the Patch Library until you find the patch named Cube--it's in the Renderer category. Double-click Cube to add a cube patch to the composition. Instantly, if not sooner, a box labeled Cube shows up in the editor. There's also a cube showing in the viewer--you can't see it, because it has no color or texture yet, but you can tell it's there because it's blotting out the grid background Figure 2.

Figure 2. Our composition starts with a cube. We only know it's there because part of the background is obscured in the viewer window.

Let's be honest about this: our cube is totally boring right now. Why, it's barely a cube at all. But if you take a look at the cube patch in the editor, you see that it has a bunch of values we can use to fill it that should make it far more interesting. Let's start by putting something on the front of the cube. In the Patch Library, find Image Importer it's in the Generator category and double-click to add one to the composition. Note: when you're adding a patch to your composition, there are various ways to find the patch you're looking for.

By default, the Patch Library is sorted by category. You might find it more useful to alphabetize the patch names--click the Name column to do that. If you know any part of the name of the patch or category, you can type text in the Search In Libraries field to get instant results. Note that some patches have a bullet in front of their names.

The bullet indicates that these patches work best with graphics hardware that's not present on the computer running Quartz Composer, so they will run slowly if used on this computer.

The alert you might have seen when you started up Quartz Composer was warning about this. Click the new Image Importer patch to select it. Now you need to find a nice picture to put on a cube face. For best results, pick an image that's square or nearly so. If you can't find any images you like, look in the current user's Pictures folder.

When you locate the image you want to use, double-click it. The Selection Index divides the tiles into 3 sets: the selected tile center tile , the tiles to the left and the tiles to the right.

Recall that we have 3 states for each tile, that specify the orientation of the tile. The state of the tile is controlled by this State Index. The center tile is unaffected by these inputs. The value of the X Position is governed by the fact that we use a 3D co-ordinate system where the origin is in the center of the screen. The X values decrease to the left of the origin and increase to the right of the origin.

This is fed as input from higher level patch that represents our entire coverflow visualization. Note that all the necessary inputs are exposed on this patch. Of course, no CoverFlow control is void of user interaction! Thus our composition dutifully provides some control using keyboard input. In Quartz Composer the Keyboard patch can be used to detect keyboard input. A set of keys can be configured in the settings for the Keyboard patch, which will generate a signal a momentary boolean value whenever that key is hit.

The Keyboard generated signals are fed into a Counter patch that increments or decrements a count. The Left arrow decrements and the Right arrow increments. We also use a Conditional patch to ensure that the count generated by the Counter is always within the index range [0, n-1] of the Image List. For the applications discussed here it is mostly used for rotating a fisheye projection for planetarium content. Examples Fisheye This is perhaps the most common type of application for planetariums using the spherical mirror projection technique.

The input image is a fisheye and the only sensible navigation is rotation about the center of the fisheye. Note the use of the intensity mapping to compensate for the variable density of pixels, and hence light level on parts of the dome. Spherical This example also uses a spherical mirror and a single projector but it is for a dome orientated 90 degrees to a planetarium dome.

The warp map below takes a full spherical projection image or movie and warps it for a projector and spherical mirror. Cylindrical The following warps a cylindrical panoramic projection image or movie to a perspective projection. In the case of a movie made up of cylindrical panoramic frames this is another example of a navigable movie.

Varying "Delta u" also achieves the panning left and right, adjusting "Delta v" is a vertical pan up or down. Planar This last example is a large "standard" movie, a perspective projection. Here the mesh simply implements a 8 times zoom, varying "Delta u" and "Delta v" allows one to pan around within the larger movie.

Download PBMesh. Noting however that for many movie intensive compositions QC3 is often much higher performing.



0コメント

  • 1000 / 1000