440 likes | 646 Views
Computer Graphics Animation Techniques. Ronen Barzel. Hierarchical Modeling Principles of Animation class #3 29 january 2003. Outline for today. Course business Hierarchical modeling Inverse Kinematics. Course business. field trip? projects
E N D
Computer GraphicsAnimation Techniques Ronen Barzel Hierarchical Modeling Principles of Animation class #3 29 january 2003
Outline for today • Course business • Hierarchical modeling • Inverse Kinematics
Course business • field trip? • projects • TD2 review • Animation
Projects • Motion capture data manipulation (paths, retargeting) • Legged motion. bipeds, quadrupeds. terrain, gaits, paths. • Particle system/crowd simulation • Fluids simulation (water, smoke) • Cloth simulation • Rigid body simulation, collisions, contacts, constraints • Flexible body simulation (on a rigid skeleton) • Motion synthesis: simulation • Controller synthesis: genetic algorithms • Image morphing • Make an animation
Notes on the projects: • No textbooks for most of these. • Some (or many) research papers & tutorials • Some things you just try • My goals: • Something you enjoy • Something that moves • Something that will look cool at the end • Work: • Should take 30-50 hours per person • Hard to estimate. Set up a series of goals/milestones • 2D or 3D, interactive or non-interactive
TD2 review • notes: • Math.atan2(y,x) • Math.toRadians(degrees) • Try to put transformation details inside object
Animation • “Andre and Wally B”
Outline for today • Course business • Hierarchical modeling • Principles of Animation
Modeling by writing a program • As per last week’s snowman… • Problems • Code gets complex • Special-purpose, hard to change • Special-purpose, hard to make many variants • Can’t easily examine or manipulate models
General model concepts • Individual parts • Transformations that link the parts • Parameters for: • part shape (e.g. squash, wink) • relationship between parts (e.g., squash, tilt) • Hierarchical relationship between parts • when base moves, everything moves • head and buttons move with torso • eyes move with head
Hierarchy of “nodes” • Each node… • defines a transformation • draws its shape in local coordinates • has children that inherit its local coordinates
Snowman Base Torso Head Button3 Button1 Button2 Eye1 Eye2 Nose
Draw by traversing the tree • Base class for Node has generic routine draw(Gfx g){ g.push(); g.transform(getTransform()); drawGeometry(g); for (i=0; i<children.length; ++i) children[i].draw(g); g.pop();} • Subclasses for different shapes, parameters
Variation draw(Gfx g, AffineTransform xf){ xf = getTransform(xf); g.push(); g.transform(xf); drawGeometry(g); g.pop(); for (i=0; i<children.length; ++i) children[i].draw(g, xf);} • other variations possible…
Other things to do with a tree • names • parameters • picking • bounding box • collision/contact calculation • Edit: build interactive modeling systems
What is the basic tree good for? • Modeling robots • separate parts • fixed relationships between them • Extend in two different directions: • scene graph • skeleton.
Scene Graph • Multiple types of nodes • grouping, transformation, materials, surfaces • cameras and lights • Generic surface nodes • Data specific to each use • Multiple instantiation • a DAG (directed acyclic graph), not a tree
Computation in a scene graph • linked/computed parameters • animation
Skeleton • restricted transformations • no drawn geometry, just “bones”
Use of skeleton • support for direct manipulation • support for inverse kinematics • skinning to build models
Even for non-humans www.sharktacos.com
Even for non-animals… www.hermoni.com/workshop
Outline for today • Administrative stuff • Hierarchical modeling • Principles of Animation* *Ceux qui ne peuvent pas le faire, l’enseignent.
Animation Principles • From “Principles of Traditional Animation Applied to 3D Computer Animation” John Lasseter, ACM Computer Graphics, 21(4), 1987 • In turn from “The Illusion of Life”
Squash and stretch • Determines feeling of weight, flexibility, response to pressure. • Maintain volume
Timing • Rate of acceleration conveys weight • Speed and acceleration of character’s movements convey emotion
Anticipation • Prepare for each movement • For physical realism • To direct audience’s attention
Follow Through • Overlapping motion • Motion doesn’t stop suddenly • Pieces continue at different rates • One motion starts while previous is finishing, keeps animation smooth
Staging • Picture is 2D • Make situation clear • Audience looking in right place • Action clear in silhouette
Action • Traditional: Pose-to-pose or straight ahead • CG: allows “layered” animation • First animate core and important parts • Gradually go back and refine, add others • In practice, combination of blocked poses and layered motion.
Ease-in and East-Out • Movement doesn’t start & stop abruptly. • Also contributes to weight and emotion
Arcs • Move in curves, not in straight lines www.comet-cartoons.com
Exaggeration • Helps make actions clear • Helps emphasize story points and emotion • Must balance with non-exaggerated parts
Secondary action • Motion that results from some other action • Needed for interest and realism • Shouldn’t distract from primary motion • (today: often use simulation to compute secondary motion of hair, clothing, etc.)
Appeal • Attractive to the eye, strong design, • Avoid symmetries
Personality • Action of character is result of its thoughts • Must know purpose and mood before animating each action. • No two characters move the same way.