Computer Graphics Bing-Yu Chen National Taiwan University.

Slides:



Advertisements
Similar presentations
Animation in Video Games presented by Jason Gregory
Advertisements

Multimedia Authoring1 Animation What is Animation Animation is defined as the act of making something come alive. It is concerned with the visual or aesthetic.
ANIMATION Chapter 5. 'In his book "Web Site Usability," researcher Jared Spool found that his web site testers found animation uniformly irritating, and.
1 Characters. 2Introduction The Characters are the Actors of the Games. The Characters are the Actors of the Games. Three Types of Characters : Three.
Animation Following “Advanced Animation and Rendering Techniques” (chapter 15+16) By Agata Przybyszewska.
3D Graphics for Game Programming (J. Han) Chapter XI Character Animation.
Chapter 7-Animation. Overview Introduction to animation. Computer-generated animation. File formats used in animation. Making successful animations.
1 7M836 Animation & Rendering Animation Jakob Beetz Joran Jessurun
UNC Chapel Hill M. C. Lin Reading Assignments Principles of Traditional Animation Applied to 3D Computer Animation, by J. Lasseter, Proc. of ACM SIGGRAPH.
Animation. Outline  Key frame animation  Hierarchical animation  Inverse kinematics.
Computer-Based Animation. ● To animate something – to bring it to life ● Animation covers all changes that have visual effects – Positon (motion dynamic)
ITBIS351 Multimedia Systems and Hypermedia
Animation CMSC 435/634. Keyframe Animation From hand drawn animation – Lead animator draws poses at key frames – Inbetweener draws frames between keys.
© 2010 Delmar, Cengage Learning Chapter 4: Creating Animation.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology 3D Engines and Scene Graphs Spring 2012.
Characters.
Hierarchical Transformations Hierarchical Models Scene Graphs
1 7M836 Animation & Rendering Animation Jakob Beetz Joran Jessurun
Chapter 11 ANIMATION  Group Name: Creative Web World  Jose T Barriga  Claudia L. Espinosa  Ranjana Agarwal.
Objectives Review some advanced topics, including Review some advanced topics, including Chapter 8: Implementation Chapter 8: Implementation Chapter 9:
CGMB113/ CITB 123: MULTIMEDIA TECHNOLOGY
Business and Computing Deanery Multimedia Week 6 Animation.
Multimedia Building Block : Animation
Animation 백 일 우
Digital Media Dr. Jim Rowan ITEC 2110 Animation. Two ways to create moving images Capture using a camera Create using animation techniques.
Creating Special Effects
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 8 This presentation © 2004, MacAvon Media Productions Animation.
CS 551/651 Advanced Computer Graphics Warping and Morphing Spring 2002.
CSC418 Computer Graphics n Animation Principles n Keyframe Animation.
Digital Media Dr. Jim Rowan ITEC 2110 Animation. Two ways to create moving images Capture using a camera Create using animation techniques.
Dr. Jim Rowan ITEC 2110 Animation
© 2012 Adobe Systems Incorporated. All Rights Reserved. Copyright 2012 Adobe Systems Incorporated. All rights reserved. ® INTRODUCTION TO FLASH ANIMATION.
Chapter 7 Animation. The Power of Animation Animation grabs attention Transitions are simple forms of animation  Wipe  Zoom  Dissolve.
Digital Media Dr. Jim Rowan ITEC 2110 Animation.
 The creation of moving pictures one frame at a time Literally 'to bring to life' e.g. make a sequence of drawings on paper, in which a character's position.
Animation. History Photography around since the 19th century Realistic animation began in 1872 when Eadweard Muybridge settled a bet about a flying horse.
Multimedia Animation. Animation Principles Persistence of vision object seen by human eye remains mapped on retina for a brief time after viewing display.
Chapter 7 Animation Prepared by: Ms. Ma. Anna Corina G. Kagaoan College of Arts and Sciences.
Algirdas Beinaravičius Gediminas Mazrimas.  Introduction  Motion capture and motion data  Used techniques  Animating human body  Problems  Conclusion.
Kinematics Jehee Lee Seoul National University. Kinematics How to animate skeletons (articulated figures) Kinematics is the study of motion without regard.
3D animation is rendered clip of animated 3D objects in a 3D environment. An example: Examples of movies released in 3D are Toy Story, Cars, Shrek, Wall-E,
Animation CMSC 435/634 By Prof. Marc Olano. Keyframe Animation From hand drawn animation – Lead animator draws poses at key frames – Inbetweener draws.
“ Animation Through the Ages” Camelia McCallion. Main tasks What is computer animation? Hand drawn (cel) Flick books Animated cartoon Animation process.
Digital Media Dr. Jim Rowan ITEC 2110 Animation.
Multimedia element: Animation Week The power of animation Animation is achieved by adding motion to still image/object. May also be defined as the.
CS 450: COMPUTER GRAPHICS ANIMATION SPRING 2015 DR. MICHAEL J. REALE.
Animation.
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 9.
Digital Media Dr. Jim Rowan ITEC 2110 Animation.
University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Hierarchical Modeling.
Digital Media Dr. Jim Rowan ITEC 2110 Animation. Two ways to create moving images Capture using a camera –edit in a video editor like iMovie Create using.
CS559: Computer Graphics Lecture 13: Hierarchical Modeling and Curves Li Zhang Spring 2010.
Introduction to Animation In animation, a series of images are rapidly changed to create an illusion of movement.
© 2011 The McGraw-Hill Companies, Inc. All rights reserved Chapter 5: Animation.
Computer Engineering and Networks, College of Engineering, Majmaah University ANIMATION Mohammed Saleem Bhat CEN-318 Multimedia.
CSCE 441: Computer Graphics: Hierarchical Models Jinxiang Chai.
COM 205 Multimedia Applications
TOPIC 5 - ANIMATION.
Computer Graphics.
Lesson 7-Animation.
MOHD SAIFULNIZAM ABU BAKAR
Computer Animation cgvr.korea.ac.kr.
CSCE 441: Computer Graphics: Hierarchical Models
Prepared by: Engr . Syed Atir Iftikhar
UMBC Graphics for Games
Assist. Lecturer Safeen H. Rasool Faculty of SCIENCE IT Dept.
Computer Graphics Lecture 15.
Chapter 5 Animation.
Hierarchical Modeling
CSCE 441: Computer Graphics: Hierarchical Models
Presentation transcript:

Computer Graphics Bing-Yu Chen National Taiwan University

Computer Animation  Traditional Animation  Key-Frame Animation  Hierarchical Modeling  (Inverse) Kinematics  Character Animation  Free-From Deformation 1

What is Animation ?  The creation of moving pictures one frame at a time Literally 'to bring to life' e.g. make a sequence of drawings on paper, in which a character's position changes slightly in each drawing Photograph drawings in sequence, using movie camera that advances one frame at a time Play back resulting film – character will move 2

What is Animation ?  Additional definitions Animation is defined as the act of making something come alive. It is concerned with the visual or aesthetic aspect of the project. Animation is an object moving across or into or out of the screen. Animation is possible because of a biological phenomenon known as persistence of vision and a psychological phenomenon called phi. In animation, a series of images are rapidly changed to create an illusion of movement. 3

Animation Space  Animation can be rendered in: 2D space  2-D animations are very simple and static. 2½D space  An illusion of depth is created through shadowing, highlighting, and forced perspective, though in reality the image rests in two dimensions. 3D space  Complicated and realistic animations are done in 3-D space. 4

Traditional Methods  Drawings/paintings on paper 1440 drawings for every minute of film  Cel  Painted or scratched film  Cut-outs  Clay animation (Claymation)  etc … 5

Cel Animation  Cel animation is a technique in which a series of progressively different graphics are used on each frame of movie film.  The term "cel" is derived from the clear celluloid sheets that were used for drawing each frame.  Cel animation begins with keyframes.  Keyframes refer to the first and the last frame of an action.  The frames in between the keyframes are drawn in the tweening process.  Tweening depicts the action that takes place between keyframes.  Tweening is followed by the pencil test. 6

Captured Animation  Computer + Video Camera + traditional technique  Frame grabbing record each frame to disk  Can also use scanner or digital still camera, or create each frame in a graphics program (e.g. Painter) 7

Digital Cel  Use layers like sheets of acetate in traditional cel animation e.g. static background on one layer, moving simple object on a layer in front of it. Make the object move by repositioning the layer More complex cases, just need to change those layers where movement or other change occurs between frames 8

Sprite Animation  Store a single copy of all static elements and moving objects (sprites) and a description of how the objects move  Each sprite can be a collection of images called sprite faces, which can be substituted in sequence to produce composite motion 9

Key-Frame Animation  Traditional: key frames drawn by chief animators at important points in the animation In-between frames drawn by less skilled animators  Computer-based: key frames drawn explicitly In-between frames interpolated by software 10

Key-Frame Animation  The most common method for character animation in production is key-frame animation. Each joint specified at various key frames (not necessarily the same as other joints) System does interpolation or in-betweening  Doing this well requires: A way of smoothly interpolating key frames: splines A good interactive system A lot of skill on the part of the animator 11

Linear Interpolation  Constant velocity Motion begins and ends instantaneously kf 1 kf 2 1 velocity kf 1 kf 2 displacement 12

Easing In  Object accelerates, gradual transition from stasis to motion kf 1 kf 2 2 velocity kf 1 kf 2 displacement 13

Easing Out  Object decelerates, gradual transition from motion to stasis kf 1 kf 2 2 velocity kf 1 kf 2 displacement 14

Symbols and Instances  Reusable objects stored in a library Graphic symbols Movie clip symbols (self-contained animations within a movie) If symbol is edited, all its instances updated.  Most graphics APIs support a few geometric primitives: spheres cubes cylinders  These symbols are instanced using an instance transformation. 15

Motion Tweening  Object is placed in a key frame  Create Motion Tween Object is turned into a symbol  Add key frame at end of tweened sequence and move or transform object  Motion in intermediate frames is interpolated (tweened) 16

Shape Tweening  Also called morphing Shapes of graphical objects are transformed in between key frames Have to generate the interpolated frames, so resulting animation file is bigger than when motion tweening is used 17

Image Morphing  The goal is to synthesize a fluid transformation from one image to another.  Cross dissolving is a common transition between cuts, but it is not good for morphing because of the ghosting effects. image #1 image #2 dissolving 18

Image Morphing  Why ghosting?  Morphing = warping + cross-dissolving shape (geometric) color (photometric) 19

morphing cross-dissolving Image Morphing image #1image #2 warp 20

Motion Graphics  Like time-based graphic design  Move, transform, alter layers of a bitmapped image between frames  Apply time-varying filters and effects Linear and Bézier interpolation in both space and time (rate of change) Can have new effects that only make sense in time, e.g. shatter, particle effects 21

3D Animation  "Easy to describe but much harder to do"  Properties of 3D models (shape, size, position, rotation, surface characteristics, etc), light sources and cameras are numerically defined  Animate a scene by changing the numbers, rendering a new frame, changing further …  Can make objects move, or move the camera  Requires 3D visualization and animation skills and great amount of processing power 22

Hierarchical Modeling  Connected primitives 23

3D Example: A robot arm  Consider this robot arm with 3 degrees of freedom: Base rotates about its vertical axis by Upper arm rotates in its xy-plane by Lower arm rotates in its xy-plane by Base Upper arm Lower arm 24

First implementation  The robot arm can be displayed by keeping a global matrix and computing it at each step: Matrix M_model; main() { … robot_arm(); … } robot_arm() { M_model = R_y(theta); base(); M_model = R_y(theta)*T(0,h1,0)*R_z(phi); upper_arm(); M_model = R_y(theta)*T(0,h1,0)*R_z(phi)*T(0,h2,0)*R_z(psi); lower_arm(); } 25

Better implementation  Instead of recalculating the global matrix each time, we can just update it in place: Matrix M_model; main() { … M_model = Identity(); robot_arm(); … } robot_arm() { M_model *= R_y(theta); base(); M_model *= T(0,h1,0)*R_z(phi); upper_arm(); M_model *= T(0,h2,0)*R_z(psi); lower_arm(); } 26

Hierarchical Modeling  Hierarchical models can be composed of instances using trees or DAGs: edges contain geometric transformations nodes contain geometry (and possibly drawing attributes) Right-front wheel Right-rear wheel Left-front wheel Left-rear wheel Chassis Directed Acyclic Graph 27

Kinematics  Forward Kinematics (angles to position) What you are given:  The length of each link  The angle of each joint What you can find:  The position of any point  i.e. it ’ s (x, y, z) coordinates  Inverse Kinematics (position to angles) What you are given:  The length of each link  The position of some point on the robot What you can find:  The angles of each joint needed to obtain that position 28

Forward Kinematics  Also called Hierarchical Animation X2X2 X3X3 Y2Y2 Y3Y3 11 22 3 X1X1 Y1Y1 X0X0 Y0Y0 29

Inverse Kinematics  Useful for animating jointed structures, especially limbs of human or animal figures  Model must obey kinematic constraints e.g. if upper arm moves, lower arm and hand must move with it  Inverse kinematics follows chain in reverse (easier for the animator) e.g. position the hand, then compute motion of the rest of the arm move to accommodate it 30

Inverse Kinematics  Goal Drag in realtime with mouse Maintain multiple constraints Figure responds in “ reasonable ” ways p1p1 p2p2 p3p3 follow mouse stay put root 31

Inverse Kinematics  Given: l 1, l 2, x, y  Find:  1,  2  Redundancy: A unique solution to this problem does not exist. Notice, that using the “ givens ” two solutions are possible.  Sometimes no solution is possible. 22 11 (x, y) l2l2 l1l1 l2l2 l1l1 l2l2 l1l1 32

A Complex Example: Human figure right upper arm left upper arm head left upper leg right upper leg torso right lower arm left lower arm left lower leg right lower leg 33

Articulated Animation  The above examples are called articulated models: rigid parts connected by joints  They can be animated by specifying the joint angles (or other display parameters) as functions of time. 34

Skeleton  Hierarchical kinematic chain  Bones connected by joints (transformations)  Segments define own local coordinate systems  2 layers of representation 35

Scene Graphs  The idea of hierarchical modeling can be extended to an entire scene, encompassing: many different objects lights camera position  This is called a scene tree or scene graph. Light2Light1 Camera Object1 Object3 Scene Object2 36

A Segmented Character  A character is composed by a set of models with motion data to simulate a live creature in real world 37

A Mesh Character  Vertex animation on skins Animated positional data on skins 3D warping 38

A Bone-skin Character  Bone-Skin Skeleton Hierarchical bones Skin deformation run-timely Bone A Skin Bone B 39

Motion Data  Euler angles  Angular displacement  Quaternion Can achieve the interpolation by “Slerp”  But finally they will be converted into “matrix” 40

Optical Motion Capture  Device  Data acquired From skin to joint (Mocap) From joint to skeleton (Post-processing) From skeleton to skin (In-game)  The shooting plan 41

Mocap Devices 42

Data Acquirement During the Mocap Raw Data (Positional Data) Joint End Point Bio-Data 43

Bone-skin Implementation in Game Skeletons Skin Skeletons Bone-Skin 44

45

46

Apply Motion for Characters  Apply motion data on bones 47 Joint = pivot(p x,p y,p z ) in A A B (x,y,z, ,axis) ( ,axis) = [R B ][T B ][R A ][T A ] From pivot From position

Motion Editing  To create more animation from limited work  Run-time or pre-processing  Issues : Motion re-targeting  Pre-processing / Run-time Re-key-framing  Pre-processing Interpolation between frames  Run-time Motion blending  Run-time Motion connection  Run-time 48

A Pose Definition Example 49 walk raw_start_frameraw_end_frame cut_frame Parameter { raw_start_frame raw_end_frame start_frame end_frame cut_frame play_speed length transition_mode } start_frameend_frame

Play a Pose 1.If the motion data is in quaternion form 2.Get the motion data on frame 5 & 6 3.Convert the data into quaternion format 4.Apply slerp(5, 6, 0.3) to get the interpolation on frame Convert the result of step 3 into a rotation matrix 6.Apply the matrix to the object for its transformation 50 walk 048 Frame 5.3

Pose Connection 51 Pose 1 Pose 2 cut_frame start_frame length

Pose Blending  Motion blending in run-time  Quaternion is used  “Blend Tree” Cross fade Countinuous blending Feather blending 52

Cross Fade 53 Pose 1 Pose

Continuous Blending 54 Pose 1 Pose

Skin Deformation  Weights to assign the influences of the deformation by bones on skin vertices 1-weight 2-weight N-weight  CPU cost  Another way to perform the skin deformation calculation is using vertex shader 55

1.Apply motion data to bones 2.Convert the vertex from “base” space to its associated bone’s space using the natural pose’s inverse transformation 3.Multiple the influence weight 4.Accumulate all influences 5.Then the vertex is deformed by the bone in “base” space 56 Bone A (root object) Bone B (Bone A’s child) base

3D Model Deformation  For different purposes Global deformation  change the overall shape of the given model bend a dolphin model, etc Local deformation  change some region of the given model enlarge the fin of a dolphin model, etc  For different types of models Polygonal surfaces  Editing at coarse level Parametric surfaces  Moving and adding control points 57

Free-Form Deformation (FFD)  Steps of FFD [ Sederberg and Parry ’ 86 ] 1.embed a model in a lattice structure 2.adjust some control points of the lattices original 58

Free-Form Deformation (FFD)  Steps of FFD [ Sederberg and Parry ’ 86 ] 1.embed a model in a lattice structure 2.adjust some control points of the lattices original 59

Free-Form Deformation (FFD)  Steps of FFD [ Sederberg and Parry ’ 86 ] 1.embed a model in a lattice structure 2.adjust some control points of the lattices originaldeformed 60

Free-Form Deformation (FFD)  Steps of FFD [ Sederberg and Parry ’ 86 ] 1.embed a model in a lattice structure 2.adjust some control points of the lattices → DEFORM originaldeformed 61

Free-Form Deformation (FFD)  Steps of FFD [ Sederberg and Parry ’ 86 ] 1.embed a model in a lattice structure 2.adjust some control points of the lattices → DEFORM originaldeformed 62