effect spotter
TRANSCRIPT
-
8/12/2019 Effect Spotter
1/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 1
The jit.qt.effect Spotter
Jit.qt.effect is a wrapper for the video effects built into Quicktime. These are the thingsyou can do in iMovie, and the real time effects available in Final Cut. Since the effects
are quite varied, stuffing all of them into a single object has made their use seemcomplex, but that is only if you want to swap effects around. Once you have decidedwhat you want, setting up a single effect is pretty straightforward.
Effect List
You can get a list of the effects available by sending the geteffectlist message. This isnecessary because hundreds of programmers in Cupertino are working every day to addmore. Every time you update Quicktime, new effects may appear. Heres whatsavailable in version 6:0, none
1, alpha_compositor
2, alpha_gain3, blur
4, brightness_and_contrast
5, channel_compositor
6, chroma_key
7, cloud
8, color_style
9, color_tint
10, colorsync
11, cross_fade
12, edge_detection
13, emboss
14, explode
15, film_noise
16, fire
17, general_convolution
18, gradient_wipe
19, hsl_balance
20, implode
21, iris
22, lens_flare
23, matrix_wipe
24, push
25, radial
26, rgb_balance
27, ripple28, sharpen
29, slide
30, traveling_matte
31, wipe
32, zoom
-
8/12/2019 Effect Spotter
2/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 2
You load one of these into jit.qt.effect with a loadeffect message and the number of theeffect. The effects list includes an effect code (four letter word) that can be used with the@fx attribute as an argument to jit.qt.effect to load the effect as the patch opens.
Parameters
Once you have loaded an effect, you can get the parameter descriptions with thegetparamlist message. For instance, effect 1 is Alpha Compositor, which is more or lessthe same as jit.alphablend. It returns this param list which shows number, effect name,effect code, tween flag, data type and other information, such as the range of usefulvalues.
0, blend_mode bMod 1 enum 1 straight_alpha 2 pre-multiply_alpha 3 reverse_alpha
1, pre-multiply_color pMul 1 rgb "rgb range"
To translate, parameter 0 is blend mode, which enumerates 3 options:1. straight alpha1.
pre multiply alpha1. reverse alpha
Parameter 1 is the RGB color to calculate with if param 0 is set to 2.
Data types are mostly taken care of by jit.qt.effect. You need to pay attention to the enumnumbers, because they often skip around.RGB types respond to a list of three numbers from 0 to 255. Other numbers will beeffective in the range given.
Figure 1 shows a patcher that is useful for playing with jit.qt.effects. Some effects mayrequire other operationsyou need to provide an alpha channel for alpha compositor,
and a sukah over the pwindow is useful for the chromakey effect.
The pak param object is used to set parameters. When you actually build a patch, youlluse a message like [param 0 $1] attached to suitable controls.
The dialog message opens a standard apple dialog that lets you look at effects quickly.The settings dont take effect in your patch until you click an OK button. You can savethese settings to a .qfx file and load them into the object with qfx_read.
-
8/12/2019 Effect Spotter
3/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 3
Figure 1.
Tweening
Some parameters can be tweened. This is an automatic transition from state A to stateB. After hitting B, the effect snaps back to A and repeats. The param_a message sets thestarting point and param_b sets the end. The steps message sets the number of frames thetransition will take. Figure 2 shows how to add tween controls.
Figure 2.
The Jitter tutorial covers jit.qt.effects pretty thoroughly. You can find the details of theeffects on the Apple website:
-
8/12/2019 Effect Spotter
4/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 4
http://developer.apple.com/documentation/QuickTime/REF/refEffects.1.htmThe links to the effects are listed way down the page under QuickTime Video Effects.This is just a spotters guide.
# Effect Parameters1 alpha_compositorBlends imagesaccording to thealpha channel of theleft source.
See Note 1.
0, blend_mode
1 straight_alpha
2 pre-multiply_alpha
3 reverse_alpha
1, pre-multiply_color
2 alpha_gain
Modifies the alphachannelgood witheffect 1.
0, bottom_pin 0-255
1, top_pin 0-2552, gain 0. 100.
3, offset -255 -255
3 blurSeveral types ofconvolution
See Note 2.
0, amount_of_blurring 3 5 7 9 11 13
15
1, brightness 0.-1
(not in all versions)
4 brightness_and_contrast
0, brightness -100-100
1, contrast 100-100
-
8/12/2019 Effect Spotter
5/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 5
5 channel_compositorMix & Matchchannels(I wasnt able to getthe param message
to work with this,but the dialogworks.)
0, alpha chan
1, red chan
2, green chan
3, blue chan
0 1 2 3
left A R G B
16 17 18 19right A R G B
32 33 34 35
left ARGB inverted
48 49 50 51
left ARGB inverted
6 chroma_keyReplaces pixels of agiven color withpixels from the rightinput.
0, color key rgb
7 cloudGenerates this prettyimage.
0, cloud_color rgb
tweenable
1, background_color rgb
tweenable
2, rotation 0. 360
tweenable
8 color_styleSolarization andPosterization: Seenote 3.(Test withcolorswatch.pict)
0, solarize_amount 0-8
tweenable
1, solarize_point 0-255
tweenable
2, posterize_amount 0 32
tweenable
-
8/12/2019 Effect Spotter
6/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 6
9 color_tintConvert to grayscale,then tint.Use type 100 forcustom setups.
Params 3 and 4affect grayscaleimage before tinting.Param 5 fades fromcolored (0.0) to tint(1.0)
0, tint_type
1 black_and_white
2 xray
3 sepia
4 cobalt
100 use params 1-5
1, light_color f rgb tweenable
2, dark_color rgb
tweenable
3, brightness
-255 255 tweenable
4, contrast
-128 128 tweenable
5, tint_amount 0. 1.
tweened
10 colorsyncMatches displayed
images to publishedprofiles.
Not available in jitter 0, source_profile1, destination_profile
2, matching_option
11 cross_fade 0, percentage 0. 1.0tweened
12 edge_detectionUses a convolutionto emphasize theedges of the image.See Note 2.
0, edge_thickness 3 5 7 9 11 13 or 15
1, colorize_result
0 color
1 gray
13 embossSee Note 2.
0, emboss amount
3 5 7 9 11 13 or 15
-
8/12/2019 Effect Spotter
7/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 7
14 explodeA through the holetransition form leftinput to right input.
0, percentage 0. 1.
1, x center -2. 2.
2, y center -2. 2.
15 film_noiseSee Note 4.
0, hair_density 0 -50
1, hair_length 0-50
2, scratch_density 0-25
3, scratch_duration 1-50
4, scratch_width 1-20
5, dust_density 0-50
6, dust_size 0-25
7, film_fading
1 none2 sepia_tone
3 black_and_white
4 faded_color_film
5 1930's_color_film
16 fireAnother prettyimage generator.See note 5.
0, spread_rate 0-25
1, sputter_rate 1-64
2, water_rate 1-256
3, restart_rate 0-32
17 general_convolutionWrite your ownconvolution matrix.Cells are:
1 2 34 5 67 8 9
See Note 2.
0, cell_1 -10. 10.
1, cell_2 -10. 10.
2, cell_3 -10. 10.
3, cell_4 -10. 10.
4, cell_5 -10. 10.
5, cell_6 -10. 10.
6, cell_7 -10. 10.
7, cell_8 -10. 10.
8, cell_9 -10. 10.
-
8/12/2019 Effect Spotter
8/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 8
18 gradient_wipeTransition from oneimage to another bya vertical wipe. Youcan get a matte
shape (any pict) viathe dialog.
0, percentage 0.-1.
1, matte (not available)
2, edge_blur 0-255
19 hsl_balanceAdjust Hue,saturation and level.
0, hue -60 60
tweenable
1, saturation 0 200
tweenable
2, lightness 0 200
tweenable
20 implodeTransition bysucking left imageinto right.
0, percentage 0. 1.
tweened
1, x xcnt -2. 2.
tweened
2, y ycnt -2. 2.
tweened
21 irisAssorted iris typetransitions
To get randomchoice of type,reload the effect andset 409 or 501 fortype.
0, percentage 0. 1.tweened
1, wipe_type
101 rectangle
102 diamond
103 triangle
104 triangle_right
105 triangleupside_down
106 triangle_left
107 arrowhead
108 arrowhead_right
109 arrowhead_upside_down
110 arrowhead_left
111 pentagon112 pentagon_upside_down
113 hexagon
114 hexagon_side
119 circle
120 oval
121 oval_side
122 cat_eye
123 cat_eye_side
-
8/12/2019 Effect Spotter
9/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 9
124 round_rect
125 round_rect_side
127 4_point_star
128 5_point_star
129 6_point_star
130 heart
131 keyhole 409 random_effect
502 random_iris
2, horizontal_repeat 1-9
3, vertical_repeat 1-9
4, border_width 0.-20.
5, border_color rgb
6, soft_edges 0 or 1
22 lens_flareYou need to set thisup in the dialog,save the setting as a
.qfx file, then bringit in with a qfx_read.This gets around thelack of image typesupport (param 4) injitter 1.2
0, size 1.-20.
tweenable
1, brightness 0.-1.
tweenable
2, x xcnt -2.-2.
tweened3, y ycnt -2.- 2.
tweened
4, flare_image(na)
5, type ftyp
1 spot
2 round_spot
3 reverse_spot
4 reverse_
round_spot
5 star_burst
6 polygon
6, color rgb
7, brightness 0.-2.
8, size 0.-1.
9, position -2.-2.
10, offset 0.-2.
11, solid (portion that wont fade)
0. 2.
12, anamorphic
0 or 1
13, number 1-20
14, count 1-50
15, seed 0-1000
23 matrix_wipe
More transitionsPercentage is alwaystweened, other singlenumber params aretweenable.
0, percentage 0.- 1.
1, wipe_type 301 horizontal_matrix
302 vertical_matrix
303 top_left_diagonal_matrix
304 top_right_diagonal_matrix
305 bottom_right_diagonal_matrix
306 bottom_left_diagonal_matrix
310 clockwise_top_left_matrix
311 clockwise_top_right_matrix
-
8/12/2019 Effect Spotter
10/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 10
312 clockwise_bottom_right_matrix
313 clockwise_bottom_left_matrix
314 cnter_clockwise_top_left_matrix
315 cnter_clockwise_top_right_matr
316 cnter_clockwise_bot_right_matr
317 cnter_clockwise_bot _left_matr
320 vertical_start_top_matrix 321 vertical_start_bottom_matrix
322 vertical_start_top_opposite_ma
323 vert_start_bottom_opposite_ma
324 hor _start_left_matrix
325 hor _start_right_matrix
326 hor _start_left_opposite_matrix
327 hor_start_right_opposite_matrix
328 double_diagonal_top_right_matr
329 double_diagonal_bot_right_matr
340 double_spiral_top_matrix
341 double_spiral_bottom_matrix
342 double_spiral_left_matrix
343 double_spiral_right_matrix 344 quad_spiral_vertical_matrix
345 quad_spiral_horizontal_matrix
350 vertical_waterfall_left_matrix
351 vertical_waterfall_right_matrix
352 horizontal_waterfall_left_matrix
353 horizontal_waterfall_right_matrix
409 random_effect 504 random_ma
2, horizontal_repeat 1- 9
3, vertical_repeat 1- 9
4, border_width 0.-20.
5, border_color rgb
6, soft_edges 0 or 1
24 push 0, percentage 0. 1. tweened
1, push_from from
1 top
2 right
3 bottom
4 left
25 radial
More transitionsPercentage is alwaystweened, other singlenumber params aretweenable.To get randomchoice of type,reload the effect and
0, percentage 0.-1.
1, wipe_type
201 rotating_top
202 rotating_right
203 rotating_bottom
204 rotating_left
205 rotating_top_bottom
206 rotating_left_right
207 rotating_quadrant
211 top_to_bottom_180
212 right_to_left_180
-
8/12/2019 Effect Spotter
11/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 11
set 409 or 501 fortype.
213 top_to_bottom_90
214 right_to_left_90
221 top_180
222 right_180 223 bottom_180
224 left_180
225 counter_rotating_top_bottom
226 counter_rotating_left_right 227 double_rotating_top_bottom
228 double_rotating_left_right
231 v_open_top 232 v_open_right
233 v_open_bottom 234 v_open_le
235 v_open_top_bottom
236 v_open_left_right
241 rotating_top_left
242 rotating_bottom_left
243 rotating_bottom_right
244 rotating_top_right
245 rotating_top_left_bottom_right
246 rotating_bottom_left_top_right
251 rotating_top_left_right 252 rotating_left_top_bottom
253 rotating_bottom_left_right
254 rotating_right_top_bottom
261 rotating_double_center_right
262 rotating_double_center_top
263 rotating_dble_center_top_botto
264 rotating_double_center_left_rig
409 random_effect
503 random_radial
2, horizontal_repeat 1-9
3, vertical_repeat long 1-9
4, border_width 0.-20.
5, border_color rgb
6, soft_edges 0 or 1
26 rgb_balance 0, red 0-200 tweenable
1, green 0-200
tweenable
2, blue 0-200
tweenable
-
8/12/2019 Effect Spotter
12/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 12
27 rippleUse the dialog tochoose a mask (anypict) and save as .qfx
0, ripple_mask (NA)
28 sharpenFix those fuzzyphotos another usefor the convolutionset.See Note 2.
0, amount_of_sharpening
3 5 7 9 11 13 15
29 slideA simpler transition.The angle is indegrees. Trytweening it with avalue of 360!
0, percentage 0. 1.
tweened
1, angle 0. 2880.
tweenable
30 traveling_matte This one crashes jitter 1.2! 0, matte type 1 normal
2 inverted
3 gradient
1, percentage pcnt 0 fixed 0. 1.
2, edge_blur fuzz 2 long 0 255
31 wipeAll parametersexcept 1 aretweenable.To get randomchoice of type,reload the effect andset 409 or 501 fortype.
0, percentage 0. 1.
tweened
1, wipe_type
1 slide_horizontal
2 slide_vertical
3 top_left
4 top_right
5 bottom_right
6 bottom_left
7 four_corner
8 four_box
21 barn_vertical
22 barn_horizontal
23 top_center
24 right_center
25 bottom_center
-
8/12/2019 Effect Spotter
13/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 13
26 left_center
41 diagonal_left_down
42 diagonal_right_down
43 vertical_bow_tie
44 horizontal_bow_tie
45 diagonal_left_out
46 diagonal_right_out 47 diagonal_cross
48 diagonal_box
61 filled_v
62 filled_v_right
63 filled_v_bottom
64 filled_v_left
65 hollow_v
66 hollow_v_right
67 hollow_v_bottom
68 hollow_v_left
71 vertical_zig_zag
72 horizontal_zig_zag
73 vertical_barn_zig_zag 74 horizontal_barn_zig_zag
409 random_effect
501 random_wipe
2, horizontal_repeat 1 9
3, vertical_repeat 1 9
4, border_width 0. 20.
5, border_color rgb
6, soft_edges 0 or 1
32 ZoomOne last transition.All params excelpt 1
are tweenable.
0, percentage 0.-1.
1, zoom_type
1 zooming_b_over_a
3 zooming_b_over_zooming_a
5 zooming_a
2, x xcnt -1. to 1.
3, y ycnt -1. to 1.
4, distance 1. to 9.
-
8/12/2019 Effect Spotter
14/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 14
Notes:
Note 1 Alpha Compositor
Premultiply changes the output color in a complex way:
R = R_param1 * (1 Ac) + temp1 * AcG = G_param1 * (1 Ac) + temp2 * AcB = B_param1 * (1 Ac) + temp3 * Ac
WhereAc = Alpha_right + (1- Alpha_right) * Alpha_leftTemp1 = (Alpha_left * R_left + Alpha_right*R_right)/AcTemp2 = (Alpha_left * G_left + Alpha_right*G_right)/AcTemp3 = (Alpha_left * B_left + Alpha_right*B_right)/Ac
Note 2. ConvolutionBlur, sharpen and other effects use convolution. This process uses a matrix like
1.0 0.0 0.0
0.0 0.0 0.0
0.0 0.0 1.0
The value for a pixel is replaced by multiplying it and its neighbors by the numbers in thecorresponding matrix cells and adding them together. Most of the convolution matrices inquicktime are prebuilt and referred to by a number 3 5 7 9 11 13 or 15.
Note 3 Color Style
Solarization - adjusts the color balance of the source by constructing a table ofreplacement color values from two parameters. These parameters are the maximum colorintensity and the peak point of the color spread. The table starts at zero intensity andincreases to the maximum intensity at the peak point. After that it falls back to zero.Forexample, if the color values range from 0 to 255, the maximum intensity is 5 and the peakpoint is at 150, the resulting table's profile will look like:
-
8/12/2019 Effect Spotter
15/15
Jit.qt.effect spotting
Peter Elsea 5/13/05 15
Posterization - reduces the number of colors in an image by replacing all pixels whosecolor is in a consecutive range with the middle color from that range. This produces a"color banding" effect.[Ripped fromdeveloper.apple.com/documentation/QuickTime/REF/refEffects.49.htm#pgfId=29673]
Note 4. Film Noise
Film Noise adds these artifacts:Hairs. These are a simulation of hairs lying on the surface of the film. Each hair israndomly generated, and is colored in a randomly chosen shade of light grey.
Scratches. These are vertical or near-vertical one-pixel lines drawn onto the destinationimage that simulate scratches in the film. Each scratch lasts for a pre-calculated length oftime. During its lifespan the scratch's position is randomly perturbed. Shortly before thescratch is removed, it will begin to shorten. The color of the scratches is a randomly
chosen shade of light grey.
Dust. These simulate dust particles on the surface of the film. Dust particles are drawnusing the same algorithm that generates the hairs, but the particles are more tightlycurled, and drawn in a darker shade of grey.
Film fade. This simulates an overall change in the color of the film stock. Every pixel ofthe source image is passed through the film fade algorithm, so this can be processor-intensive.[developer.apple.com/documentation/QuickTime/REF/refEffects.50.htm#pgfId=23636]
Note 5. Fire
These are the Fire parameters:Spread rate--How quickly the fire expands to its highest level from its starting point.The higher the value, the more quickly the fire starts up and reaches its maximum burnrate.
Sputter--How quickly the flames die down as they move up the screen. Low numbersresult in very tall flames, high numbers in very low flames.
Water rate--How often "water" is tossed on the base of the fire, instantly putting out the
fire at that point. High numbers result in a fire that's very broken up (i.e. many areas ofburning and non-burning) while lower numbers result in a wider, smoother fire.
Restart rate--How often entire fire is put out, then allowed to restart.[developer.apple.com/documentation/QuickTime/REF/refEffects.51.htm#pgfId=42148]