Apple Shake 4 User Manual

Page 912

Advertising
background image

912

Chapter 30

Installing and Creating Macros

Edit the macro in this file. The parameters motionBlur, shutterTiming, and shutterOffset
are declared in the first few lines, and then the assigned default values. The image
input In is also assigned a value of 0, so there is no expected image input when the
macro is created.

image RandomMove(

image In=0,
float motionBlur=0,
float shutterTiming=0.5,
float shutterOffset=0

)
...

3

Modify the behavior of the macro. Each turbulence function has a frequency of 2, for
example, turbulence(time,2). To create a new parameter to modify the frequency, add
the following line (in bold):

image RandomMove(

image In=0,
float frequency = 2,
float motionBlur=0,
float shutterTiming=0.5,
float shutterOffset=0

)
...

4

Now that you have a new parameter, you must substitute it into the macro body
wherever you want that value to apply. Insert the variable into the macro body:

image RandomMove(

image In=0,
float frequency = 2,
float motionBlur=0,
float shutterTiming=0.5,
float shutterOffset=0

)
{

Move2D1 = Move2D(

In,
(turbulence(time,frequency)-.5)*20,
(turbulence(time+100,frequency)-.5)*20,
(turbulence(time+200,frequency)-.5)*10,
1,
turbulence(time+300,frequency)/2+.75,
xScale,
0, 0,
...

5

Save the file.

6

To see the results of the modification, restart Shake.

Advertising