GameProg Lect5 Animation
GameProg Lect5 Animation
Game Production
Changing Your Mind
Prototype
Prototype
2
Basic elements
Aesthetics
Mechanics Story
Technology
•Mechanics
– the procedures and rules
•Story
– the sequence of events that unfolds
in game
•Aesthetics
– how game looks, sounds, tastes, and
feels.
•Technology
– any materials and interactions that
make game possible
2D Animation
• Animation produces the illusion of
movement
• Display a series of frames with small
differences between them
• Done in rapid succession, eye blends to
get motion
• Unit is Frames Per Second (fps)
– 24-30 fps: full-motion (Game Maker does
30)
– 15 fps: full-motion approximation
– 7 fps: choppy
– 3 fps: very choppy
– Less than 3 fps: slide show
Motion Line
• Timing is how long does it takes to get from one key pose
to another
• Spacing is the way to get from one key pose to another,
whether its fast or slow e.g. eye blinking
2. Arcs
• Almost all natural motion is in some form of an
arc.
• In 3D animation, a motion arc is usually
created using a spline curve.
• Pivot points often define the arc. The pivot
point for the thigh is the hip, and the pivot
point for the calf is the knee.
• Most human motion follows an arc. If a boxer
throws a punch, the motion of his glove
follows an arc.
9
3. Anticipation
Example:
Goofy prepares to hit a baseball.
12 Fundamental Principles
Anticipation
4. Exaggeration
• Exaggeration is used to
increase the readability of
emotions and actions.
• Animation is not a subtle
medium.
• Individual exaggerated
poses may look silly as
stills but add dramatic
impact when viewed for a
split second.
• Animators should be
careful to use
exaggeration to increase
understanding of feeling.
Be careful not to over-
exaggerate everything.
5. Squash and Stretch
• Teaches basic
mechanics of
animation.
• Defines rigidity of
material.
• Important in facial
animation.
6. Secondary Actions
• Secondary actions are
minor actions that occur
due to a major action. Most
people blink their eyes
when they turn their head.
• Facial expressions are
secondary actions.
• Secondary actions are also
actions caused by the
impact of another object.
The movement of a ball
that has been kicked is a
secondary action.
14
6. Secondary Actions
15
7. Follow Through and
Overlapping Action
1. Follow Through
Termination part of an action.
20
10. Solid Drawing
detail. 21
22
11. Appeal
• Animated characters need
to have a unique
personality and have a
wide range of emotions
(happy, excited, fearful,
embarrassed, angry,
scared, etc.).
• Character flaws are
actually a good thing.
Audiences can be
sympathetic to characters
that have a flaw or two.
• Complex personalities and
moral ethical dilemmas
add to character appeal.
24
12. Slow in and Out
• Keyframe animation
– Animator specifies important positions
throughout the animation – the keyframes
– Someone or something fills in the intermediate
frames – inbetweening, or just ’tweening
• Motion capture
– System captures motion data from a real
enactment of the animation
– The data then drives a virtual character
• Procedural animation
– A set of equations or rules are evaluated to 05/09/
determine how the animation behaves 02
Stages of Implementation
Mattes
Ruff (Portions of EFX
frame)
Keyframe animation
2
3
Keyframes Animation
Interpolating Positions
• Given positions:
(x , y ,t ), i
i i i 0, , n
x (t ) xi
• find curve
C (t ) such
C (t i )that
y (t ) yi
(x 2 , y 2 ,t 2 )
(x 0 , y 0 ,t 0 )
C (t )
u0
( x1 , y 1 , t 1 )
Linear Interpolation
(x 2 , y 2 ,t 2 )
(x 0 , y 0 ,t 0 )
( x1 , y 1 , t 1 )
• Simple problem:
t t
linear interpolation between first
tt
two points assuming
1
t t x 0 0
x1 , t : t 0 ,t1
t1 complete
t0
• x (t )
The x-coordinate
1 0 for the curve in the
figure: t2 t t t1
x1 x 2 , t t1 ,t 2
t 2 t1 t 2 t1
Polynomial Interpolation
(x 2 , y 2 ,t 2 )
(x 0 , y 0 ,t 0 )
parabola
( x1 , y 1 , t 1 )
RIGHT
DOWN
UP
2D Sprite System
• Bit-Mapped Images
• Sprites
– A set of image sequences to describe a 2D object
– Playback the image (animation) to simulate the
motion of the 2D object
• Clips
– A look of a sprite at some time
Clip
Sprite
63
Hot Spot of A Sprite
• Hot Spots Affect the Rendering Order
Hot-spot
A sprite
Hot spot coordinate
z
x
screen Rendering order
64
Hierarchy of Sprites
• Describe the Geometry Relationship of
Sprites
(+2,+2) (+40,+15)
(+10,+2)
65
Order Dependency
Potentiometers
http://www.animazoo.com/services/gypsyHybrid.htm
Fitting to the Skeleton
• Utopian approach
– 10 – 20% length
changes
• Markers on both
sides
• Joint
Displacement
• Use Rotation
Angles Only
Mechanical systems
Image World
Space Space
(X,Y) (X,Y,Z)
(X,Y) (X,Y,Z)
(X,Y) (X,Y,Z)
3D Position Reconstruction
(Utopia)
C
C 1 kk 1 I I 1 CC 1 C C k2 kI 2 C
1y
2 I 2 C 2 P
1 1y 1y 2y 2 2y I 2 C2
2y
C 2 k
C k I C C k I C
1z 1 1z 1z 2z 2 2z 2z
Multiple Markers
C1
• For small number of markers: Size
• Occlusions are a problem
• Multiple Hypothesis
C2 Tracking
Post Processing
• Motion Editing
– Cut, Copy, Paste
• Motion Warping
– Speed up or Slow Down
– Rotate, Scale or Translate
• Motion Signal Processing
– Smoother Motions
System Calibration and Capturing and Processing Data
2D Image -> 2D Camera Data -> 3D Markers Positions -> Trajectories -> Recon Skeleton -> Solver Skeleton
2D Image -> 2D Camera Data -> 3D Markers Positions -> Trajectories -> Recon Skeleton -> Solver Skeleton
Circle fitting Triangulatio FBX
n Reconstruction
Skeleton with subject’s
size & proportion and
motion data
BLADE Subject Calibration
• VST
(subject
VSK Skeleton with subject’s MOTION
Capture Range of Motion size & proportion
template)
BUILDER
(ROM)
• Reconstruct trajectories
of ROM
• Label markers
FBX
Character Setup Character
(FBX)
• Create a skeleton
• Edit motion
• Bind skin to the skeleton Skeleton with 3D character’s
size & proportion (and skin) • Bake motion data to the
• Rig the character skeleton
MAYA
The processes that
Rendering
FBX
you repeat for each
shot
• Marge the rigged character (MB) and
the skeleton with motion data (FBX)
P MP
Animation
Control
Linear Motion Extraction
110
Composite Motion Extraction
111
Animation
• Screen-play
• Storyboards
• Character
development
Typical Character
Character
• Concentrate on
– Character Design
•Model Sheet with poses
– Modeling (simple)
– Skeleton Rigging
– Binding
Personality through Pose,
Expression, Motion, Timing
Chapter 9 - 117 Interactive Computer Graphics
Primitives
1. Set Keys
– Usually extreme positions
– Less is more: Keys only the properties
being animated
2. Set Interpolation
– Specify how to get from one key to
another.
– Secondary, but a necessary step.
3. Scrub Time slider and refine motion
curve
Setting Keys
• Specify joint
constraints
and priorities
• Move end effector
(or object pose)
• Let the system figure
out joint positions
Modeling Tools
• Certain tools and techniques used 80-90% of
the time
• Line Tool:
– Draw outline of object and extrude to get 3-d
shape
•Ex: profile of car. Use line tool. Then, extrude
outward to get shape. “Broad stroke”
• Extrude:
– Take component (often face), duplicating it, pulling
pushing or scaling to refine model
• Cut:
– Subdivides faces and adds new faces
• Adjust:
– The artistic part of modeling. Try to capture form,
profile and character by moving vertices
•“Vertex surgery”
Box Modeling
Rotate(
+x +x +x )
Transla
te()
+y +y +y Rect()
+x +x +x Transla
te()
Rotate(
The Modelview Duality
+y +y
+x +x
+z +z
171
Detail in Texture
173
Powered by Shader
• Per-pixel lighting Procedural Morphing
• Motion blur Water Simulation
• Volume / Height fog
• Volume lines
• Depth of field
• Fur fighting
• Reflection / Refraction
• NPR (non-photorealistic
rendering )
• Shadow
• Linear algebra operators
• Perlin noise
• Quaternion
• Sparse matrix solvers
• Skin bone deformation
• Normal map
• Displacement map
• Particle shader
174
A Brief Word on Alpha
Channels
• Grayscale image embedded in extra 8 bits
of 32-bit image (24 bits gives true color)
• Use for:
– Transparency
– Reflection
– Bump maps
Alpha Channel - Transparency
Images courtesy
of WildTangent.
Alpha Channel - Reflection
• Define what areas reflect light most – human face
shiny where oil, water ripples
• Three common types of reflection
– Camera projected – always the same, but can be
unrealistic
– Cubemap – 6 sides, but predefined
– Dynamic – sides computed on the fly
Images courtesy
of WildTangent.
Lighting
• Can conjure feelings, emotions, even
change what you are seeing
• Remember, when see things is really
reflection of light
• Sub-outline
– Color
– Mood
– Setup
– 3-D lights
Color Indicates Danger
• Global
Illumination -
attempt to
mimic real-
world lighting A room lit
by calculating without
bouncing, etc. radiosity. Botto
– Can be m The same
expensive room with a
to compute radiosity
– May be solution.
limiting
Effective Lighting Practices (1 of
3)
Pools of light
– Don’t always
try to light evenly.
- Gives sense of
mystery
Using light to
guide the
player. Helps
highlight areas
that are
accessible and
important to the
objectives.
Effective Lighting Practices (3 of
3)
• Be Creative
– Try not to stick to the standard solutions
– Tell a story with your lights
– Talk to level designer about scenes, even
– Ex: Maybe your level harder than last, convey
that tension
• Experiment
– Start simple, add detail.
– Experiment at early stages.
– Try crazy combinations of color, reverse the
intensities, or reposition lights in unorthodox
places.
How ‘truecolor’ works
24 16 8 0
longword alpha red green blue
R G
pixel
The intensity of each color-component within a pixel is an 8-bit value
Color-to-Grayscale