322 85 1MB
Russian Pages 49 Year 2003
Adobe After Effects
Created by «Frosty» Alexander Lavrov
2003
С
, ,
Adobe After Effects
.Э . ё
,
,
Adobe. , :
1. 2. 3. 4. 5. 6. 7. 8. 9.
Adobe After Effects user guide www.jjgifford.com Э «Adobe After Effects 5.5 Adobe After Effects: Classroom in a book creativecow.net JavaScript aefreemart.com adobe.com CyberMotion Digital Lion ё
, , Adobe After Effects».
windows
mac»
. . 11 «С
manual,
ч
, .
. JavaScript,
.
ё,
.
,
, , ,
(
. . creativecow.net
CyberMotion).
1. .
ё
, .
Adobe After Effects, ?
: Adobe After Effects
,
, .
ё
, Drop Shadow. direction ,
rotation .
,
, . .
Production Bundle .
«Motion Math». ,
,
,
layeraud.mm. JavaScript, , JavaScript
AAE .
,
«Pick
wipe», . Created by «Frosty» Alexander Lavrov
2
С
Adobe After Effects
ч
«С
Adobe After Effects». JavaScript,
ё . JavaScript
AAE «JavaScript: The , web-
.
Definitive Guide», AE .
JavaScript, web, AE Layer, Comp, Footage, Camera
,
. .
2. , ,
Timeline. . ,
. ; ,
Timeline, .
1.
-
Timeline
(
): -
Choose Animation > Add Expression Alt-click (Windows) Option-click (Mac OS) stopwatch ( )
-
Shift+Alt+Ins
AE
, , .
2.
, «Pick wipe» ( ) Timeline.
-
:
. «
-
«Pick wipe»». . . «Н
ё
х
». .
, , .
.
«И
». 3.
-
enter ,
. ,
ё
AE
, ( ).
ё ё
, . ,
. Created by «Frosty» Alexander Lavrov
3
С
Adobe After Effects
, .
\
A. . B. . C. Pick wipe D. E.
(on/off) . ( ).
, ( ).
.
,
. . ( ).
.
,
,
( ). ё .
,
.
ё
.
,
EE
.
, .
Created by «Frosty» Alexander Lavrov
,
4
С
Adobe After Effects
. .
ё
, AE
.
: Convert Expression to Keyframes.
Animation > Keyframe Assistant >
3.
«Pick wipe» «Pick wipe» .
1 rotation , Point of Interest rotation
rotation
, 2,
2,
. position
– .
,
.
«Pick wipe» «Pick wipe», .
, ,
1
rotation
ё
( )
AE
. .
, ,
ё
.
, AE
Э
(1D, 2D, 3D, . . ,
, ,
4D). , , ,
position, ,
.
opacity, . , : : Rotation(°) Opacity(%) : Scale[x=width, y=height], Position[x, y], Anchor Point[x, y] : Scale[width, height, depth], Position[x, y, z], Anchor Point[x, y, z] : Color[red, green, blue, alpha]
1D 2D 3D 4D
«Pick wipe» ,
«Pick wipe»
, .
Created by «Frosty» Alexander Lavrov
5
С
Adobe After Effects
,
, « Dial.aep, . : ,
. 1.
».
:
-
«Light» ,
«Dial» «Dial».
2. 3600. opacity
3. Expression. 4. rotation
«Light».
Animation > Add
«Pick wipe» opacity «Dial». After Effects this_comp.layer("Dial").rotation.
. «Light»
ё Enter
. 5.
. .
,
,
, ,
«Pick wipe» , ,
. Э
0% , rotation
opacity
,
, rotation 00 3600. opacity 3,6 100, opacity , , ,
100%, 1
, .
.
opacity
, rotation. , .
. .
: + (
), - ( ).
(
), * (
), / (
), *-1 :
360 this_comp.layer("Dial").rotation/360*100. , , opacity ё ё
100. ,
DialEdit.AEP rotation.
ё
, . ,
ё
.Э
,
«Pick wipe» , .
1.А ,
CLOCK.AEP
.
. 1.
3 -
2.
(«MinuteHand») («HourHand») («ClockFace») anchor points
Created by «Frosty» Alexander Lavrov
.
6
С
3. rotation
Adobe After Effects
.
«Pick wipe»: .
rotation rotation this_comp.layer("HourHand").rotation. 4. . 5. , 12 . rotation 12. this_comp.layer("HourHand").rotation*12. 2.
,
ё
, x. ,
BLUR.AEP.
, .
1. «BlurSolid». 2. 3.
,
, Fast Blur. Position
.
x.
. 4.
Blurriness
5. 10.
position
Fast Blur position[0]. . , position[0]/10.
3.
x-position. ,
. ScaleBoxes.aep 3 , «Red», «Green», «Blue». «Red».
1. . 2.
, 0
100% 0
2
. 3. ё
scale «Red».
«Green»,
«Pick wipe» scale this_comp.layer("Red").scale. 1 . value_at_time(time-1). : property > value_at_time(t). t time-1. Э «Green» 1 . this_comp.layer("Red").scale.value_at_time(time-1). « Adobe After Effects». scale «Blue» scale «Red». 2 . this_comp.layer("Red").scale.value_at_time(time-2).
,
4.
4. After Effects
. JavaScript .
JavaScript 1.2 ,
,
,
JavaScript. JavaScript. , Created by «Frosty» Alexander Lavrov
.
7
С
Adobe After Effects
, «И
AE.
, ».
ё
JavaScript AE «property», )
«
». (
JavaScript, (
). ,
:
- JavaScript
,
,
«Red»
«red»
-
,
,
,
: 1. comp(“final comp”). 2.
(
,
,
, . .
, ,
,
ё
. Э
Notepad
Simple Text. ё
ё
, ,
ё ,
. ,
, .
ё
: -
.
//
AE : // This is a comment. /*
// .
.
*/
/*
AE
*/
.
: /* This is a multiline comment */
5. , After Effects
JavaScript 1.2 .
. .
– scale
,
«Solid1»
scale position ё , this_comp.layer("Solid1").position
Created by «Frosty» Alexander Lavrov
,
. :
8
С
Adobe After Effects
this_layer.position position , .
, ,
«Solid1»,
«Solid2»,
position
: this_comp.layer("Solid2").position ё
,
.
,
,
«
Adobe After Effects». ,
. : 1. 2. Expression. 3. this_comp 4. Э
position
Animation > Add : position.
position: this_comp –
,
,
. 5.
, «
6.
,
this_comp ».
ё
, this_comp ,
. "layer(index)".
,
. : this_comp.layer(2) 7. »,
«
».
«А .
,
position : this_comp.layer(2).position
, 8.
« »
«А
,
.
,
2 » : this_comp.layer(2).position.value_at_time(time-2) 9. «А » value_at_time(time-2) . . , (+,-,/,*). 10.
ё
». «
, ,
, ,
.
.
,
: x = rotation * 10; [x, 20] [rotation * 10, 20] , Created by «Frosty» Alexander Lavrov
ё
x,
rotation*10. [x, 20].
9
С
ё
Adobe After Effects
, .
. –
,
. : this_comp.layer(1).position this_comp.layer(1).position.value_at_time(time) , «(time)». , », : this_comp.layer(1).position.value_at_time(time-5)
,
«
5
,
,
remapped time. remapped
"source", .
time ,
– remapped time,
, position : comp("nested comp").layer(1).position position, , . layer 1, position remapped time. source.layer(1).position
"source", :
. , ( ,
(
, opacity), , position "bg_color"). position, scale, color)
-,
(
ё -
ё AE
,
.
, .
,
position 2 [x, y]
,
2d, 3 [x, y, z] .
,
. ,
X=10
3d
[10, 20] Y=20,
.
. . - Position[0] - Position[1] - Position[2]
Created by «Frosty» Alexander Lavrov
:
x y z
10
С
AE-
(
Adobe After Effects
Layer, Effect . : layer(1) ,
, window
Mask) ,
Timeline .Э
,
,
,
, ё : effect("Colorama").param("Get Phase From") effect(1).param(5) . , . . ,
. .
.
,
, , .
, 2d
.
3d .
,
,
, rotation
pick whip
scale 2. this_comp.layer(2).scale[0] , .
1
: scale, pick whip
, :
this_comp.layer(2).scale[1] , pick whip scale 2 rotation 1, AE scale rotation. : [this_comp.layer(1).rotation, this_comp.layer(1).rotation] , scale . : [this_comp.layer(1).rotation, 10] ё rotation, 10.
rotation.
6. ,
.Э . ,
AE .
,
. ,
,
, "this_comp"
(Global menu): "this_comp" (.) Comp menu, this_comp.layer(
.
"layer":
Created by «Frosty» Alexander Lavrov
11
С
Adobe After Effects
: this_comp.layer(1) Layer, Light, Camera menu. position,
, 1 "position": this_comp.layer(1).position
. Э
1. .
ё
2.
,
.
7. ,
AE.
ё
. .
. ,
« .
ё
»,
, .
, (0,0) (5,6)- (0,0)=[5-0,6-0]=[5,6]
(5,6). .
(5,6)
ё
Created by «Frosty» Alexander Lavrov
.
12
С
:
1
.
[(2,7), (6,3)]
1
1
Adobe After Effects
2
[(0,0),(2,7)] 2
2.
.
, . .
, [80,
60] - [20, 70] = [60, -10] .
. .
length() ,
.
.
D2=x2+y2 , .
Created by «Frosty» Alexander Lavrov
, ,
D=math.sqrt(x*x+y*y) , .
13
С
Adobe After Effects
Delta.
.
.
1.
, ё point1 point2 point1=this_comp.layer("A").position; point2=this_comp.layer("B").position;
2. delta=sub(point1, point2); X=delta[0]; Y=delta[1]; 3. distance=Math.sqrt(X*X+Y*Y); Э 3d
, .
. length(vector).
length(vector) Adobe After Effects length().
: , .
length(),
:
1. , point1=this_comp.layer("A").position; point2=this_comp.layer("B").position; 2. delta=sub(point1, point2); 3. length(delta);
«
»,
www.jjgifford.com.
. VectorBlur.aep ,
”d”, ”e”)
Created by «Frosty» Alexander Lavrov
Interactive 6 ,
ё :5
(“a”, ”b”, ”c”, (“Drag me”).
14
С
Adobe After Effects
,
ё , 1. scale 2. point1=this_layer.position; point2=this_comp.layer("Drag Me").position;
. «a».
3. delta=sub(point1, point2); 4. distance=length(delta); 5. linear(distance, 0, 80, [250,250], [75,75]); 6.
linear(distance, 0, 80,
[250,250], [75,75]); linear(distance, 0, 80, 10, 0); ё
7.
, . Э , .
=
/ = =
/ /
JavaScript : Math.sin(angle) Math.cos(angle) Math.tan(angle) Э
. -1
/ 1.
,
. . ,
570.
Created by «Frosty» Alexander Lavrov
15
С
Adobe After Effects
ё
AE ,
ё
, ,
, ,
. ,
AE radians_to_degrees(radians) degrees_to_radians(angle) : Math.sin(degrees_to_radians(rotation))
,
:
. .
, ( (
)
). Y
X
,
. ,
.
,
, . .
,
:
1. Trig Circular Motion.aep
Circular -
.
,
, .
,
.
1.
: center=this_comp.layer("Center").position;
2.
.
ё
ё
:
radius= 120; 3. «
.
,
». , time*2.
A -
. ,"
", Pi
2Pi
,
2: , .
angle=time*2; 4.
Created by «Frosty» Alexander Lavrov
:
16
С
Adobe After Effects
x=radius*Math.cos(angle); y=radius*Math.cos(angle); 5.
,
, , :
, . add(center, [x,y]);
2.
. DUBLICATE.AEP , . . ,
,
.
,
, , , . 1. : layer_num=index-1; interval=30; angle=degrees_to_radians(layer_num*interval); , 0°. «Interval» , . layer_num interval, {0, 30, 60...}. degrees_to_radians().Э , Javascript , , 0°, 2. , ,
Timeline. .
,
.
,
{0, 1, 2...} , . - 30°, ,
- 90°
. . :
Animation/Convert Expression to Keyframes. . 3. , center=this_comp.layer("Center").position; radius=80; interval=30; layer_num=index-1; angle=degrees_to_radians(layer_num*interval); x=radius*Math.cos(angle); y=radius*Math.sin(angle); add(center, [x, y]);
«Ц
(Position):
»
, x-
y-
,
. ,
( ,
)
,
. , «
»
Created by «Frosty» Alexander Lavrov
.
ё
,
17
С
,
Adobe After Effects
. «
,
,
,«
».
»
. , «Easy-ease».
. ё
.
,
, -
,
.Э
. :
, –
.
,
,
ё
.
. , ,
, . .
: ,
,
,
, .
-
.
( ,
Created by «Frosty» Alexander Lavrov
)
.
18
С
Adobe After Effects
,
ё ,
.
. Math.sin(time).
. Math.sin(time*6)
,
6
, .
,
+5,
,
5*Math.sin(time)
,
Math.sine(time), –5
–1
+1.
amplitude*Math.sin(angle*frequency)
. , ,
(
) -
,
.
. .
.
. Spring_d.aep ,
Spring
,
.
, .
,
,
. : x=Math.sin(time*3)*60; rest=position; add(rest, [x,0]); : ,
. .
Created by «Frosty» Alexander Lavrov
19
С
Adobe After Effects
(3 60,
)
. :
frequency=3; amplitude=60; x=Math.sin(time*frequency)*amplitude; rest=position; add(rest, [x,0]); ё
, ,
.
. :
ё
. "amplitude=60/time." time=0,
: .
,
.
linear(): amplitude=linear(time, 0, out_point-1, 120, 0); : frequency=10; amplitude=linear(time, 0, out_point-1, 120, 0); rest=position; x=Math.sin(time*frequency)*amplitude; add(rest, [x,0]); ё
,
, .
– MotionMath.
dbspring.mm). Э Application.
(spring.mm Adobe After Effects,
. .
, :
: frequency_one=10; amplitude_one=10; frequency_two=1; Created by «Frosty» Alexander Lavrov
20
С
Adobe After Effects
amplitude_two=30; wave_one=Math.sin(time*frequency_one)*amplitude_one; wave_two=Math.sin(time*frequency_two)*amplitude_two; y=wave_one+wave_two; x=time*32; add(effect("Write-on").param(1), [x, y]); ,
,
. .
,
, . .
: frequency_one=15; amplitude_one=5; frequency_two=1; amplitude_two=10; wave_one=Math.sin(time*frequency_one)*amplitude_one; wave_two=Math.sin(time*frequency_two)*amplitude_two; y=wave_one*wave_two; x=time*32; add(effect("Write-on").param(1), [x, y]); ,
,
. , ,
:
Arcsine, Arccosine Arctangent. , . -
, arcsine(n) ,
, .
-
n.
, ,
,
0°
360°
. .
Created by «Frosty» Alexander Lavrov
21
С
Adobe After Effects
Javascript, , , radians_to_degrees(radians). Math.asin() Math.acos(), -1 1, Adobe After Effects . AE ё : Math.atan() , . Math.atan() , Pi/2 Pi/2. Math.atan2() .
Math.atan2(). -Pi Pi.
. , : temp=opposite/adjacent; angle=Math.atan(temp); , . Math.atan2()
0, AE 90°
,
, , .
,
.
,
ё
-
.
Point_at.aep
Point_at Math.atan2()
, .
,
. : this_point=position; that_point=this_comp.layer("target").position; delta=sub(this_point, that_point); angle=Math.atan2(delta[1], delta[0]); radians_to_degrees(angle); «This_point» ,
«that_point» .
, x- yMath.atan2(),
«delta». delta . radians_to_degrees . ,
y, «that_point»
«This_point» .
delta. x- yMath.atan2(),
y,
Created by «Frosty» Alexander Lavrov
«delta» . radians_to_degrees .
22
С
Adobe After Effects
8.
ё
, . ,
JavaScript. Э
ё
-
, . .
JavaScript – . «IF…..ELSE» ,
ё .
«while»
– .
,
.
. : if ( { else {
) "
"}
"
"} :
1. 2. ) )
if (
). :
-
"
,-
ё if (time < 1) {seed_random(1,true)} else {seed_random(2,true)}
";
"
".
:
, seed_random(1,true).
0,
seed_random 0,
seed_random(2,true).
,
WHILE? ( while( {
ё
). WHILE ) }
Created by «Frosty» Alexander Lavrov
:
23
С
Adobe After Effects
,
(
0). :
1)
(
0
) ;
2)
0
-
. : seg_end_time = 0; i =1; tmin = 5; tmax = 2; while (time >= seg_end_time) {i = i+1; seed_random(i,true); seg_start_time = seg_end_time; seg_end_time = seg_end_time + random(tmin,tmax);} :
seg_end_time,
i = i+1; seed_random(i,true); seg_start_time = seg_end_time; seg_end_time = seg_end_time + random(tmin,tmax); .
seg_end_time,
9.
Adobe After Effects 5.5
5.5 Adobe After Effects .
. , .
Adobe After Effects 5.5 Controls.
6
Expression .
, . .
, ,
. : slider,
, «Springiness».
«Controls».
. spring = this_comp.layer("Controls").param("Springiness"); :
Expression Controls 1. Slider Control ё
0
ё
100.
. 2. Angle Control . Created by «Frosty» Alexander Lavrov
24
С
Adobe After Effects
1. Checkbox Control . 4. Color Control . 5. Point Control . 6. Layer Control
ё ,
.
AE 5.5, . Э
.
, ,
– .
, :
wiggle position. wiggle(5,10) AE 5.0 : position.wiggle(5,10); ё , . : this_comp.layer("OtherLayer").position.wiggle(5, 10);
, .
5.5 .
div(add(pos1, add(pos2, pos3)), 3),
, (pos1 + pos2 +
pos3) / 3.
AE 5.5 Э : 1. loop_in(type = "cycle", num_keyframes = 0) , . ё . ё 2. loop_out(type = "cycle", num_keyframes = 0) , . ё . ё 3. loop_in_duration(type = "cycle", duration = 0) , . ё . ё . 4. loop_out_duration(type = "cycle", duration = 0) , . ё . ё .
Created by «Frosty» Alexander Lavrov
. ё .
. ё ё
ё
25
С
Adobe After Effects
: 1. Cycle
ё . loop_in(type = "cycle", num_keyframes = 20) 2. Pingpong
ё
ё
,
. loop_out(type = "pingpong", num_keyframes = 40) 3. Offset
ё
, ,
4. Continue
ё
.
,
, ,
. , loop_out(type="continue"), 100% . Э
scale 100% «keyframes»
«duration»
.
.Э
,
,
.
,
, wiggle, wiggle(freq, amp, octaves = 1, amp_mult =5, t = time). wiggle . (=) , .
ё
"has_parent()" , .
"has_parent()".
: idx = index; if (has_parent) {idx = parent.index} this_comp.layer(idx).position.wiggle(5, 20)
seed_random() , , seed_random(), seed_random(, true); r = random()
Created by «Frosty» Alexander Lavrov
ё true, 0 1.
.
26
С
Adobe After Effects
".name" After Effects 5.5 Mask, Effect. Э . ,
".name"
Comp, Footage, Layer,
, . wiggle
,
position "hero":
amp = 20; if (name == "hero") {amp = 40;} wiggle(5, amp)
,
.Э
ё
,
ё
, . :
- this_comp.marker(marker_num) .
,
,
100% . mark_time = this_comp.marker(1); linear(time, mark_time - 5, mark_time, 100, 0) - num_keys . - key(idx) .
, key(1)
. key, index
value.
time, value
ё
, .
position.key(3).value ,
,
opacity, . , d = Math.abs(time - nearest_key(time).time); ease_out(d, 0, 1, 100, 0)
.
- marker
marker . Э position , nearest_key num_keys. 1. marker.key(1) 2. marker.key("foo") ё m1 = marker.key("Start").time; m2 = marker.key("End").time; linear(time, m1, m2, 0, 100); Э opacity "Start" "End".
Created by «Frosty» Alexander Lavrov
: key(), :
:
ё
27
С
Adobe After Effects
10. . . . .
,
,
Creative Cow .
CyberMotion, ,
Э
–
,
Э
creativecow.net. , . – ( ), . . , , Drummer. : cymbal comp ( 10 ), r arm comp (
head comp ( 6 drummer.ai ( (
6
), ), l arm comp ( 6
drummer.ai Adobe Illustrator drums.wav, drummer.ai. –
,
markers.aep
), ), main comp drop shadows). drummer.ai. . , .
,
.
, (
).
Null 1
( ),
Null 2 , ,
. . .
head comp, r arm comp, l arm comp, cymbal comp – enable time remap. Э , , . time remap head comp : hit=marker.key(1).time; t=time-this_comp.layer("Null 2").marker.nearest_key(time).time; t+hit . hit head comp. , ( 5). . , , . t Created by «Frosty» Alexander Lavrov
28
С
Adobe After Effects
,
Null 2.
1
head comp
hit. l arm comp cymbal comp : hit=marker.key(1).time; t=time-this_comp.layer("Null 1").marker.nearest_key(time).time; t+hit , . , , Null 1, l arm comp cymbal comp. r arm comp. : hit=marker.key(1).time; t=time-this_comp.layer("drums.wav").marker.nearest_key(time).time; t+hit , drums.wav, r arm comp. (Math.round) ,
.
. – , . : . levels.aep levels_tut. «dial» . … .
rotation , smoother
.
. : random(1,100).
, .
,
, .
. scale «bar 1» : [value[0], this_comp.layer("dial").rotation] value[0] scale, this_comp. scale. layer("dial"). rotation 2 . , 5 . , . math.round math.ceil ( . «С ч Adobe After Effects»). : volume = this_comp.layer("dial").rotation / 20; barheight = Math.round(volume); [value[0], barheight * 20] volume ( rotation 5- . ? "dial") , rotation 20. rotation 100, 5 .
Created by «Frosty» Alexander Lavrov
29
С
(
Adobe After Effects
5).
math.round. .
barheight
volume. … y
scale. ). ,
barheight ,
(
x ,
… Э Э creativecow.net.
. mashine.
mashine.aep
. 3 : piston, crank, wheel. Adobe Illustrator. . wheel piston.
Э
. crank,
crank ,
, (crank).
(piston) . Э
: ,
,
. .
,
, r=length(this_comp.layer("wheel").position,position); Created by «Frosty» Alexander Lavrov
rotation
«crank».
. . :
30
С
Adobe After Effects
( ).
. : l=length(position,this_comp.layer("piston").position); , , . , . , : r=length(this_comp.layer("wheel").anchor_point,position); r=length(from_comp(this_comp.layer("wheel").position),anchor_point); r=length(this_comp.layer("wheel").position,to_comp(anchor_point)); . : l=length(anchor_point,this_comp.layer("piston").position); . , , . , . . « », , . – – r– -
(
),
:
r * sin(A) = d c * sin(B) = d sin(B) = r * sin(A) / c B = arc sin(r*sin(A) / c)
, .
Math.sin .
, Math.PI(
180 rad2deg = 180 / Math.PI; //radians to degrees deg2rad = Math.PI / 180; //degrees to radians : rad2deg = 180 / Math.PI; //radians to degrees deg2rad = Math.PI / 180; //degrees to radians r=length(this_comp.layer("wheel").anchor_point,position); l=length(anchor_point,this_comp.layer("piston").position); !
Math.asin. After Effect PI).
,
. PI
.
…
: B = arc sin(r*sin(A) / c) , : Math.asin(r*Math.sin(this_comp.layer("wheel").rotation*deg2rad)/l)*rad2deg Created by «Frosty» Alexander Lavrov
31
С
Adobe After Effects
,
, .
,
,
. -this_comp.layer("wheel").rotation+ Math.asin(r*Math.sin(this_comp.layer("wheel").rotation*deg2rad)/l)*rad2deg : -1*(this_comp.layer("wheel").rotation+this_comp.layer("crank").rotation) , , , rotation … !!!
Math
math.clamp CyberMotion. (
, ).
, ,
. .
expressions1.aep Meyer_tut.
clamp. .
. : upper_left = [60,60]; lower_right = [260,180]; clamp(this_comp.layer("gizmo").position, upper_left, lower_right) upper_left ( ), lower_right . clamp(this_comp.layer("gizmo").position, upper_left, lower_right) , “CM_sensor_crl.tif” "gizmo", upper_left, lower_right.
If/Then/Else If/Then/Else. CyberMotion. expressions1.aep Meyer_tut. intelligent marker trig. .
Created by «Frosty» Alexander Lavrov
32
С
scale «CP_AlarmClock.tif» scale_value = 0; time_to_marker = time - marker.nearest_key(time).time; if (time_to_marker >= 0) {scale_value = linear(time_to_marker, 0, 0.5, 100, 0)}; [scale_value,scale_value]
Adobe After Effects
:
. scale_value = 0; // cale_value=0 time_to_marker = time - marker.nearest_key(time).time; // time_to_marker, . if (time_to_marker >= 0) // – time_to_marker 0 {scale_value = linear(time_to_marker, 0, 0.5, 100, 0)}; // scale 100 0 0 0,5. [scale_value,scale_value] // , x y scale. , , .
“Full throttle” (
–
while
)
“Deeper modes of expressions” . expressions1.aep Meyer_tut. loop sim. .
while Slider Adobe
«Н ( . After Effects 5.5 »). .
. : step_time = 0.01; total_rot = 0; while (step_time < time) { total_rot += effect("throttle").param("Slider").value_at_time(step_time) / 5; step_time += this_comp.frame_duration; } total_rot . step_time = 0.01; // 0.01 total_rot = 0; // 0 while (step_time < time) // – step_time< ,
,
.
(accumulating numbers). Java Script: « , ,
Created by «Frosty» Alexander Lavrov
, , . Java Script .»
33
С
, += this_comp.frame_duration. : .
+=
Adobe After Effects
step_time .
«add-and-assign» step_time
total_rot += effect("throttle").param("Slider").value_at_time(step_time) / 5; step_time += this_comp.frame_duration; . total_rot total_rot. , gas pedal bar. . y-scale slider «wheel». this_comp.layer("wheel").effect("throttle").param("Slider") . «text & numbers» numbers. numbers slider value/offset/random max this_comp.layer("wheel").effect("throttle").param("Slider") … !!!
11.
«wheel».
Adobe After Effects «С
»,
.
, . JavaScript.
я
this_comp.layer("panel1").rotation+300 // calculates rotation based on panel
ё
,
. .
. «Э ё
». ,
«
,
». .
(this_comp), (layer(“panel1”)), (rotation+300).
Created by «Frosty» Alexander Lavrov
, .
34
С
Adobe After Effects
Y
у = position[1] / this_comp. Height; squash = у * 50; [100 + squash, 100 - squash] я
(
Scale (М
)
. ,
Scale, «
. » (
)
. Y. Э Statement (
).
. (;).
Dot syntax (
).
. .
Comments ( .
).
; (//)
: // Objects (
. ). . -
, Attributes (
, comp
). . , width ( : this_comp.width. . .
layer(«panel1») Methods ( —
).
, ,
-
,
. (
0 Values (
. , Opacity ( 100
) random(100), ), .
).
, (
). , )(
Created by «Frosty» Alexander Lavrov
.
-
)
.
, ,
, ,
. (
)
,
,
Array ( .
After Effects layer, footage, camera.
)
Position
:
35
С
.
Scale (
Adobe After Effects
)
: . : [ ].
,
Vector (
). After Effects
Index (
.
).
, . x:
position[0] . 1.
ё
. , position[0,1].
.
,
,
0.
, y ,
, a position[1] ,
,l
.
(1) ,
Variables ( , ,« radius=20
.
).
,
»
.
, radius
20. .
,
,
, ,
. Operators (
).
,
, .
,
,
,
= ,
.
,
,
; Arguments (
< ( true (
, ) false (
). ),
). .
1
0.
( , Comp(name)
, ,
name
,
-
) .
,
. — .Э
: Comp(”final comp”).
,
this_comp .
,
. Returns (
).
:
« this_comp.layer(«panel1»).rotation Rotation ( ) panel1.
».
,
,
,
(Layer parameters) , «
,
,
. ., ,
».
. ,
,
,
anchor_point Created by «Frosty» Alexander Lavrov
.
2
3 [x, y, (z)]
±
0–
/
36
С
Adobe After Effects
0– 2
position
3 [x, y, (z)]
scale
2 3 [width, height, (depth)]
±
rotation
1
±
opacity
1
orientation ( ё ё )
ё
±100 0–360 ( 0–100
3 [x, y, z]
0-360 (
, ]
ambient diffuse specular shininess
1 1 1 1
(Global objects) ,
) 0–100
±
2[
audio_levels
/
±
)
-192–24
-48–12
0–100 0–100 0–100 0-100
0–100 0–100 0–100 0-100
ё
. ,
,
,
-
,
.
ё this_layer
,
"this_layer.width"
this_comp comp("name") footage("name") time value
"name"
"this_comp.layer(2)." “comp("red").layer(5)” footage("GoldHoney.PSD") “this_comp.layer(1).position.value_at_time(time-5)” "value + 5"
(Vector math methods) Javascript,
-
+, -, /, .
*,
,
,
, . 5.5 (
add(vector1, vector2) sub(vector1, vector2) mul(vector, Number) div(vector, Number) Created by «Frosty» Alexander Lavrov
.
«
AAE 5.5») .
add([80,20],[70,10]) ⇒[80+70,20+10] sub(90,30)⇒ 90-30 mul(50,random(10))⇒ 50*(random(10))
div(gauss_random(50,90),2) ⇒ (gauss_random(50,90))/2
37
С
Adobe After Effects
,
dot(vector1, vector2)
dot(2,random(50))
cross(vector1, vector2)
cross([2,3],[0,0] ) , 1
normalize(vector)
div(v, length(v)) length(5) length(90,30) ⇒ length(sub(90,30)) look_at(position, this_comp.layer(1).position)
length(vector) length(from_point, to_point) look_at(from_point, to_point)
:
(Random number methods) max .
min
90%
,
, 10%
.
. random(max)
0
[random(400),300]
.
random(min, max)
[random(200,500),300]
. max_arr, 0
random(max_arr)
[gauss_random(200,300),300]
. random(min_arr, max_arr)
min_arr
max_arr.
random([100, 200],[300, 400])
. 0 random(max),
.
gauss_random(max)
0
[gauss_random(400),300]
, 10%
gauss_random() .
. gauss_random(min, max)
random(min,max), , -
gauss_random (min, max) 10%
[gauss_random(200,500 ),300]
. max_arr, 0 gauss_random(max_ arr)
. random(max_arr),
[gauss_random(200,300),300]
0 gauss_random (max_arr) 10%
,
. min_arr gauss_random(min_arr, max_arr)
max_arr. gauss_random([100,100],[200,20 0])
. random(min_arr, max_arr), 0
Created by «Frosty» Alexander Lavrov
38
С
seed_random(n) noise(val)
" ,
"
t_min t_max value1 " value2 -
t_max
seed_random(60); random(10,30) add(position, [noise(position)*50])
(Interpolation methods) , ё : . .
. t - "
Adobe After Effects
, gauss_random (min_arr, max_arr) 10% . seed n( ) 0 1. ,
t. t. " ". , value1. Value1 " ". value2. Value 2 value1, ,
, Value2 . t, value1, value2 . 0 1,
linear(t, t_min, t_max, value1, value2)
,
t
t_min, . t
t_max,
"
" ,
Adobe After Effects . Adobe After Effects
t_min
.
value1 value2 t_min
t_max
linear (time, 0, 5, 0, 100)
value1 ease(t, t_min, t_max, value1, value2)
value2 t_min ё
t_max
ease (time, 0, 5, 0, 100)
,
value1 ease_in(t, t_min, t_max, value1, value2)
value2 t_min max ё
t_max
ease_in (time, 0, 5, 0, 100)
value1 ease_out(t, t_min, t_max, value1, value2)
Created by «Frosty» Alexander Lavrov
value2 t_min max ё
t_max
ease_out (time, 0, 5, 0, 100)
39
С
: linear(time, 0, 5, 0, 360) time
0
3600,
5
Adobe After Effects
,
0
. (Rotation) 5
, 360
, .
(Color conversion methods) , . , rgb hsl.
hsl
hsl_to_rgb (hsla)
rgb
4 hsl
А
4
(Comp attributes and methods) , ,
ё layer(index
1
width
1
height
1
duration
1
frame_duration
1
bg_color
4
shutter_phase
0
1 this_comp.shutter_ angle/2 this_comp.shutter_ phase this_comp.num_ layers
1
shutter_phase ё
1 1
pixel_aspect layer(index "name")
.
circumference= width*Math.PI this_comp. height/10 this_comp. duration this_comp.frame _duration*100
1
shutter_angle
num_layers
Layer (other_layer, rel_index)
ё
"name"),
active_camera
shutter_angle
rgb_to_hsl(effect ("Change Color"). param("Color To Change")) hsl_to_rgb (effect ("Colorama"). param("Color To Change"))
rgb
rgb_to_hsl (rgba)
NA (
/ )
this_comp.pixel_ aspect*30
Layer, Light Camera
this_comp.layer ("Solid 1")
Layer, Light Camera
Layer (this_layer, -2)
,
other_layer
Created by «Frosty» Alexander Lavrov
40
С
Adobe After Effects
rel_index
А
(Footage attributes and methods)
footage("1.PSD"). width footage("1.PSD").
width
1
height
1
duration
1
footage("1.mpg"). duration
frame_duration
1
footage("raid.avi"). frame_duration
pixel_aspect
1
А
width
1
height
1 ,
1
out_point
1
has_video
?
has_audio
? ?( )
audio_active ?(
footage("Evil.avi").
pixel_aspect
,
ё
this_layer.width/ 10 this_layer. height /5 this_layer. start_time+60 this_comp.layer ("Camera 1"). in_point+3 this_comp.layer ("Spray"). out_point -20
1
has_video(0)
1
has_audio(1)
1
Active(0)
1
audio_active(1)
) 2[ ,
Property
audio_levels
] index
/ )
1
in_point
layer_active
NA (
(Layer attributes and methods) . , .
-
start_time
height
1
( ё )
parent
Created by «Frosty» Alexander Lavrov
,
,
This_comp. layer(1).audio_ levels Index(4)
position[0] + parent.width
41
С 2
anchor_point
Adobe After Effects
3 [x, y, (z)]
2
3 [x, y, (z)] 2 3 [ , , ( )]
position
scale
( )
This_comp. layer(1).anchor_p oint
position[random (200,300), 100, 50]
Scale[random (100),position]
opacity
1
This_comp. layer(1).opacity
rotation
1
wert=rotation
3 [x, y, z]
X= orientation(0); Y= orientation(1); Z= orientation(2);
orientation
ё
( 3d
)
ambient
,
( 3d
1
)
shininess (
1 3d
)
casts_shadows
( 3d
1
?
)
accepts_shadows
( 3d
1
ё
)
accepts_lights ( 3d )
1
time_remap
time_remap,
1
source mask( ) effect(
Э )
Э -
,
).
(Layer space transform methods) , ( ё
.
-
to_comp (point, t = time)
from_comp
Created by «Frosty» Alexander Lavrov
2
3
to_comp(anchor_point)
2
3
from_comp(this_comp.layer(2).
42
С
Adobe After Effects
(point, t=time)
position)
to_world (point, t=time)
2
3
to_world(effect ("Bulge"). param("Bulge Center")
from_world (point, t=time)
2
3
from_world(this_comp.layer(2). position)
to_comp_vec (point, t=time)
2
3
to_comp_vec([1, 0])
2
3
dir=sub(position, this_comp.layer(2).position); from_comp_vec(dir)
2
3
p1 = effect("Eye Bulge 1"). param("Bulge Center"); p2 = effect("Eye Bulge 2"). param("Bulge Center"); to_world(sub(p1, p2))
2
3
from_world(this_comp.layer(2). position)
from_comp_vec
(point, t=time)
to_world_vec (point, t=time)
from_world_vec
(point, t=time)
А
(Camera attributes and methods) « » , « ». source, effect, mask, width, height, anchor_point, scale, opacity, audio_levels, time_remap, . , , ( . ).
point_of_interest
,
3
zoom
1
depth_of_field
1
focus_distance aperture blur_level active
1 1 1 1
?( )
0-
, 1-
А
(Light attributes and methods) , « ». source, effect, mask, width, height, anchor_point, scale, opacity, audio_levels, time_remap, . , , ( . ). «
point_of_interest
intensity
»
,
3 ё
color Created by «Frosty» Alexander Lavrov
1 4
red,
43
С
Adobe After Effects green, blue,
cone_angle
1
cone_feather
1 1 1
shadow_darkness shadow_diffusion
А
(Effect attributes and methods)
active
param(name)
param(index)
alpha 0 1
1
?
,
, .
1
effect("Bulge").param("Bulge Height")
1
effect(3). param(4)
1.
А
(Mask attributes and methods)
opacity feather
1 ё
2
expansion
1
invert
1
А
this_comp.layer("Solid 1"). mask("Mask 1").opacity this_comp.layer("Solid 1"). mask("Mask 1").feather[0] this_comp.layer("Solid 1"). mask("Mask 1").expansion
(Property attributes and methods)
value value_at_time(t)
velocity velocity_at_time (t)
speed
Created by «Frosty» Alexander Lavrov
.Э
44
С
Adobe After Effects
.
speed_at_time(t)
smooth(width=2, samples=5, t=time)
position.smooth(1, 5) . Width , samples .
,tё . Freq – temporal_wiggle (freq, amp, octaves=1, amp_mult=5, t=time)
wiggle(freq, amp, octaves=1, amp_mult=5, t=time)
, amp , octaves – , amp_mult – amp ,t– ) « » . Freq – , , octaves , amp_mult – amp ,t– )
amp –
loop_in(type = "cycle", num_keyframes = 0) loop_out(type = "cycle", num_ keyframes = 0)
.«
scale.temporal_wiggle(5, .2)
position.wiggle(7, 30, 3)
AE 5.5» >>> «И »
loop_in_duration (type = "cycle", duration = 0) loop_out_duration (type = "cycle", duration = 0)
.
key(index)
position.key(3).value
key, time, index
key(marker_name)
value.
position.key(“Splash”).time
.
nearest_key(time)
nearest_key(t) num_keys
.
Math
Э
JavaScript (JavaScript Math)
.
,
, ,
reference»,
«Motion Math language -
. .
JavaScript. Math –
,
ё
,
«Math». , .
Created by «Frosty» Alexander Lavrov
45
С
:
Math . : Math.PI
Adobe After Effects
,
, , . .
,
max -
. = 1800 ⇒ /2=900
Э
Math.E
,
2.71828.
Math.LN10 Math.LN2 Math.LOG10E Math.LOG2E
,
10
2.30259
,
2.
0.69315
, 10
0.43429
2
1.44270
, PI 3.14159. Э
Math.PI
. 1/2 (
Math.SQRT1_2
0.707)
1/2. , 2
Math.SQRT2
2
1.414
Math.abs(val) Math.acos(val)
Math.abs (-10) (
0
Created by «Frosty» Alexander Lavrov
-
)
-1
1.
46
С
Adobe After Effects
, 0. asin 1
-1 (
-
Math.asin(val)
-
/2
/2
). , 0. atan - /2
.
-
Math.atan(val)
Math.atan2(y,x)
/2 -1
.
,
1,
atan -
X .
. Y -
ё
. , Math.ceil(val)
, . : Math.ceil(1.01)
Math.cos(val)
2. ,
-
-1
1. (
Math.exp(val)
Math.floor(val)
Э
), ,
-
,
, ,
. Math.floor(2.99)
: 2.
Math.log(val) -1.797693134862316 +308 Math.max(val1,val Created by «Frosty» Alexander Lavrov
-
47
С
Adobe After Effects
2)
. -
Math.min(val1,val 2)
Math.pow(val, exponent)
,
2
1
. ,
0.5, Math.round(val)
, , 0.5. Math.round(2.1) // 2 Math.round(2.9) //
,
Math.sin(val) -1
-
1. ,
Math.sqrt(val)
0
Math.tan(val)
-
.
JavaScript, . && || ! == !=
= += -+ *+ /+
Created by «Frosty» Alexander Lavrov
48
С
Adobe After Effects
ё ё abstract boolean break byte case catch char class const continue debugger default delete do double
,
ё
JavaScript. Э
. else enum export extends false final finally float for function goto if implements import in
Created by «Frosty» Alexander Lavrov
instanceof int interface long native new null package private protected public return short static super
switch synchronized this throw throws transient true try typeof var void volatile while with
49