Command-Line Compositing, in Depth


This section demonstrates the different degrees to which the command line can be used, starting simply as a flipbook and gradually adding complexity up to a full-blown script. OK, I admit, this stuff is pretty boring, but somebody has got to explain it. Once you get past a certain point, your best bet is to move to the Shake graphical interface.

We'll start by playing the computer-generated element, and progressively work it onto a composite.

1.

Type shake blob.#.iff t 146

This loads up the element for playback.

To place it over a larger background, just use the over command:

2.

Type shake blob.#.iff over bathroom.#.iff t 146

3.

Play the flipbook.

The blob doesn't appear to be positioned properly, so let's move it to a better position with the pan command. But you say to yourself, "Self, I don't know the usage parameter for the pan command." That's OK, because all you need to do is use the help command.

4.

Type shake help pan

Two commands are listed: pan and expand.

For the pan command, we're only interested in the first two parameters, xPan and yPan.

5.

Type shake blob.#.iff pan 85 40 over bathroom.#.iff t 146

6.

Now look at the above image's alpha channel by pressing the A key.

You can see that the bathroom has a previously created mask around the inside of the door. We can use this mask to put the blob guy inside the bathroom by using an inside command before the over.

7.

Type shake blob.#.iff pan 85 40 inside bathroom.#.iff over bathroom.#.iff t 146

The blob is placed inside the bathroom behind the door frame, but it needs a shadow. Next, we are going to add a really fake shadow.

8.

Type shake blob.#.iff pan 85 40 addshadow 33 20 30 0 0 0 .6 inside bathroom.#.iff over bathroom.#.iff t 146

If you feel the need to know the command usage for addshadow, you can use the help command.

How about a little color correction? Maybe the blob should be a sickening green color. You can do this with a reorder command by substituting the green channel for the red channel.

9.

Type shake blob.#.iff pan 85 40 reorder gbga addshadow 33 20 30 0 0 0 .6 inside bathroom.#.iff over bathroom.#.iff t 1 46

Make the blob even greener by using a -mult command.

10.

Type shake blob.#.iff pan 85 40 reorder gbga mult 1 1.2 .6 1 1 addshadow 33 20 30 0 0 0 .6 inside bathroom.#.iff over bathroom.#.iff t 1 46

At this point, the command line is getting pretty ridiculous. So append gui at the end of it. This will create a process tree in the interface, allowing you to continue the composite in a more civilized environment.

11.

Type shake blob.#.iff pan 85 40 reorder gbga mult 1 1.2 .6 1 1 addshadow 33 20 30 0 0 0 .6 inside bathroom.#.iff over bathroom.#.iff t 146 gui

Shake automatically creates a tree from your command-line entries.

The Shake interface is for wimps. Quick, exit before anybody sees you.

12.

Quit the Shake interface.

Launching Scripts from the Command Line

The most efficient way to do loads of rendering is by batch-rendering a script, since you don't need to fire up the interface. All you need to do is navigate to the location of one of your scripts and type shake v exec my_cool_script.shk (where my_cool_script.shk is a script that you create). The exec command executes all FileOuts in the script. Each frame is rendered in turn, and since you typed v, Shake shows you in the Terminal window which frame it is working on and how long each frame takes to render.

Welcome to the fabulous world of command-line Shake. You will no doubt be able to impress your friends with your newfound knowledge.

Note

The saving of scripts is disabled in the trial version of Shake.





Apple Pro Training Series. Shake 4. Professional Compositing and Visual Effects
Apple Pro Training Series. Shake 4. Professional Compositing and Visual Effects
ISBN: 321256093
EAN: N/A
Year: 2005
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net