0% found this document useful (0 votes)
66 views96 pages

Chapter 9 - Animation

Uploaded by

Arpan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views96 pages

Chapter 9 - Animation

Uploaded by

Arpan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 96

Multimedia

Principles

Chapter 9

Animation

TMH Chapter - 9 1
Animation
Introduction
ƒ “Animate” means “to give life to”. Animations are created from a
sequence of still images.

ƒ Each image is slightly changed from the previous one with


respect to one or more objects in the image. The images are
then displayed rapidly in succession so that the eye is fooled into
perceiving continuous motion due to persistence of vision.

TMH Chapter - 9 2
Animation
Uses
ƒ Since animation involves the movement of still hand drawn
pictures, something that does not seem to occur naturally, it
increases the interest of the viewer and can create a lasting
impression.

ƒ By adding the appearance of movement to an inanimate object,


the resulting image stimulates emotion and builds excitement.
Animation is therefore widely used in the entertainment industry.

ƒ It is also at the heart of most computer games for making the


graphics more realistic, exciting or engaging.

TMH Chapter - 9 3
Animation
Uses
ƒ Nowadays animation is increasingly used in education as it
provides an excellent way to explain dynamic processes which
cannot be easily captured by video e.g. movement of the pistons
of an IC engine, movement of sub-atomic particles, movement of
planetary bodies etc.

ƒ A major use of animation in industrial and scientific applications


is to visualize simulation of scientific phenomena e.g. flight
simulations for aircraft and guided missiles, fluid-flow simulations
for studying viscous resistance, chemical simulations for studying
positions and orientations of atoms in chemical reactions to
mention only a few.

TMH Chapter - 9 4
Animation
Keyframes
ƒ In traditional animation lead animators or experts draw the most
important frames or key frames, which define the frames where
the course of action changes.

ƒ The intermediate frames between the key frames are drawn by


the assistant animators. This process is called tweening which
has been derived from the word “in-between”.

ƒ For example for depicting the motion of the rectangle moving


from the lower left corner to the upper right corner of the frame,
the initial and final positions provide the keyframes, while the
middle frames are the intermediate frames.
TMH Chapter - 9 5
Animation
Keyframes
ƒ The total number of intermediate frames determine the
smoothness or quality of the motion, and this together with the
frame rate consideration determine the duration of playback.

TMH Chapter - 9 6
Animation
Keyframes
ƒ Animators have discovered that 18 increments of movement projected
at 24 frames per second give a lifelike result.

ƒ In earlier days all drawings were done by hand and then photographed
on film or tape.

ƒ Nowadays with the advent of digital computers, keyframes and tweening


may be made using graphic software, saved as files inside the computer
and played back on the screen at varying frame rates.

ƒ On one hand this can save a lot of time and energy, make the drawings
more accurate and provide all the facilities of digital editing.

TMH Chapter - 9 7
Animation
Animation Types
ƒ A cel animation is a term from traditional animation. Cel comes
from the word celluloid, the material that made up early motion
picture film, and refers to the transparent piece of film that is
used in hand-drawn animation.

ƒ Animation cels are generally layered, one on top of the other, to


produce a single animation frame. Layering enables the animator
to isolate and redraw only the parts of the image that change
between successive frames.

ƒ A frame consists of the background cel and the overlying cels


and is like a snapshot of the action at one instant of time.
TMH Chapter - 9 8
Animation
Animation Types
ƒ By drawing each frame on transparent layers, the animator can
lay successive frames one on top of the other and see at a
glance how the animation progresses through time.

ƒ To depict movement only a portion, typically the foreground cel,


can be changed between frames without changing the
background cel.

TMH Chapter - 9 9
Animation
Animation Types

TMH Chapter - 9 10
Animation
Animation Types
ƒ With the advent of computers for creating animation, we have
another class of animation called path animation that differs from
the traditional cel-based animation.

ƒ Here the animation does not exist as a collection of frames but


rather as a mathematical entity stored by the animation program.

ƒ It involves an image or a collection of images together, called a


sprite, that moves as an independent object, like a flying bird, a
rotating planet, a bouncing ball or a spinning logo.

TMH Chapter - 9 11
Animation
Animation Types
ƒ The sprite moves along a motion path, typically curved, called
splines. The mathematical relations define how the movement of
the sprite takes place.

ƒ During playback of the animation, the formula is used to


generate the curved path on the screen and the sprite is made to
move along the path, using other parameters like speed and
duration to control its motion. Path animation is also therefore
known as Sprite Animation

TMH Chapter - 9 12
Animation
Animation Types
ƒ 2D animation programs does not take into consideration the
depth of objects and typically depict animated objects on flat
surfaces. These are drawn taking into account two coordinate
axes along X and Y directions.

ƒ 3D animation monitors objects by considering space coordinates


and usually involves modeling, rendering and adding surface
properties, lighting and camera motions. These are usually more
complex than 2D animations and have to take into account three
axes along X, Y and Z directions to define locations of objects in
space.

TMH Chapter - 9 13
Animation
Animation Types

TMH Chapter - 9 14
Animation
Animation Types
ƒ Computer assisted animation is also based on the keyframe
concept. The great advantage of computer assisted animation is
that in-between frames are created by the animation program
itself, not by junior animators doing a lot of tedious work.

ƒ Computer animation software typically simulates the process of


traditional cel based animation, by placing the animated object
on a timeline to depict the flow of time.

ƒ A playback head moves across the timeline to display each of


the frames one after another.

TMH Chapter - 9 15
Animation
Animation Types

TMH Chapter - 9 16
Animation
Principles
ƒ Traditional hand-drawn animation has a set of principle of its
own. These grew primarily out of work at the Walt Disney Studio
during the 1930s.

ƒ Squash and stretch - The classic example of squash and stretch


is a bouncing ball. To be more realistic the shape of the ball
should be flattened as it strikes the ground and revert back to the
original as it rebounds back into the air.

TMH Chapter - 9 17
Animation
Principles
ƒ Anticipation - If the audience is not prepared for a sudden
motion, the motion seems awkward and confusing. In life we
usually prepare to act before we act and the animation should
make this clear. For example, before running away a character
might brace its feet and look behind.

ƒ Staging - The concept of staging comes directly from theater and


film. It means to arrange things in each frame so that the action
is clear and easy to see. If too many things are happening in too
many places, the audience would not know where to look.

TMH Chapter - 9 18
Animation
Principles
ƒ Follow through and Overlapping action - Like anticipation, follow
through and overlapping action have to do with clarity.

ƒ Follow-through is the complement of anticipation. When you


throw a frisbee for example your arm continues its long arc after
the frisbee has left your hand. Including follow-through makes an
action easier to see and more realistic.

ƒ Anticipation and follow-through combine in overlapping action. It


is not necessary to bring one action to a complete stop before
beginning the next – it is more natural for one action to
commence before the first is completely done. Overlap
contributes to the continuity of a scene

TMH Chapter - 9 19
Animation
Principles
ƒ Slow-in and Slow-out - The bouncing ball is the classic
illustration of slow in and slow out. It is slowest at the top and
fastest after it begins to fall again.

ƒ Slow in and slow out means that there are more in-between
frames immediately before and after each pose, with fewer
frames for faster action in the middle of the transition.

ƒ For example, when a person is in a position of rest – seated in a


chair, to begin moving and gather momentum takes a bit of time,
so slow in and slow out contributes to realism.

TMH Chapter - 9 20
Animation
Principles
ƒ Arcs - Animated things rarely move in perfectly straight lines. Our
joints are hinges, and moving them describes an arc. The overall
movement of characters in an animation should follow an arc as
well. This is both more lifelike and more interesting visually.

ƒ Secondary action - Secondary actions result from the main


action. Anticipation and follow-through are two important
examples, but there are others. Each part of a character might
not move at the same rate. For example a robe might trail behind
a running character. Including secondary actions contributes to
realism.

TMH Chapter - 9 21
Animation
Principles
ƒ Timing - The speed of an action is an important way to show a
character’s intent. Rapid movement is for emergencies, while slow
movement implies deliberation.

ƒ Timing is also the most important way to indicate weight. The heavier an
object, the more inertia it has. A balloon is easy to move but soon slows
down from air resistance alone; a boulder is hard to get moving but even
harder to stop.

ƒ Exaggeration - Exaggerating an action can make it seem real. This is


especially true in animation. Exaggerating the important elements
makes them stand out and brings them closer to the viewer. An example
is the case of the eyes of a character coming out of the sockets when he
or she sees something startling.

TMH Chapter - 9 22
Animation
Principles
ƒ Appeal - All the characters in an animation should have appeal.
Appeal is visual as well as psychological. Characters that are
visually intriguing are more likely to hold an audience’s attention
than characters whose appearance is mundane or predictable

TMH Chapter - 9 23
Animation
Techniques
ƒ Onion Skinning - Onion-Skinning is a drawing technique
borrowed from traditional cel animation that helps the animator
create the illusion of smooth motion.

ƒ Rather than working on each frame in isolation, animators lay


these transparent cels one on top of the other. This enables
them to see previous and following frames while they are
drawing the current frame.

ƒ Onion skinning is an easy way to complete sequence of frames


at a glance and to see how each frame flows into the frames
before and after.
TMH Chapter - 9 24
Animation
Techniques

TMH Chapter - 9 25
Animation
Techniques
ƒ Motion Cycling - Human and animal motion such as walking, running
and flying, is mainly a repetitive action that is best represented by a
cycle.

ƒ A walk cycle requires from 8 to 12 frames. The sequence usually falls


into two halves. The first half begins at an extreme : the feet are at their
farthest apart, with the back toe and front heel touching the ground.

ƒ In the remainder of the first half (frames 3 – 4) the legs trade position.
So do the arms – but when the left leg is forward, the right arm is
forward, and vice versa.

ƒ The second half of the cycle (frames 5 – 8) is simply a variation of the


first half, but with arms and legs reversed. The finished walking
character can be used as a moving cel i.e. a sprite.
TMH Chapter - 9 26
Animation
Techniques

TMH Chapter - 9 27
Animation
Techniques
ƒ Masking - Artists who use airbrushes use cutouts of a red plastic
called rubylith to protect parts of their work from the application
of paint.

ƒ A mask in a computer program is in a sense a model of the


plastic masks – it protects parts of a frame from the application of
ink. By this technique you can make animated object move
“behind” the protected area. You can build a mask from
selections.

TMH Chapter - 9 28
Animation
Techniques
ƒ Adding Sound - Sound is an important enhancement to moving
images. Background music can evoke emotions. Sounds that
arise from the actions being viewed can clarify what is happening
and create an effect of realism.

ƒ Narration or voice-over can provide information that is missing


from visual images.

ƒ When sound matches the visuals – for example a door opening


or a person speaking, it is called synchronous sound. When
sound is independent of the visuals, such as background music,
it is called asynchronous sound.
TMH Chapter - 9 29
Animation
Techniques
ƒ Flip book - A flip book is a book with a series of pictures varying
gradually from one page to the next, so that when the pages are
turned rapidly, the pictures appear to animate, simulating motion
or some other change.

ƒ Rotoscoping - Rotoscoping was an early animation technique


which enabled animators and video editors to trace the contour
of objects on each frame of an animation and video sequence to
create a silhouette called a matte. The traced contour would then
be replaced by something else to produce a special visual effect.

TMH Chapter - 9 30
Animation
Techniques
ƒ Bluescreening - Bluescreening is a technique for shooting live
action against a even colored blue background and then
replacing the background by another image.

ƒ This is nowadays extensively used as chroma-keying using


digital editing tools whereby the background color is selected by
a selection tool and replaced by pasting over with some other
background.

ƒ Color cycling - Color Cycling allows you to change color of


objects by cycling through a range of colors in the color wheel.
The software provides smooth color transitions from one color to
another.

TMH Chapter - 9 31
Animation
Techniques
ƒ Morphing - Morphing is the process of smoothly interpolating
between two different images. When played back it appears that
the first image gradually and seamlessly changes into the
second image. Examples include an individual’s face gradually
transforming into the face of another person or even an animal.

TMH Chapter - 9 32
Animation
Web Animation
ƒ The World Wide Web was developed in the early 1990s was initially
created to serve hypertext documents but later on animated graphics
files were added to it.

ƒ The biggest obstacles in the use of animations on the Web are


bandwidth limitations, the differences in platforms and browser support.

ƒ Typically web animations are computer files that must be completely


downloaded to the client machine before playback, which can take a
long time to do so.

ƒ A way around this problem is streaming, which is the capability of


specially formatted animation files to begin playback before the entire
file has been completely downloaded.

TMH Chapter - 9 33
Animation
Web Animation
ƒ As the animation plays the rest of the file is downloaded in the
background. Another problem with Web animation is that once
the animation has been delivered to the user, the user must have
the proper helper application or plug-in to display the animation.

ƒ Shockwave format - Macromedia’s Shockwave technology for


Director was one of the first animation plug-ins for browsers.

ƒ To create Shockwave animations for the Web you will need the
Director authoring program for Windows. Shockwave animations
created on either Windows or Mac can play back in any browser
that supports the Shockwave Plug-in
TMH Chapter - 9 34
Animation
Web Animation
ƒ Macromedia Flash animation sequences can be saved in the
Shockwave format which uses the SWF extension and played
back on a Shockwave player. The Shockwave player can either
be a standalone player program or integrated into the browser as
a plug-in

ƒ Client-pull - In Client-Pull an HTML page gives the browser


instructions to request and load another document automatically.
This feature is like a slideshow – web pages are displayed one
after the other with a specified time delay in between. Client pull
is executed by a refresh command written into the <META> tag
of a HTML document.

TMH Chapter - 9 35
Animation
Web Animation
ƒ Server-push - Server-push animation requires a CGI (Common
Gateway Interface) script that tells the server when to
automatically serve a new document or image.

ƒ The CGI script sends a series of images to the client as if it was


transferring a single file. Each new frame that arrives at the client
replaces the previous one, thereby giving the illusion of fluid
motion because only the concerned image and not the entire
image needs to be refreshed

TMH Chapter - 9 36
Animation
3D Animation
ƒ Creating 3D animation involves a number of steps.

ƒ Modeling involves creation of 3D objects from 2D shapes. Two of the


most common methods are lofting and lathing. Lofting is a process of
changing a 2D shape into a 3D object by moving the shape along a
specific direction. Lathing involves rotation of a 2D shape about an axis
to create a 3D object.

ƒ Surface texture involves imparting realistic appearances to the 3D


models by applying textures over the object surface e.g. a wood texture
applied to a flat surface for making a table.

ƒ Lighting involves placing the lights in the scene by specifying their


intensities, direction and color. The directions of shadows are also
considered.
TMH Chapter - 9 37
Animation
3D Animation
ƒ Camera placements determine how the scene should look like.
Movement of camera can be used to produce zooming and
panning effects.

ƒ Animating the objects involves creation of key-frames and


tweening to produce intermediate frames.

ƒ Rendering produces the final output file and needs specifying the
file type, frame size, frame rate etc.

TMH Chapter - 9 38
Animation
Camera
ƒ When you create a computer rendering of a three-dimensional
scee, you first define the point of view from which the scene is to
be observed. A point of view consists of two factors : where you
are standing and where you are looking.

ƒ In computer graphics the point of view is called the camera. The


definition of the camera incorporates both the components of a
point of view.

ƒ The first factor – where you are standing – usually is called the
camera location. The location of the camera is a point in space
and specified as a triplet of XYZ coordinate values.
TMH Chapter - 9 39
Animation
Camera
ƒ The second factor is called the center of interest (COI) and is
also specified as a triplet of XYZ coordinate values.

ƒ There are a number of standard camera movements in 3D


animation scenarios. Keeping the camera location constant and
moving the COI is called a pan. If you stand in one spot and turn
your head to the left or to the right, this is equivalent to a pan.

ƒ The opposite of a pan is called an orbit which keeps the center of


interest stationary while moving the camera location. This
corresponds to fixing your gaze on one point in space while
walking around it.
TMH Chapter - 9 40
Animation
Camera
ƒ Another standard camera move is called a track, which involves
changing the camera location and the center of interest at the
same time, as a unit.

ƒ If both the camera location and the center of interest are moved
in or out - that is along the Z axis - the movement is called a
dolly.

ƒ Pitch is the rotation of the camera around the X axis, yaw is the
rotation of the camera around the Y axis, and roll is a rotation
around the Z axis.

TMH Chapter - 9 41
Animation
Camera

TMH Chapter - 9 42
Animation
Camera
ƒ The human field of view can be thought as a cone shaped area
called the cone of vision. Objects that lie within the cone of vision
are visible, objects that lie outside the cone are not visible.

ƒ In computer graphics the cone of vision becomes a pyramid of


vision in order to conform to the rectangular shape of the
computer monitor. The shape of the pyramid is the angle from
top to bottom of the pyramid, referred to as the field-of-view
angle or FOV measured in angles.

ƒ When you view a scene some objects appear in focus and some
appear out of focus. Some rendering programs reproduce this
effect through a parameter called depth of field.

TMH Chapter - 9 43
Animation
Camera
ƒ Depth of field is specified by two numbers : the first represents
the nearest distance at which objects will be in focus, and the
second represents the farthest distance at which they will be in
focus.

ƒ An important characteristic of the camera is that when a program


renders a scene it must restrict the scene to a finite three-
dimensional space. This is necessary because a program
dealing with infinite space would continue rendering forever.

TMH Chapter - 9 44
Animation
Camera
ƒ The graphics program also includes an invisible vertical plane
called the far clipping plane, beyond which nothing is renderable.

ƒ Objects farther away than the far clipping plane are clipped.
Similarly a near clipping plane prevents objects closer than it
from being rendered.

ƒ Combining the clipping by the edges of the screen and those by


the far and near clipping planes you end up with a viewable
world in the shape of a truncated pyramid.

TMH Chapter - 9 45
Animation
Camera

TMH Chapter - 9 46
Animation
Special Effects
ƒ Some 3D animation software packages offer techniques for
creating atmospheric effects such as fog and haze. These permit
you to define various atmospheric parameters interactively from
a menu window. The program includes these parameters in the
color calculations when it renders the final frame.

ƒ The simplest kind of atmospheric effect varies according to depth


along the Z axis. For example to render a scene with a reddish
haze you might specify that the RGB components of the color
are (200,100,100) and that objects at a distance of 1000 meters
are completely obscured by this reddish haze.

TMH Chapter - 9 47
Animation
Special Effects
ƒ Some systems also allow you to define an atmospheric fog that
obscures objects along the vertical or Y axis. This effect can be useful
for example in rendering mountains. The procedure here is similar to the
procedure for defining fog along the Z axis.

ƒ In reality however atmospheric density is rarely perfectly constant. The


fog enveloping a mountain rather than dissipating in a linear fashion as
it moves up the mountain, instead may dissipate at all up to a certain
height, then dissipate very quickly for a while, then more slowly etc.

ƒ A technique provided by some systems for handling this kind of


irregularity involves what is known as a density map, a black-and-white
picture that you create before you render frames. The variation in the
pixel brightness in the density map controls the variation in the
atmospheric density in the final rendering.
TMH Chapter - 9 48
Animation
Special Effects
ƒ Many phenomena like smoke, gas, steam, fire and clouds cannot be
modeled easily as surfaces. The particle system technique found on
many 3D system packages handles these type of phenomena that
consist of masses of molecule-sized particles rather than surfaces.

ƒ In defining a particle system, you normally have several parameters


under your control. One parameter is the number of particles, another is
the color of the particles, which often is animatable as well.

ƒ You can also control the movement of the particles. Most often 3D
systems packages offer, rather than a generic particle system function,
several different particle system functions each of which mimics a
specific natural phenomenon, and each of these have a different set of
parameters.

TMH Chapter - 9 49
Animation
Special Effects
ƒ The most common of these functions is an explosion in which
each surface is broken into many small surfaces which expand
outward in an exploding pattern.

ƒ Important parameters controlling the explosion may be


randomness, which ensures that not all pieces are of uniform
structure, starting location of explosion, the strength and the
influence of gravity on the pieces.

TMH Chapter - 9 50
Animation
Creating Animations
ƒ Animation involves the production of a series of still images that
when played back in quick succession, appear as continuously
moving.

ƒ Almost all 3D computer graphics animation systems are based


on the key-framing approach. In a computer keyframing system
the animator is the equivalent of the master animator.

ƒ The animator sets up the keyframes, then instructs the computer


to calculate the in-between frames. The computer thus serves as
an assistant to the human (master) animator.

TMH Chapter - 9 51
Animation
Creating Animations
ƒ A key-frame-based software system creates the in-between
frames of an animation by interpolating the transformation values
from one keyframe to the next.

ƒ The simplest kind of interpolation called linear interpolation, gets


its name from the fact that if you draw a graph of the relationship
between the two parameters (i.e. frame numbers and
transformation values) you get a straight line.

ƒ In interpolating, say, from frame 1 to frame 60, frame 30 which is


halfway between frames 1 and 60, receives transformation
values that are half of the difference between the values at frame
1 and the values at frame 60.

TMH Chapter - 9 52
Animation
Creating Animations
ƒ If instead of a constant rate it needs to change over the range of
frames, a third keyframe is required in between, say at frame 30.

ƒ The object moves from frame 1 to frame 30 at a specific speed


and then accelerates to a faster speed so that it reaches the
destination before frame 60 e.g. at frame 45. There is an abrupt
change of speed at frame 30 as apparent from the graph.

TMH Chapter - 9 53
Animation
Creating Animations
ƒ If your requirement is that the cube should move smoothly
through various positions without any abrupt changes, then the
solution is a spline interpolation.

ƒ If you ask the computer to calculate a curve through these


control points as a spline interpolation rather than a linear
interpolation you get the smooth curvature

TMH Chapter - 9 54
Animation
Creating Animations
ƒ The interpolation between frames can involve an ease-in when
the value changes very slowly at first and then gradually
increases towards the second keyframe.

ƒ The opposite of an ease-in is an ease-out, in which the value


changes very quickly at first and the more slowly towards the end
of the frame range.

ƒ Combining an ease-in and an ease-out produces an interpolation


called an ease-in-out in which the value changes slowly at first
then more quickly and then slowly again.

TMH Chapter - 9 55
Animation
Creating Animations

TMH Chapter - 9 56
Animation
Creating Animations
ƒ In a keyframe based animation system the most common way to
define the movement and timing of an object is to transform the
object manually (e.g. drag to scale by mouse or enter scale
parameters) until it looks right visually and then save each set of
transformations as a keyframe.

ƒ There is another very common and very powerful approach to


defining the movement and timing of an animation. This is known
as parameter curve editing.

TMH Chapter - 9 57
Animation
Creating Animations
ƒ The underlying concept of this approach is that any change
made to the graph of some parameter causes a corresponding
change in the animation.

ƒ Imagine that the height (i.e. scale in Y) of a cone increases and


then decreases.

ƒ Using a system that allows parameter-graph editing you can


select control points that represents specific keyframes and pull
them up or down to change the value of the SY parameter.

TMH Chapter - 9 58
Animation
Creating Animations
ƒ Doing so immediately changes the height of the cone at that
frame. It is also possible to push or pull a control point
horizontally in the direction of time. This controls when the
change takes place.

TMH Chapter - 9 59
Animation
Creating Animations
ƒ Most systems also allow you to select the type of interpolation
used between any two control points. Any combination of
interpolation types may be used between frames.

ƒ For example between one pair of control points the interpolation


might be a spline. Between another pair of control points the
interpolation may be linear.

TMH Chapter - 9 60
Animation
Creating Animations
ƒ Many models are more complex than a simple one-piece object.
They may consist of several parts which you need to organize
into a hierarchical structure in order to gain more control over the
transformations you apply to different elements of the model.

ƒ Animating a hierarchical model is conceptually just an extension


of the technique of animating a simple one-piece model. This is
called hierarchical animation.

ƒ Consider a graphical object representing a table with five


members. When rotating the table by a specific angle each of the
members rotates about its own local origin.
TMH Chapter - 9 61
Animation
Creating Animations
ƒ The result is not what is desired. The same things happens if
each element is scaled about its individual local origin.

ƒ To produce the desired result all the parts of the table must
transform about a single origin. The solution is to organize your
model into a hierarchical structure.

ƒ The whole table is at the top level of the structure and the
separate elements are at the lower levels. The whole system can
have a collective pivot point (larger cross) about which it rotates
as a whole.

TMH Chapter - 9 62
Animation
Creating Animations

TMH Chapter - 9 63
Animation
Creating Animations
ƒ The transformation of the Table object propagate downward to
the lower level objects, which are however always relative to the
local origin of the Table.

ƒ Within such a hierarchy each element is called a node, which are


also called child nodes of the Table object.

ƒ The five lower-level nodes all consist of both a transformation


matrix (rectangle) and some geometry (oval).

ƒ The Table object however consists only of a transformation


matrix but no geometry, because it is purely a logical grouping of
several sub-elements and has no shape of its own.
TMH Chapter - 9 64
Animation
Creating Animations
ƒ In some situations the guideline of the previous section i.e.
selecting each node of the hierarchy, transforming that node, and
saving the transformation, is cumbersome.

ƒ Consider the simple arm model in one position and think about
moving that model to another position.

ƒ In real life you intuitively think of this kind of movement as “I


moved my hand from here to there” and not as “I rotated my
upper arm, then I rotated my lower arm, then I rotated my hand”.

TMH Chapter - 9 65
Animation
Creating Animations
ƒ Thus the position of the hand determines the position of the arm
joints, because all the parts of the arm are connected and remain
so as the arm moves.

ƒ If the hand moves the lower arm must follow; if the lower arm
moves the upper arm must follow.

ƒ The technique that implements this approach is called inverse


kinematics. “Kinematics” refers to the mechanical study of motion
while “inverse” refers to the fact that the flow of transformations
within the hierarchical model is calculated in the opposite
direction to the normal calculations.
TMH Chapter - 9 66
Animation
Creating Animations
ƒ Normally you think of the transformations of a hierarchy as propagating
downward through the hierarchy.

ƒ The transformations of LowerArm should affect Hand but those of Hand


should have no effect on LowerArm.

ƒ In an inverse kinematics model, however, the transformations applied to


the lowest level, Hand determine the transformations of LowerArm . The
calculations of the transformations travels upwards through the
hierarchy.

ƒ The standard downward propagation of transformations is sometimes


referred to as forward kinematics to emphasize this difference.

TMH Chapter - 9 67
Animation
Creating Animations

TMH Chapter - 9 68
Animation
Creating Animations
ƒ The concept of motion paths allows you to define a path that an
object moves along.

ƒ For example, suppose you draw a motion path and assign it to a


cube, beginning at frame 1 and ending at frame 100. If you use a
standard linear interpolation then at frame 50 which represents
half of the total time, the cube will be located halfway along the
path.

ƒ Most systems also provide a technique for controlling the rate of


movement by adjusting the interpolation of a second curve,
called a timing curve, which represents the rate of movement
along the path.

TMH Chapter - 9 69
Animation
Creating Animations

TMH Chapter - 9 70
Animation
Creating Animations
ƒ By editing and changing the timing curve you change the rate of
movement of the object along the path.

ƒ For example, say you change the linear interpolation of the curve
to an ease-in interpolation. The cube still follows exactly the
same motion path but it does so now at a different rate of speed,
moving in slowly at first and then picking up speed covering a
great distance in the final frames of the animation.

ƒ If the timing curve is flattened and made horizontal over a certain


range of frames, the object remains at the same location on the
path for that range. If the timing curve slopes downwards, the
object moves backwards.

TMH Chapter - 9 71
Animation
Creating Animations
ƒ Another issue of importance that must be considered when
animating an object along a motion path is the orientation of the
object relative to the path.

ƒ Suppose you are animating a paper airplane along a motion


path. Undoubtedly you want the nose of the airplane to stay on
the path i.e. to remain tangent to the curve.

ƒ Some systems do this by default. Other systems by default


always keep the object in the original orientation of the object as
it moves along the path, and must be manually adjusted.

TMH Chapter - 9 72
Animation
Creating Animations

TMH Chapter - 9 73
Animation
Creating Animations
ƒ With a spline-based model, simple animations are not difficult,
but complex animations might require a great deal of very careful
selecting and moving of control points.

ƒ A number of techniques however have been developed to


simplify the process of animating the surface-defining points of a
model.

ƒ These techniques are based on the concept of associating many


surface defining points of the original model with a very few
limited number of controlling points on some other model or
curve. By moving few points of the controlling model, you move a
large number of points of the original model.

TMH Chapter - 9 74
Animation
Creating Animations
ƒ In one technique called lattice animation you define a rectangular box or
lattice of points to exist around the object you want to animate.

ƒ Each point of the lattice is associated with a cluster of surface-defining


points. Moving a few points on the lattice moves many associated points
on the surface of the model and deforms the model.

ƒ A second technique called axis deformation involves substituting one or


more straight axes of the normal Cartesian coordinate system.

ƒ A wavy line substituted for the normally straight, perpendicular line of an


axis curves the space in which an object exists and deforms it
accordingly.

TMH Chapter - 9 75
Animation
Creating Animations
ƒ Apart from animating objects over time, it is possible to animate
rendering parameters, such as point of view from which the scene is
observed, over time. This is called camera animation

ƒ The simplest approach followed by 3D systems is to use a basic


keyframing technique for the camera just as for individual objects.

ƒ Most systems treat the camera as an object and allow you to manipulate
it like translating or rotating. The settings of the camera are then saved
as keyframe.

ƒ The computer then interpolates the in-between camera positions for


each frame that lies between the keyframes. Any of the parameters that
define a camera – location, direction, FOV, focal length – normally can
be animated with this basic keyframe approach.
TMH Chapter - 9 76
Animation
Creating Animations

TMH Chapter - 9 77
Animation
Creating Animations
ƒ Lights can be defined and placed in a virtual scene just like
normal objects.

ƒ It is possible to position a light, save that position as a keyframe,


reposition it, save a new keyframe and then create the
interpolated animation of the light moving from the first position
to the second.

ƒ In addition you might rotate a spotlight or scale some specialized


light such as an area light, the definition of which includes a
specified size.

TMH Chapter - 9 78
Animation
Creating Animations
ƒ You can also animate various surface characteristics of objects
such as color, shininess, diffuseness, highlight color etc.

ƒ You might rotate a color texture map on a surface over time.


Here the surface geometry and all other properties of the surface
remain static. Only the rotation parameter of the texture map is
animated.

TMH Chapter - 9 79
Animation
Rendering Algorithms
ƒ The word algorithm means a well-thought-out, logical procedure for
doing something.

ƒ A rendering algorithm therefore is the procedure that a particular


program uses to calculate a picture.

ƒ Most rendering algorithms in software packages use a general approach


called scan-line rendering. Here the program looks at each pixel one
after another and calculates the color that pixel should be rendered.

ƒ It allows you to see the pixels filling in one by one and line by line. To
determine what color a given pixel should be, one common approach is
a process called ray casting.

TMH Chapter - 9 80
Animation
Rendering Algorithms
ƒ From the view-point of the camera a ray is cast through the first pixel of
the first scan line, as if the eye were looking through a tiny, pixel-sized
window into the three-dimensional world.

ƒ The eye then follows the ray until the ray either hits an object or exits
from the viewable world.

ƒ If the ray hits an object the program calculates the color of the object at
the point where it has been hit.

ƒ This color becomes the color of the pixel through which the ray has
been cast. The algorithm steps through all the pixels of the image in the
same fashion, casting a ray through each one and calculating its color.

TMH Chapter - 9 81
Animation
Rendering Algorithms

TMH Chapter - 9 82
Animation
Rendering Algorithms
ƒ To actually calculate the color at a point, another algorithm called
a shading algorithm is used to calculate the shading of a surface.

ƒ One simplifying assumption made by a shading algorithm is that


any flat surface is the same color at every point on the surface.

ƒ Rendering each flat surface with only one color gives objects a
faceted look and therefore is called faceted shading.

ƒ Faceted shading results in very fast renderings and so appears


in many 3D packages.

TMH Chapter - 9 83
Animation
Rendering Algorithms
ƒ In order to calculate the color of a given surface any shading algorithm
must know whether the surface faces towards or away from light.
Accordingly the surface will appear lighter or darker.

ƒ In order to determine the direction in which the surface faces, computer


graphics programs employ a concept called surface normal. A surface
normal is a line perpendicular to a surface at a given point on that
surface.

ƒ A surface normal is represented by an arrow coming off the surface. For


a flat surface a single surface normal suffices to indicate the orientation
of the entire surface Using surface normals a rendering program can
calculate the exact angle at which a surface is oriented toward the light.

TMH Chapter - 9 84
Animation
Rendering Algorithms
ƒ Although all points on a flat surface face in the same direction, a
curved surface is more complicated.

ƒ Many normals are necessary in order to describe the orientation


of a curved surface, because each point on the surface faces in
a different direction.

ƒ Because it is much easier to determine a single normal for a flat


surface than a great many normals for a curved surface, many
3D software packages convert a curved surface into a polygonal
approximation just before rendering.

TMH Chapter - 9 85
Animation
Rendering Algorithms

TMH Chapter - 9 86
Animation
Rendering Algorithms
ƒ For rendering of scenes with multiple objects, one approach is to sort all
the objects by depth so that the rendering program can start rendering
those objects that are farthest away.

ƒ Once rendered each new object covers up distant objects that have
already been rendered.

ƒ This procedure resembles the way a painter might complete the


background of a scene before painting objects in the foreground and as
such it is called the painter’s algorithm.

ƒ To presort by depth can be very time-consuming particularly with a


scene involving a large number of objects because each polygon of
each object has to be sorted by depth.

TMH Chapter - 9 87
Animation
Rendering Algorithms
ƒ An alternative solution to this problem is known as the Z-buffer
algorithm. The Z-buffer is an area of memory which stores the
distance of each pixel from the observer

ƒ If a point on the surface is far away, the Z-buffer stores a large


number. When a ray is cast through a pixel, the ray might hit any
of the several objects that lie in its path.

ƒ As the ray hits each object the depth in Z is calculated and


stored for the corresponding pixel. When the ray encounters a
second object, the depth in Z of that object is calculated and
compared to that is already in the Z-buffer.
TMH Chapter - 9 88
Animation
Rendering Algorithms
ƒ If the new value is less than (i.e. closer than) the old value, it
overwrites the older more distant value of that pixel.

ƒ By comparing the Z values of the different objects at each Z-


buffer pixel in this way the rendering program can determine at
every pixel which objects are in font of which other objects.

TMH Chapter - 9 89
Animation
Rendering Algorithms
ƒ Ray casting algorithm scan produce very sophisticated
renderings, but they have one fundamental limitation : they deal
with the shading of each object as if it existed in isolation and
that other objects do not have any effect to the object being
rendered.

ƒ As a result creating effects that involves interaction of multiple


objects becomes a problem like, creating reflections, shadows
and transparency.

ƒ A different category of rendering algorithm called ray tracing


addresses this problem by dealing with all of the objects in a
scene simultaneously.

TMH Chapter - 9 90
Animation
Rendering Algorithms
ƒ As with the ray-casting technique, a ray is projected from the eye
through the pixel and into the scene. The ray hits the first surface, which
has been defined as somewhat reflective.

ƒ The ray bounces off it and hits the second object, which has been
defined as partially reflective and partially transparent.

ƒ This contact generates two ray paths : one bounces off it and the other
passes through it and hits the third object.

ƒ In order to calculate the color of the pixel at the point where the ray first
hit it, you begin by calculating the color of the first object at the point
indicated, which is in turn by the color of the second object, which in turn
is influenced by the color of the third object.

TMH Chapter - 9 91
Animation
Rendering Algorithms
ƒ You also need to know the color of the space around the objects
since rays from the surrounding space also hit the cube.

ƒ Because the calculation of each surface point takes into


consideration all the different surfaces in the scene the effects of
all those surfaces show up in the final rendering.

TMH Chapter - 9 92
Animation
Rendering Algorithms
ƒ The process of converting curved surfaces to polygonal approximations
prior to rendering is known as polygon subdivision or sometimes
rendering subdivision.

ƒ Most systems allow you to control the number of polygons used to


approximate the patches. Some systems also offer another more
sophisticated way of determining the number of polygons.

ƒ This approach takes advantage of the fact that some sections of a patch
need far fewer polygons than do other sections. In relatively flat areas of
the patch, only a few polygons are necessary to produce a good
approximation.

ƒ However where the curvature of a patch changes abruptly, a lot of


polygons are required to make the rendering look smoothly curved.
TMH Chapter - 9 93
Animation
Rendering Algorithms
ƒ When rendering final frames you must also consider the staircasing
effect inherent to computer images.

ƒ Because any digital image is composed of a grid of tiny rectangular


pixels, a curved or slanted edge of an object tends to appear as a
stepped pattern. This effect is called aliasing, meaning that something
appears to be other than it really is.

ƒ For example, a truly curved surface may appear to be a jagged line. The
technique developed to handle this problem, anti-aliasing, consists of
selectively blurring certain pixels along the aliased edge of a rendered
surface.

ƒ Because the color patterns of the pixels change very gradually, rather
than abruptly, the eye perceives the edges as smooth.
TMH Chapter - 9 94
Animation
File Formats
ƒ Animated GIF - The GIF format has provisions for carrying multiple
images in a single file. This can be used to create animated displays.

ƒ Autodesk FLIC - The FLIC format is a proprietary Autodesk format for


animations. It is supported by the Autodesk Animator Studio and
Autodesk 3D Studio programs. There are two versions of the FLIC
format, designated by the filenames .FLI and .FLC.

ƒ Macromedia Shockwave - SWF is one of the file formats used by


Macromedia Flash to save animation sequences. It is essentially a
vector based format but can also support bitmap images. The latest
versions also allow audio, video and a number of interaction
mechanisms. SWF movies can be played by the Flash Player either as
standalone programs or as browser plugins.

TMH Chapter - 9 95
Animation
File Formats
ƒ 3D Studio MAX is a 3 dimensional vector graphics and animation
software developed by Autodesk Media & Entertainment,
formerly known as Discrete and Kinetix.

ƒ The MAX file format is the internal editable vector format for 3D
MAX scenes and requires the application software to open.

ƒ They are quite compact in size and may be copied from one
machine using floppies.

ƒ MAX files are usually rendered as AVI files which can be played
back like video clips.
TMH Chapter - 9 96

You might also like