Lecture 11 Slide 6.837 Fall 2003 Computer Animation II Orientation Interpolation Dynamics Some slides courtesy of Leonard McMillan and Jovan Popovic.

Slides:



Advertisements
Similar presentations
Animation Lecture 10 Slide Fall Conventional Animation Draw each frame of the animation great control Tedious Reduce burden with cel animation.
Advertisements

John C. Hart CS 318 Interactive Computer Graphics
Kinematics & Grasping Need to know: Representing mechanism geometry Standard configurations Degrees of freedom Grippers and graspability conditions Goal.
Animation Following “Advanced Animation and Rendering Techniques” (chapter 15+16) By Agata Przybyszewska.
3D Graphics for Game Programming (J. Han) Chapter XI Character Animation.
Chris Hall Aerospace and Ocean Engineering
3D Kinematics Eric Whitman 1/24/2010. Rigid Body State: 2D p.
Computer Graphics Recitation 2. 2 The plan today Learn about rotations in 2D and 3D. Representing rotations by quaternions.
CSCE 441 Computer Graphics: Keyframe Animation/Smooth Curves Jinxiang Chai.
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.
CSCE 641: Forward kinematics and inverse kinematics Jinxiang Chai.
3D orientation.
Ch. 3: Forward and Inverse Kinematics
CSCE 689: Computer Animation Rotation Representation and Interpolation
CSCE 441: Computer Graphics Rotation Representation and Interpolation
CSCE 641: Computer Graphics Rotation Representation and Interpolation Jinxiang Chai.
CS223b, Jana Kosecka Rigid Body Motion and Image Formation.
Rotation representation and Interpolation
Orientations Goal: –Convenient representation of orientation of objects & characters in a scene Applications to: – inverse kinematics –rigid body simulation.
Lecture Fall 2001 Computer Animation Fundamentals Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics.
Computer Animation Prepared by Khadija Kuhail Supervised by Dr Sanaa Alsayegh.
More details and examples on robot arms and kinematics
Interactive Graphics Lecture 18: Slide 1 Interactive Computer Graphics Lecture 18 Kinematics and Animation.
CS 450: COMPUTER GRAPHICS 3D TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
Lecture 10Slide Fall 2003 Animation. Lecture 10Slide Fall 2003 Conventional Animation Draw each frame of the animation great control tedious.
Computer Vision Group Prof. Daniel Cremers Autonomous Navigation for Flying Robots Lecture 3.1: 3D Geometry Jürgen Sturm Technische Universität München.
ME/ECE Professor N. J. Ferrier Forward Kinematics Professor Nicola Ferrier ME Room 2246,
1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009.
Game Physics – Part IV Moving to 3D
3D Kinematics Consists of two parts 3D rotation 3D translation  The same as 2D 3D rotation is more complicated than 2D rotation (restricted to z- axis)
CS 450: COMPUTER GRAPHICS QUATERNIONS SPRING 2015 DR. MICHAEL J. REALE.
Computer Graphics Bing-Yu Chen National Taiwan University.
Chapter 2 Robot Kinematics: Position Analysis
CSC418 Computer Graphics n Animation Principles n Keyframe Animation.
Rotations and Translations
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
KINEMATICS of a ROLLING BALL Wayne Lawton Department of Mathematics National University of Singapore Lecture based on my student’s MSc.
1 CS 430/536 Computer Graphics I 3D Transformations World Window to Viewport Transformation Week 2, Lecture 4 David Breen, William Regli and Maxim Peysakhov.
Computer Animation III
Advanced Computer Graphics Spring 2014
1 Fundamentals of Robotics Linking perception to action 2. Motion of Rigid Bodies 南台科技大學電機工程系謝銘原.
Lecture 13Slide Fall 2002 Animation. Lecture Fall 2002 Computer Animation Animation Methods Keyframing Interpolation Kinematics Inverse.
110/27/ :47 Graphics II Animation Introduction and Motion Control Session 6.
Animation Dr. Amy Zhang Lecture 8. Reading 2  Hill, Chapters 5 / 7 / 10  Red Book, Chapter 3, “Viewing”  Red Book, Chapter 12, “Evaluators and NURBS”
EEE. Dept of HONG KONG University of Science and Technology Introduction to Robotics Page 1 Lecture 2. Rigid Body Motion Main Concepts: Configuration Space.
Lecture Fall 2002 Computer Animation III Quaternions Dynamics Some slides courtesy of Leonard McMillan and Jovan Popovic.
Rotation and Orientation: Fundamentals Jehee Lee Seoul National University.
Animation III.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Computer Animation 고려대학교 컴퓨터 그래픽스 연구실.
Rick Parent - CIS682 Rigid Body Dynamics simulate basic physics of an object subject to forces Keyframing can be tedious - especially to get ‘realism’
Euler Angles This means, that we can represent an orientation with 3 numbers Assuming we limit ourselves to 3 rotations without successive rotations about.
Week 5 - Monday.  What did we talk about last time?  Lines and planes  Trigonometry  Transforms  Affine transforms  Rotation  Scaling  Shearing.
Fundamentals of Computer Animation Orientation and Rotation.
Character Animation Forward and Inverse Kinematics
CPSC 641: Computer Graphics Rotation Representation and Interpolation
CS 445 / 645 Introduction to Computer Graphics
3D Kinematics Consists of two parts
Computer Animation cgvr.korea.ac.kr.
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 TRANSFORMATIONS
Rotation representation and Interpolation
Animation Lecture 10 Slide 1.
Rotational Kinematics
UMBC Graphics for Games
Synthesis of Motion from Simple Animations
Geometric Objects and Transformations (II)
VIRTUAL ENVIRONMENT.
Computer Graphics Lecture 15.
UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN
Rotation and Orientation: Fundamentals
Presentation transcript:

Lecture 11 Slide Fall 2003 Computer Animation II Orientation Interpolation Dynamics Some slides courtesy of Leonard McMillan and Jovan Popovic

Lecture 11 Slide Fall 2003 Review from Thursday Interpolation Splines Articulated bodies Forward kinematics Inverse Kinematics Optimization Gradient descent Following the steepest slope Lagrangianmultipliers Turn optimization with constraints into no constraints

Lecture 11 Slide Fall 2003 Debugging Debug all sub-parts as you write them Print as much information as possible Use simple test cases When stuck, use step-by-step debugging

Lecture 11 Slide Fall 2003 Grid acceleration Debug all these steps: Sphere rasterization Ray initialization Marching Object insertion Acceleration

Lecture 11 Slide Fall 2003 Final project First brainstorming session on Thursday Groups of three Proposal due Monday 10/27 A couple of pages Goals Progression Appointment with staff

Lecture 11 Slide Fall 2003 Computer-Assisted Animation Keyframing automate the inbetweening good control less tedious creating a good animation still requires considerable skill and talent Procedural animation describes the motion algorithmically express animation as a function of small number of parameteres Example: a clock with second, minute and hour hands hands should rotate together express the clock motions in terms of a “seconds” variable the clock is animated by varying the seconds parameter Example 2: A bouncing ball Abs(sin(ωt+θ 0 ))*e -kt

Lecture 11 Slide Fall 2003 Computer-Assisted Animation Physically Based Animation Assign physical properties to objects (masses, forces, inertial properties) Simulate physics by solving equations Realistic but difficult to control Motion Capture Captures style, subtle nuances and realism You must observe someone do something

Lecture 11 Slide Fall 2003 Overview Interpolation of rotations, quaternions Euler angles Quaternions Dynamics Particles Rigid body Deformable objects

Lecture 11 Slide Fall 2003 Interpolating Orientations in 3-D Rotation matrices Given rotation matrices M i and time t i, find M(t) such that M(t i )=M i.

Lecture 11 Slide Fall 2003 Flawed Solution Interpolate each entry independently Example: M 0 is identity and M 1 is 90 o around x-axisIs Is the result a rotation matrix? NO: For example, RRTdoes not equal identity. This interpolation does not preserve rigidity (angles and lengths)

Lecture 11 Slide Fall D rotations How many degrees of freedom for 3D orientations? 3 degrees of freedom: e.g. direction of rotation and angle Or 3 Euler angles

Lecture 11 Slide Fall 2003 Euler Angles An Euler angle is a rotation about a single axis. Any orientation can be described composing three rotation around each coordinate axis. Roll, pitch and yaw Courtesy of Gernot Hoffmann. Used with permission.

Lecture 11 Slide Fall 2003 Interpolating Euler Angles Natural orientation representation: angles for 3 degrees of freedom Unnatural interpolation: A rotation of 90 o first around Z and then around Y = 120 o around (1, 1, 1). But 30oaround Z then Y differs from 40 o around (1, 1, 1).

Lecture 11 Slide Fall 2003 Gimballock Gimbal lock: two or more axis align resulting in a loss of rotation degrees of freedom.

Lecture 11 Slide Fall 2003 Demo By Sobeitvoid from See also

Lecture 11 Slide Fall 2003 Euler angles in the real world Apollo inertial measurement unit To prevent lock, they had to add a fourth Gimbal!

Lecture 11 Slide Fall 2003 Recap: Euler angles 3 angles along 3 axis Poor interpolation, lock But used in flight simulation, etc. because natural

Lecture 11 Slide Fall 2003 Overview Interpolation of rotations, quaternions Euler angles Quaternions Dynamics Particles Rigid body Deformable objects

Lecture 11 Slide Fall 2003 Solution: Quaternion Interpolation Interpolate orientation on the unit sphere By analogy: 1-, 2-, 3-DOF rotations as constrained points on 1, 2, 3-spheres

Lecture 11 Slide Fall D sphere and complex plane Interpolate orientation in 2D 1 angle But messy because modulo 2π Use interpolation in (complex) 2D plane Orientation = complex argument of the number

Lecture 11 Slide Fall 2003 Velocity issue & slerp linear interpolation (lerp) in the plane interpolates the straight line between the two orientations and not their spherical distance.Lerp(q 0, q 1,t )=q(t)=q 0 (1-t)+q 1 t => The interpolated motion does not have uniform velocity: it may speed up too much: Solution: Spherical linear interpolation (slerp): interpolate along the arc lines by adding a sine term.

Lecture 11 Slide Fall angle orientation Embed 2-sphere in 3D 2 angles Messy because modulo 2πand pole Use linear interpolation in 3D space Orientation = projection onto the sphere Same velocity correction

Lecture 11 Slide Fall angles Use the same principle interpolate in higher-dimensional space Project back to unit sphere Probably need the 3-sphere embedded in 4D More complex, harder to visualize Use the so-called Quaternions Due to Hamilton (1843); also Shoemake, Siggraph'85

Lecture 11 Slide Fall 2003 Quaternions Quaternions are unit vectors on 3-sphere (in 4D) Right-hand rotation of θ radians about v is q = {cos(θ/2); vsin(θ/2)} Often noted (s, v) What if we use –v ? What is the quaternion of Identity rotation? Is there exactly one quaternion per rotation? What is the inverse q -1 of quaternion q {a, b, c, d}?

Lecture 11 Slide Fall 2003 Quaternions Quaternions are unit vectors on 3-sphere (in 4D) Right-hand rotation of θ radians about v is q = {cos(θ/2); vsin(θ/2)} Often noted (s, v) What if we use –v ? What is the quaternion of Identity rotation? qi= {1; 0; 0; 0} Is there exactly one quaternion per rotation? No, q={cos(θ/2); vsin(θ/2)} is the same rotation as - q={cos((θ+2π)/2); vsin((θ+2π)/2)} Antipodal on the quaternion sphere What is the inverse q -1 of quaternion q {a, b, c, d}?

Lecture 11 Slide Fall 2003 Quaternion Algebra Two general quaternionsare multiplied by a special rule: Sanity check : {cos(α/2); vsin(α/2)} {cos(β/2); vsin(β/2)}

Lecture 11 Slide Fall 2003 Quaternion Algebra Two general quaternionsare multiplied by a special rule: Sanity check : {cos(α/2); vsin(α/2)} {cos(β/2); vsin(β/2)} {cos(α/2)cos(β/2) -sin(α/2)v. sin(β/2)} v, cos(β/2) sin(α/2) v+ cos(α/2)sin(β/2) v+v×v} {cos(α/2)cos(β/2) -sin(α/2)sin(β/2), v(cos(β/2) sin(α/2) + cos(α/2) sin(β/2))} {cos((α+β)/2), v sin((α+β)/2) }

Lecture 11 Slide Fall 2003 Quaternion recap 1 (wake up) 4D representation of orientation q= {cos(θ/2); vsin(θ/2)} Inverse is q -1 =(s, -v) Multiplication rule Consistent with rotation composition How do we apply rotations? How do we interpolate?

Lecture 11 Slide Fall 2003 Quaternion Algebra Two general quaternionsare multiplied by a special rule: To rotate 3D point/vector p by q, compute q{0; p} q -1 p= (x,y,z) q={ cos(θ/2), 0,0,sin(θ/2) } = {c, 0,0,s} q{0,p}= {c, 0, 0, s} {0, x, y, z} ={c.0-zs, cp+0(0,0,s)+ (0,0,s) ×p} ={-zs, c p+ (-sy,sx,0) } q{0,p} q -1 = {-zs, c p+ (-sy,sx,0) } {c, 0,0,-s} = {-zsc-(cp+(-sy,sx,0)).(0,0,-s), -zs(0,0,-s)+c(cp+(-sy, sx,0))+ (c p+ (-sy,sx,0) ) x (0,0,-s) } = {0, (0,0,zs 2 )+c 2 p+(-csy, csx,0)+(-csy, csx, 0)+(s 2 x, s 2 y, 0)} = {0, (c 2 x-2csy-s 2 x, c 2 y+2csx-s 2 y, zs 2 +sc 2 )}

Lecture 11 Slide Fall 2003 Quaternion Algebra Two general quaternionsare multiplied by a special rule: To rotate 3D point/vector p by q, compute q{0; p} q -1 Quaternionsare associative: (q1 q2) q3 = q1 (q2 q3) But not commutative: q1 q2 ≠q2 q1

Lecture 11 Slide Fall 2003 Quaternion Interpolation (velocity) The only problem with linear interpolation (lerp) of quaternionsis that it interpolates the straight line (the secant) between the two quaternionsand not their spherical distance. As a result, the interpolated motion does not have smooth velocity: it may speed up too much in some sections: Spherical linear interpolation (slerp) removes this problem by interpolating along the arc lines instead of the secant lines.

Lecture 11 Slide Fall 2003 Quaternion Interpolation Higher-order interpolations: must stay on sphereSee Shoemakepaper for: Matrix equivalent of composition Details of higher-order interpolation More of underlying theory Problems No notion of favored direction (e.g. up for camera) No notion of multiple rotations, needs more key points

Lecture 11 Slide Fall 2003 Quaternions Can also be defined like complex numbers a+bi+cj+dk Multiplication rules i 2 =j 2 =k 2 =-1 ij=k=-ji jk=i=-kj ki=j=-ik …

Lecture 11 Slide Fall 2003 Fun:Julia Sets in Quaternion space Mandelbrot set: Z n+1 =Z n 2 +Z 0 Julia set Z n+1 =Z n 2 +C Do the same with Quaternions! Rendered by Skal (Pascal Massimino) Images removed due to copyright considerations. See also

Lecture 11 Slide Fall 2003 Fun:Julia Sets in Quaternion space Julia set Z n+1 =Z n 2 +C Do the same with Quaternions! Rendered by Skal (Pascal Massimino) This is 4D, so we need the time dimension as well Images removed due to copyright considerations.

Lecture 11 Slide Fall 2003 Recap: quaternions 3 angles represented in 4D q= {cos(θ/2); vsin(θ/2)} Weird multiplication rules Good interpolation using slerp

Lecture 11 Slide Fall 2003 Overview Interpolation of rotations, quaternions Euler angles Quaternions Dynamics Particles Rigid body Deformable objects

Lecture 11 Slide Fall 2003 Break: movie time Pixar For the Bird