This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathanimation.html
2120 lines (2119 loc) · 85 KB
/
animation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<!-- Creation date: 01/03/02 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>animation.html</title>
<meta name="Author" content="Julian MacDonald">
</head>
<body style="background-color: rgb(248, 232, 158);">
<font face="tahoma" size="2">
</font>
<div align="left"><font face="tahoma" size="2"><a href="rendering.html"><b><font size="4">Previous:
Rendering</font></b></a></font></div>
<div align="right"><font face="tahoma" size="2"><a href="scripting.html"><b><font size="4">Next:
Scripting</font></b></a></font></div>
<font face="tahoma" size="2">
<font face="tahoma" size="6"><strong>6. Animation</strong></font>
<img src="man_title_small.jpg" align="middle"><br><br>
<br>
<br>
<br>
This chapter explores the ways that Art of Illusion allows the creation
of animations. The tools available
are flexible enough to allow high quality 3D animations to be created
in an efficient way.<br>
<br>
Please note that the example animations are only simple examples of
what Art of Illusion is capable of
to demonstrate specific aspects. Also note that in order to keep the
file to a reasonable size, animations have had to be highly compressed
to gif images and thus their quality is far lower than that
actually achieved with Art of Illusion.
<br>
<br>
<a name="score"><strong><font color="#3300cc" size="5">6.1 The Score</font></strong></a><br>
<br>
Like many other 3D animation programs, Art of Illusion handles
animations through a score or timeline on
which various actions can be defined. Each object can have a range of
different tracks which run along
the score and which control various parameters such as position,
orientation, scaling as well as more
complex controls using skeletons. These will be looked at in detail in
the next few sections.<br>
<br>
<br>
<a name="score_layout"><strong><font color="#ff6633" size="4">6.1.1 The Score Layout</font></strong></a><br>
<br>
Let's look at the layout of the score in more detail:<br>
<br>
<table>
<tbody>
<tr>
<td><font face="tahoma" size="2">This
is what the score looks like. It can be viewed by selecting <b>Animation
-> Show Score</b> from the
top menu bar, or by grabbing the drag bar at the very bottom of the window and
moving it up. The scale along the top shows the time in seconds. Down
the left hand side is a list of
currently selected objects together with their animation tracks, if
any. In this example, there is an
object called 'hand' which has position and rotation tracks. </font></td>
<td><img src="animation/anim_score.jpg"></td>
</tr>
</tbody>
</table>
The vertical green line shows the time position currently viewed in the
view windows. As this is dragged along, the objects in the scene are
updated to reflect their actual position in the animation sequence. The
position in the animation can also be controlled from the block of
commands in the
<b>Animation</b> menu:<br>
<img src="animation/anim_frame_control.jpg"><br>
<br>
The diamond symbols shown on the tracks indicate that a particular
position or orientation has been defined at this point in time. Such
positions are called 'keyframes' and details are given in the <a href="#keyframes">next
section</a>.<br>
<br>
Apart from the score itself, there are 5 other buttons on the right
hand side of the screen as shown below:<br>
<img src="animation/anim_score_icons.jpg"><br>
<br>
The top button gives the view we have just looked at. The next 2
buttons present the information in a different way; using curves
showing the change in the various parameters such as position, rotation
etc.
For the example above, clicking on the upper of the curve views and
selecting the 'position' track gives
the following display:<br>
<img src="animation/anim_score_curve.jpg"><br>
Here, the position of the object in the <font color="#0000ff">x</font>,
<font color="#008000">y</font> and <font color="#ff0000">z</font> axes is plotted against time.
For this particular example, x changes
from about 0.75 to -0.3 units as the time goes from 0 to 1 second.<br>
<br>
If more than one track is selected, then the curves are drawn on the
same set of axes in this mode. If
the second plot mode is selected with the <img src="animation/anim_mult_curve.jpg"> button, however, then
curves
from each track would be displayed on separate graphs. This is more
sensible if different types of track
are selected as the values are likely to be very different, e.g.
position values may be a few units as opposed to rotation values which
are likely to be at least tens of degrees.<br>
<br>
The bottom two buttons from this group are for switching between an
editing mode and a mode for altering
the vertical and horizontal scales on the score.<br>
<br>
The upper button <img src="animation/anim_edit_button.jpg">
is the editing mode which allows keyframes or curve points to be
selected and moved. Simply click on
any point to select it and drag to move it. Multiple points are
selected by pressing <shift> while
clicking on each point. The selected group can then be moved.<br>
<br>
The lower button <img src="animation/anim_scale_button.jpg">
allows the score axes to be scaled and moved. When selected, dragging
left and right with the mouse LMB moves the horizontal axes and
dragging up and down moves the vertical axes.
The axes are scaled by holding <shift> and dragging left
and right or up and down. These controls
can also be affected without clicking this button; holding the right
mouse button while dragging left/right
on the score allows the score to be moved and if <shift>
is held down as well, the score can be scaled.
The mouse wheel can also be used to move the score along left and right.<br>
<br>
<br>
<br>
<a name="keyframes"><strong><font color="#ff6633" size="4">6.1.2 Keyframes</font></strong></a><br>
<br>
Animation in Art of Illusion works by defining certain key actions,
e.g. moving an object to a certain
position, defining a particular skeleton pose etc., at specific points
in time. These points are called
keyframes. Having defined these, the program will calculate the
positions, poses etc. in between the keyframes
automatically by interpolation.<br>
<br>
Keyframes are generally set by moving the green time marker to the
appropriate time, changing the particular property of the object, e.g.
its position, orientation etc., and then selecting <b>Animation
-> Keyframe Modified Tracks of Selected Objects</b>.
Alternatively, a keyframe can be produced at any time position for a
particular track by selecting the track(s) and clicking on <b>Animation
-> Keyframe Selected Tracks</b>.<br>
<br>
Once a keyframe has been created, it can be selected by clicking on it
and edited through this block in the <b>Animation</b> menu:<br>
<img src="animation/keyframe_menu.jpg"><br>
<br>
<b>Edit Keyframe</b> allows various parameters relating to
the keyframe to be altered. The actual options
depend on the type of track so more details are given in the various
track sections later in this
chapter.<br>
<br>
<b>Delete Selected Keyframes</b> removes all currently
selected keyframes.<br>
<br>
<b>Bulk Edit Keyframes</b> allows the editing of a group of
keyframes as follows:<br>
<br>
</shift>
<table>
<tbody>
<tr>
<td><img src="animation/move_keyframes.jpg"></td>
<td><font face="tahoma" size="2"><b>Move..</b>
allows a block of keyframes to be moved to another point in time. The
dialogue on the left is displayed. The operation can be applied to <b>All
Tracks</b>, <b>All Tracks of Selected Objects</b> or
<b>All Selected Tracks</b>.<br>
<br>
You can then specify the time points between which you want keyframes
to be moved from and the time
you want to move them to. Note: any existing keyframes in the region
that is copied to, will be overwritten.<br>
<br>
<b>Copy ..</b> is similar to <b>Move ..</b>
but the original keyframes are retained as well as new ones
created at the copy to position. </font></td>
</tr>
</tbody>
</table>
<br>
<table>
<tbody>
<tr>
<td><img src="animation/anim_resize_keyframes.jpg"></td>
<td><font face="tahoma" size="2"> <b>Rescale..</b>
allows keyframes between a specified range to be rescaled in respect of
time. In this example,
the keyframes between 0.4 and 1.0 seconds are rescaled by a factor of
0.5 which compresses the keyframes
so that they happen in half the time.<br>
<img src="animation/anim_scale_ex.jpg"> </font></td>
</tr>
</tbody>
</table>
<br>
<table>
<tbody>
<tr>
<td><img src="animation/loop_keyframes.jpg"></td>
<td><font face="tahoma" size="2"> <b>Loop..</b>
allows keyframes between a specified range to be repeated a defined
number of times.
The dialogue allows entry of the range and the number of loops. The new
keyframes are then added to
the end of the range specified as in the example below:<br>
<img src="animation/loop_ex.jpg"> </font></td>
</tr>
</tbody>
</table>
<br>
<b>Delete..</b> simply deletes the range of keyframes that
you specify.<br>
<br>
<br>
</font><font face="tahoma" size="2">
Keyframes can be edited by double-clicking them on the score or by
selecting the keyframe from the Pose track and clicking on <b>Animation
-> Edit Keyframe</b>. This will display a dialogue which
depends
on the object being controlled by the track.<br>
</font><br>
<font face="tahoma" size="2">
<br>
<a name="tracks"><strong><font color="#3300cc" size="5">6.2 Adding and Editing Tracks</font></strong></a><br>
<br>
This section looks in detail at the types of track that can be set up
for each object in the scene.
To add a new track to an object, select it and click on <b>Animation
-> Add Track to Selected Objects</b>.
This enables a range of different tracks to be added:<br>
<img src="animation/tracks_menu.jpg">
<br>
The order of the tracks for each object is important as the effect of
each track on the object is calculated from the bottom up. Tracks can
be moved within the list by clicking and dragging in the
same way as objects can be moved in the <a href="layout.html#object%20list">Object List</a>.<br>
<br>
<a name="track weight">Each </a>object can have
several tracks of the same type. In this case, a <b>Weight</b>
can be defined for each track to define its relative influence. This
weight can itself vary with time by setting values
at specific keyframes. The <b>Weight</b> track is found by
clicking on the <img src="animation/right_arrow.jpg">
to the left on the appropriate track name in the list.<br>
<br>
Once created, tracks can be edited, deleted, duplicated and temporarily
enabled/disabled either by clicking the
right mouse button over the relevant track in the list on the score or
via the bottom section of the
animation menu.<br>
<br>
<a name="rigid_tracks"><strong><font color="#ff6633" size="4">6.2.1 Basic Rigid
Transformation Tracks</font></strong></a><br>
<br>
This refers to tracks that alter the object's position and orientation
without any geometric distortion of the
object, i.e. <b>Position</b> and <b>Rotation</b>
tracks.<br>
<br>
<b><font size="4">POSITION TRACKS</font></b><br>
<br>
To set up a basic Position Track, select the object and choose <b>Position
-> XYZ (One Track)</b> from the <a href="#tracks">list
of tracks</a> in the
<b>Animation</b> Menu. At the most basic level, all you
need to do is to move the green time marker on the
score to the relevant point in time, move the object to the position
you want it in at that time and then
select <b>Animation -> Keyframe Modified Tracks of
Selected Objects</b>. This will produce a diamond
keyframe at the required position on the score. Repeat this process for
other points in time as required.<br>
<br>
This is a simple example of a cube being translated in the z-axis with
only 2 keyframes defined as shown in the keyframe and plot views below
right resulting in the animation below:<br>
<br>
<img src="animation/anim_pos_ex.jpg"><img src="animation/box_position.gif" align="top"><br>
<br>
<a name="pos_track_op"><b><font color="#3393d2">POSITION
TRACK OPTIONS</font></b></a><br>
<br>
There are some options available for Position tracks. To bring up the
Track Options dialogue, either
double-click on the track name on the score or select the track and
click on <b>Animation -> Edit Track</b>.
This will display a dialogue box similar to that below:<br>
<br>
<table>
<tbody>
<tr>
<td><img src="animation/position_track_opt.jpg"></td>
<td><font face="tahoma" size="2">At the
top is the <b><font color="#3393d2">Track Name</font></b>
which can be altered to anything you like.<br>
<br>
Next is the <b><font color="#3393d2">Smoothing
Method</font></b>. To understand this better, let's add
another keyframe to the above
animation. Move the time marker to 0.5 secs, select the position track
and click on <b>Animation ->
Keyframe Selected Tracks</b>. Note that in this situation, <b>Keyframe
Modified Tracks of Existing
Objects </b>wouldn't have worked because the position of the box
at this point is no different than it was before. Having created the
keyframe, we can go to the plot view in edit mode and move the new
point
as shown below:<br>
<table>
<tbody>
<tr>
<td><img src="animation/anim_pos_smooth_ex1.jpg"></td>
<td><font face="tahoma" size="2">As
can be seen, the curve through the points is smooth and passes through
all the points. That is
because the default smoothing method is 'interpolating'. The other
choices for the <b>Smoothing Method</b>
are: <img src="animation/track_smoothing_options.jpg"> </font></td>
</tr>
</tbody>
</table>
</font></td>
</tr>
</tbody>
</table>
<br>
The other <b><font color="#3393d2">Smoothing Methods</font></b>
produce the following curves:<br>
<table>
<tbody>
<tr>
<td><img src="animation/anim_smooth_methods.jpg"></td>
<td><font face="tahoma" size="2">In
terms of the effect on the animation, <b>Interpolating</b>
and <b>Approximating</b> produce a gradual deceleration of
the box. With <b>Approximating</b> method, both velocity
and acceleration
are continuous whereas the acceleration changes discontinuously with <b>Interpolating</b>.
This
results in a smoother animation for the <b>Approximating</b>
method.<br>
<br>
<b>Discontinuous</b> produces a sudden change in
position.<br>
<br>
<b>Linear</b> produces a box moving at constant speed
up to the second keyframe, then a slower constant speed to the final
position.<br>
<br>
All have their uses in different situations. </font></td>
</tr>
</tbody>
</table>
<br>
<b><font color="#3393d2">Track Mode</font></b>
is either <b>Absolute</b> or <b>Relative</b>.
Absolute means that the object position is calculated as displacements
from the origin (0,0,0). Relative mode is where the values are
displacementsfrom the result of the tracks beneath it in the list.<br>
<br>
<table>
<tbody>
<tr>
<td><font face="tahoma" size="2">For
example, we can add a Position track to the animation above and select <b>Relative</b>
Mode for it. We need to make sure it sits above the Absolute position
track because transformations get applied from the bottom up.<br>
<br>
We could then use the Relative track to add displacements to the main
motion
of the cube, e.g. make it shake as it moves. In this example, the
Relative track was keyframed every 0.2 secs using <b>Animation
-> Keyframe Selected Tracks </b>. The x and y coordinates
of the resulting keyframes were then moved to 'random' positions in the
plot view. The effect is that
the Absolute position on the cube is initially determined from the
Absolute track; then the Relative
track displaces the x and y positions by the coordinates specified.<br>
</font></td>
<td><img src="animation/anim_pos_rel.jpg"></td>
</tr>
</tbody>
</table>
<br>
<br>
<a name="apply"><b><font color="#3393d2">Apply
To</font></b></a> determines which part of the object
is controlled by the track and is either the <b>Object Origin</b>
or one of the joints in the <a href="object_types.html#skeletons">skeleton</a>.
<br>
For instance, in this example of a pendulum, a single bone joint has
been placed at the pivot position and
used as the part of the object to which the position track applies. The
rotation track is applied to the object's centre and the position track
then acts to reposition the object so that the 'pivot' is fixed
at the keyframed position:
<table>
<tbody>
<tr>
<td><img src="animation/pivot.jpg"></td>
<td><img src="animation/pendulum.gif"></td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
<b><font color="#3393d2">Coordinate System</font></b>
is the set of axes under which the transformations
are applied, i.e. where the origin is and how the axes are oriented.
There are either 3 or 4 possible options for this, depending on which
Track Mode is set:<br>
<img src="animation/coord_system_opts.jpg">
<br>
The <b>World</b> coordinate system is the main coordinate
system that Art of Illusion works in.<br>
<br>
The <b>Parent</b> option is for objects that are
'children' of other objects. In most cases, you will
want the children to move, rotate etc. with their parent objects. In
this case, give the children objects
position tracks and set the <b><font color="#3393d2">Coordinate
System</font></b> to <b>Parent</b>. Keyframe
at least one time position, e.g. at time 0, to set up this relationship
and the children objects will then
follow their parents.<br>
<br>
<b>Other Object..</b> is similar to the <b>Parent</b>
option except that any object can be made to follow
any other object. Selecting this option, makes the <img src="animation/anim_coord_set.jpg"> button become
available. Pressing this allows the selection of the object, or of any
bone of any object with a
defined skeleton, to be followed.<br>
<br>
<b>Local</b> is only available for <b>Relative</b>
mode tracks and allows transformations to be made
relative to the object's own co-ordinate system which is defined via
the object layout.<br>
<br>
<br>
<b><font color="#3393d2">Track Affects</font></b>
allows the ability to restrict the motion to certain
axes only.<br>
<br>
<br>
<a name="pos_key_edit"><b><font color="#3393d2">EDITING
POSITION KEYFRAMES</font></b></a><br>
<br>
Keyframes can be edited by double-clicking them on the score or by
selecting a keyframe from the Position track and clicking on <b>Animation
-> Edit Keyframe</b>. This
displays the following dialogue:<br>
<table>
<tbody>
<tr>
<td><img src="animation/pos_edit_key.jpg"></td>
<td><font face="tahoma" size="2">The
first 3 entries allow the alteration of the objects position in each of
the 3 axes in the defined
coordinate system. This is a way of more accurately specifying
positions as opposed to editing on the
plot view.<br>
<br>
The next entry is for <b><font color="#3393d2">Time</font></b>
allowing you to specify explicitly the time position of the keyframe.<br>
<br>
The lower half of the dialogue allows further refinement of the <b><font color="#3393d2">Smoothing Method</font></b>. For
<b>Interpolating</b> and <b>Approximating</b>
smoothing methods, the curve can be given a <b><font color="#3393d2">Smoothness</font></b> value
which determines how smooth the curve is. In addition, the part of the
curve to the left of the keyframe (i.e. the time period before the
keyframe)
can be set to a different <b><font color="#3393d2">Smoothness</font></b>
than the curve to the right of the keyframe (i.e. the time period after
the keyframe). </font></td>
</tr>
</tbody>
</table>
<br>
<br>
It is also possible to set up separate position tracks to allow
independent control
of movements in the X, Y and Z directions. This can be done
automatically by selecting
<b>Animation -> Add Track to Selected Objects ->
Position -> XYZ (3 Tracks)</b>. In this instance
3 tracks are produced each with <b>Track Affects</b> set
to one of X, Y or Z.<br>
<br>
<b><font size="4">ROTATION TRACKS</font></b><br>
<br>
Basic rotation tracks are again created by selecting <b>Animation
-> Add Track to Selected Objects -> Rotation ->
XYZ (One Track)</b>. The basic method of setting up a track is
similar to Position Tracks; move to the appropriate time, rotate
the object to the orientation (in degrees) required at that time, and
keyframe it. Below is a simple example
with a cube rotating in the x and z axes set up with 2 keyframes:<br>
<img src="animation/anim_rot_ex.jpg"><img src="animation/box_rot.gif" align="top"><br>
<br>
<b><font color="#3393d2">ROTATION TRACK OPTIONS</font></b><br>
<br>
The options dialogue for Rotations is displayed by double-clicking the
track name and looks as follows:<br>
<table>
<tbody>
<tr>
<td><img src="animation/rot_track_opt.jpg"></td>
<td><font face="tahoma" size="2">Most
of the settings are identical to the Position Track options. See <a href="#pos_track_op">
this section</a> for details.<br>
<br>
Note that with Rotations, a child object or an object set to another
object's coordinate system will
need to have both Position and Rotation tracks in place and set to the
appropriate coordinate setting in order to work properly.<br>
<br>
The only difference, in fact is the <b><font color="#3393d2">Isotropic
(Quaternion) Rotations</font></b>
option. Switching this on means that the end point of the rotation is
more important that the process
of rotations involved in getting there. The program does not
necessarily follow the specified rotation
values in each axes but gets to the endpoint by the shortest path
possible. For example, if you set a rotation of 270 degrees in the
z-axis, Art of Illusion actually treats this as -90 degrees if
quaternion rotations are turned on. Therefore, if you need to set a
rotation greater than 180 degrees in any axes, you need to switch this
option off. Bear in mind, however, that if you do this, that the x, y,
and z rotations are then performed independently in this order: z, x, y
and the animation might not do what you expect. In this situation it is
best to rotate only one axis at a time and use parent-child coordinate
systems to carry out more complicated rotations. </font></td>
</tr>
</tbody>
</table>
<br>
<br>
<a name="rot_key_edit"><b><font color="#3393d2">EDITING
ROTATION KEYFRAMES</font></b></a><br>
<br>
Keyframes can be edited by double-clicking them on the score or by
selecting a keyframe from the Position track and clicking on <b>Animation
-> Edit Keyframe</b>. This
displays the following dialogue:<br>
<table>
<tbody>
<tr>
<td><img src="animation/edit_rot_keyframe.jpg"></td>
<td><font face="tahoma" size="2">The
first 3 entries allow the alteration of the objects orientation in each
of the 3 axes in the defined
coordinate system at the point in time of the keyframe.<br>
<br>
As with the keyframes in the Position Tracks, the smoothness of the
orientation vs time curves before
and after the keyframe can be set. </font></td>
</tr>
</tbody>
</table>
<br>
<br>
As with Position tracks, there is a way of automatically setting up
certain types of track through the
<b>Animation -> Add Track to Selected Objects ->
Rotation</b> menu. From here, you can choose to have
separate tracks for X, Y and Z and Quaternion rotations tracks set up
automatically.<br>
<br>
<b><font size="4">SET PATH FROM CURVE</font></b><br>
<br>
This is a special method of setting Position and Rotation Tracks for an
object using an existing curve
created with either of the <a href="object_types.html#curves">curve
drawing tools</a>.<br>
<br>
To perform this, select the object and the curve from the Object List
and click on <b>Animation ->
Set Curve from Path </b>. This will display a dialogue similar
to that below:<br>
<table>
<tbody>
<tr>
<td><img src="animation/set_path.jpg"></td>
<td><font face="tahoma" size="2">Here
you can select the object and curve (if more than one were selected
initially) to use.<br>
<br>
You can also specify whether the orientation of the object should
follow the curve or remain fixed. In
the latter case, no Rotation Track will be produced.<br>
<br>
There are 3 options for <b>Keyframe Spacing</b>: <b>Uniform
Spacing</b>, <b>Uniform Speed</b> or <b>Uniform
Acceleration</b>. Depending on which you set, there are then
additional parameters that can be specified:<br>
<br>
<b>Start Time</b> and <b>End Time</b>
define how quickly the object moves along the curve. If <b>Uniform
Speed</b> or <b>Uniform Acceleration</b> is
selected, then these values will depend on speed and/or acceleration
which can be specified in the remaining dialogue boxes. </font></td>
</tr>
</tbody>
</table>
<br>
<br>
The example below is a simple example. The curve was drawn as the path
followed by a bouncing ball. The
path of the sphere was then set to that of the curve with constant
speed (not physically realistic, or course).
The result is the automatically created Position Track and the
animation shown.<br>
<table>
<tbody>
<tr>
<td><img src="animation/set_path_setup.jpg"></td>
<td><img src="animation/ball.gif"> </td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
<a name="proc_tracks"><strong><font color="#ff6633" size="4">6.2.2 Procedural Rigid
Transformation Tracks</font></strong></a><br>
<br>
Procedural animation tracks allow the position and orientation of any
object to be controlled explicitly
using mathematical equations. This is useful, for instance, in the
simulation of real-life physics.<br>
<br>
To add a procedural animation track, select the object and click on <b>Animation
-> Add Track to Selected
Objects</b> and choose either <b>Position ->
Procedural</b> or <b>Rotation -> Procedural</b>.
Double-click
the track name on the score or select it and click on <b>Animation
-> Edit Track </b>. This will display
the procedure editor which is virtually identical to that used for
procedural textures/materials. The obvious difference is that the
output modules are X, Y and Z. In the case of a positional track, these
are
the x,y and z positions and, in the case of a rotation track, these
will be the orientation around each axis.<br>
<br>
The <b>Insert</b> menu allows various value and function
modules to be added to the procedure. See
<a href="textures.html#proc_tex">Procedural Textures</a>
for more details of the available modules.<br>
<br>
The <b>Properties</b> menu item allows the definition of
the type of smoothing and the coordinate system as
with the <a href="#pos_track_op">simple position track</a>.
<table>
<tbody>
<tr>
<td><font face="tahoma" size="2">Consider
the example of a ball being thrown into the air upwards (y-axis) and
along the x-axis. The physical equations describing this projectile
motion tell us that the distance in the x-direction is given by <b>x
= u t cos <font face="symbol">a</font></b>
where <i>u</i> is the velocity (which we'll assume for the
moment is constant) <i>t</i> is the time
and <font face="symbol"><i>a</i></font>
is the angle from the horizontal as shown on the figure on the right:<br>
<br>
The distance along the y-axis is given by <b> y = h + u t sin <font face="symbol">a</font> - 0.5 g t<sup>2</sup></b>
where <i>h</i> is the initial height and <i>g</i>
is the acceleration due to gravity (= 9.81 m/s<sup>2</sup>)
</font></td>
<td><img src="animation/projectile_diagram.gif"></td>
</tr>
</tbody>
</table>
<br>
We're controlling the <i>position</i> of the ball so we
need to put these equations into a procedural position track. One
possibility, shown below, is to use the <b>Expression</b>
module and feed the outputs into
the relevant X and Y output modules. In this example, the velocity
of projection is set through a parameter so that different projections
could be set up easily. This could
also be done with the other variables, such as initial height (which is
1.0 in this example) and angle of projection which was set at 0.79
radians (45 degrees) in this example.<br>
<br>
<img src="animation/project_proc.jpg"><img src="animation/projectile.gif"><br>
In procedural animation tracks, it is also possible to keyframe any
parameters that form part of the procedure. For example, if we amend
the procedure above to add a wind effect as follows:<br>
<table>
<tbody>
<tr>
<td><img src="animation/project_proc2.jpg"></td>
<td><font face="tahoma" size="2">Here,
I have introduced the new parameter <i>wind effect</i>
which is Input2 to the expression controlling
the x displacement. The expression has been slightly modified to add a
subtraction of the wind effect
from the x position. This is a very simplistic simulation that will
enable us to specify how far the
wind is pushing back the ball.<br>
<br>
Now, we can keyframe this parameter by moving the time marker to a
certain time point and selecting <b>Animation -> Keyframe
Selected Tracks </b>. This produces a keyframe at the current
time
position on the score. Double-clicking the keyframe displays a dialogue
box that allows the value
of the keyframe to be specified as shown below: </font></td>
</tr>
</tbody>
</table>
<br>
<table>
<tbody>
<tr>
<td><img src="animation/proc_param_key.jpg"></td>
<td><font face="tahoma" size="2">Here,
the value of the parameter can be set for the particular point in time.
The value of the parameter
at any point in time will then be interpolated between keyframed values
using the type of smoothing
selected from the Properties menu option in the procedure editor.<br>
<br>
As before, the smoothing value can be specified if the smoothing method
is interpolating or approximating and the left and right smoothness can
be separately defined.<br>
<br>
Specifying the value at a number of time positions produces the
simplistic wind effect shown on the right.
Clearly, more sophisticated and realistic simulations could be
produced. </font></td>
<td><img src="animation/projectile_wind.gif"></td>
</tr>
</tbody>
</table>
<br>
<br>
Note that procedural animation tracks can also be used to apply motions
on top of previous motions.
Whenever x, y or z values are used within the procedure editor, they
are the positions or orientations
of the object just before this track is applied. So, for example, the
following procedure would double
any movements made by previous tracks in the x axis:<br>
<img src="animation/proc_scale.jpg"><br>
<br>
<br>
<a name="pose_tracks"><strong><font color="#ff6633" size="4">6.2.3 Pose Tracks and
Skeletons</font></strong></a><br>
<br>
Pose tracks are a way of keyframing other object properties and have a
particular use for mesh objects.<br>
<br>
<b><font color="#0000ff">Pose Tracks for Primitive
Geometric Objects</font></b><br>
For Primitive geometric objects, the properties that can be edited are
those that can be set using the <a href="editing_objects.html#edit%20object">Edit Object</a>
(i.e. scaling parameters). To apply, add
a Pose Track via <b>Animation -> Add Track to Selected
Objects -> Pose</b>. Now, add a keyframe at the time
at which you want to set the scaling parameters by selecting the pose
track and choosing <b>Animation -> Keyframe Selected
Tracks</b>.
Double-click the keyframe to bring up the Edit Object dialogue, set the
scaling parameters and click OK. Repeat for other times as required.
The values of these parameters can also be set directly at the current
scene time via the <a href="layout.html#object_list">Object
Properties Panel</a>. The smoothness of the
interframe interpolation can be set via the <a href="#pose_track_dial">track dialogue</a>.<br>
<br>
<b><font color="#0000ff">Pose Tracks for Lights</font></b><br>
Pose tracks can also be set for lights to control <b>Colour</b>
and <b>Intensity</b> (all light types), <b>Radius</b>
and <b>Decay Rate</b>(for Point and Spot lights) and <b>Cone
Angle</b> and <b>Falloff Rate</b> (for Spotlights).
This works in a similar way to primitive geometric objects; add
a Pose Track, keyframe at required time and Edit Keyframe to fix the
light parameters at that time
point. </font><font face="tahoma" size="2">The
values of these parameters can also be set directly at the current
scene time via the <a href="layout.html#object_list">Object
Properties Panel</a>.</font><br>
<font face="tahoma" size="2">
<br>
<b><font color="#0000ff"><a name="camera_filter_anim">Pose Tracks for Cameras</a></font></b><br>
<a href="rendering.html#camera_options">Camera properties</a>
<b>Focal Length</b>, <b>Depth of Field</b>
and <b>Field of View</b> can also be animated via pose
tracks. Again this works as with primitives and
lights; add a Pose Track, keyframe at required time and Edit Keyframe
to fix the camera parameters at that time point. </font><font face="tahoma" size="2">The values of these parameters
can also be set directly at the current scene time via the <a href="layout.html#object_list">Object Properties Panel</a>.</font><br>
<font face="tahoma" size="2">
<br>
<a href="rendering.html#camera_filters">Camera Filter</a>
parameters can also be animated with time using Pose Tracks. The method
is slightly different; first add the required filters to the camera
(see <a href="rendering.html#camera_filters">Camera
Filters</a> for details), then add a pose track.
Expanding the Pose Track on the score by clicking the small arrow to
the left of it displays a list of
tracks corresponding to each filter. Keyframes can then be added to the
relevant tracks by highlighting them and selecting <b>Animation
-> Keyframe Selected Tracks</b>. An example is shown below:<br>
<br>
<img src="animation/flash.jpg"><img src="animation/lightning_flash.gif"><br>
<br>
<br>
<b><font color="#0000ff">Pose Tracks for Mesh
Objects, Tubes and Curves</font></b><br>
With mesh objects, tubes and curves, Pose tracks work in a similar way
to Position tracks but at the vertex level.
The basic premise is that you work with an object that must have a
fixed number of vertices. You then set up various 'poses' of the object
by manipulating the object in its editor. Art of Illusion then looks
at the position of each vertex in the object and how it changes between
poses. The path that each vertex
takes is then calculated by interpolating for the frames in between the
keyframed poses.<br>
<br>
Mesh objects with skeletons work slightly differently in that the
position of the bones of the skeleton
are calculated for each intermediate frame, then the vertex positions
of the mesh are calculated based
on the bone positions.<br>
<br>
To add a Pose Track to an object select <b>Animation ->
Add Track to Selected Objects</b> and choose
<b>Pose</b>. As with rigid transformation tracks, setting
up an animation is based on moving the time
marker to the appropriate point in time on the score, editing the
particular object property using the
appropriate dialogue and keyframing the modified tracks. Alternatively,
a keyframe can be placed at the
required time using <b>Animation -> Keyframe Selected
Tracks</b> which can then be edited through
<b>Animation -> Edit Keyframe </b>.<br>
<br>
For a mesh object, when you add a Pose Track the following warning is
displayed:<br>
<img src="animation/pose_warning.jpg"><br>
To create a Pose for a mesh actor, move the time marker to the required
time on the score and double-click
the object in the Object List. This displays a dialogue similar to that
below:<br>
<table>
<tbody>
<tr>
<td><img src="animation/pose_ex1.jpg"></td>
<td><font face="tahoma" size="2">On the
left hand side is a list of defined 'gestures' which are particular
instances of the mesh. At first there is only one: Default Pose which
is
the object in the position in which it was created. This gesture cannot
be deleted. To create a new gesture, select this default pose and click
on <span style="font-weight: bold;">Duplicate</span>.
Enter a name when prompted and this will add a new gesture to the list
and open up the object editor to allow the object to be edited in much
the same way as<span style="text-decoration: underline;"> </span><a style="text-decoration: underline;" href="object_types.html#triangle%20meshes">normal</a>
except that you will not be able delete any vertices or add any new
ones by extruding or subdividing.<br>
<br>
Once the mesh has been edited, click on OK to update the new gesture.
To assign a gesture from this
list to the current time, select it and click on <img src="animation/pose_add.jpg">. This adds the gesture to the <b>Current
Pose</b> list. This list defines how the mesh looks at that
moment in time: The final pose is the weighted sum of all the gestures
in this list, treating these gestures as <i>displacements</i>
from the
default pose. You can set the <b>Weight</b> by selecting
the gesture in the Pose list and typing a <b>Weight</b>
value in the box beneath the list. Or you can simply add a single
gesture to the list and click OK. If you look at this dialogue at a
point in time
between 2 keyframes, you will see that the <b>Weight</b>
of each gesture will have been calculated accordingly. It is also
possible to set negative <b>Weight</b> values.<br>
<br>
There are 2 other options available from this dialogue; <b>Save</b>
allows you to create a new gesture
which is equal to the current weighted average of the gestures in the <b>Current
Pose</b> list.<br>
</font></td>
</tr>
</tbody>
</table>
<br>
<b>Extract</b> saves the current pose determined from the
defined set of gestures in the <b>Current Pose</b> list as
a new mesh object.<br>
<br>
Once you have left the mesh Pose dialogue, set the keyframe for this
new pose by selecting <b> Animation
-> Keyframe Modified Tracks of Selected Objects </b>.<br>
<br>
Using Pose Tracks for mesh objects allows effects such as morphing:<img src="animation/thingmorph.gif"><br>
<br>
<br>
<br>
Note that the <a href="layout.html#object_list">Object
Properties Panel</a>
can also be used for more direct keyframing of Pose Tracks for Actors.
When you click on the Actor, the Properties Panel will show a
list of the gestures that have been added to the Current Pose list.
The weights of each can then be set in the Properties Panel
either by directly entering numbers or by using the knobs.
The
weights can then be keyframed via </font><font face="tahoma" size="2"><b> Animation
-> Keyframe Modified Tracks of Selected Objects </b>or
CTRL-SHIFT-K.</font><br>
<font face="tahoma" size="2"><br>
<br>
<br>
Using skeletons in animation is often an efficient way of creating new
gestures and poses. To do this, create a skeleton and bind it to the
mesh. Then, in the same way described above for each gesture, simply
move the bones as required and keyframe the pose. Below is an example
using 3 gestures, in addition to the default, and 5 keyframes; the
default was used at the beginning and the end:<br>
<table>
<tbody>
<tr>
<td><img src="animation/pose_ex_score.jpg"></td>
<td><img src="animation/pose_anim_ex.gif"><br>
</td>
</tr>
</tbody>
</table>
<br>
<br>
The <a name="pose_track_dial">options dialogue </a>for
the Pose Track is displayed by double-clicking the track name on the
score:<br>
<table>
<tbody>
<tr>
<td><img src="animation/pose_track_opts.jpg"></td>
<td><font face="tahoma" size="2">The
options are fewer than for the rigid transformation tracks.<br>
<br>
The <b>Track Name</b> can be changed to any name of choice.<br>
<br>
The <b>Smoothing Method</b> refers to the way the
parameter is interpolated between frames. In the case
of mesh objects, the relevant parameter is the <b>Weight</b>
of the various gestures making up the pose.
See <a href="#pos_track_op">above</a> for details
on the different smoothing methods.<br>
</font></td>
</tr>
</tbody>
</table>
<br>
The <b>Track Mode</b> can be either <b>Absolute</b>
or <b>Relative</b>. <b>Absolute</b> tracks
effectively
overwrite any other Pose tracks further down the list whereas <b>Relative</b>
tracks add to previous Pose
tracks.<br>
<br>
<a name="rel_pose_tracks"><b>Relative</b> pose
tracks </a> are useful for building up complex poses whilst
retaining better control of
different motions. In the example below, I have set up a series of
poses for a simple arm model. There are
seperate poses for each of the digits in a closed position and another
pose for the wrist. By creating 2
Pose tracks; one for the fingers (Absolute track mode) and one for the
wrist (Relative track mode), adding/modifying the wrist movement only
is much easier than having to separately edit each keyframe in a
combined Pose track .<br>
<img src="animation/pose_rel_poses_dials.jpg"><br>
<br>
For example, adding/removing the wrist movement is as easy as
enabling/disabling the wrist track:<br>
<br>
<img src="animation/hand_no_wrist.gif"><img src="animation/hand_rel_pose.gif"><br>
<br>
<br>
<br>
<br>
<b><font color="#0000ff">Child Objects and Animating
Poses</font></b><br>
<br>
Suppose we added some eyes (as child objects) to the snake in the
previous example. As the snake's head moves around we would like the
eyes to move with the head. Try this for yourself and see the results.
Child objects move and rotate with their parent object by default, but
in this case the eyes don't move. Why? Because the snake's position and
rotation doesn't actually change in the example above. The pose track