Coordinate Transformations. Coordinate Transformation. Problem in animation. Coordinate Transformation. Rendering Pipeline $ = $! $ ! $!

Similar documents
Fundamentals of Computer Animation

IMAGE-BASED RENDERING AND ANIMATION

CS 445 / 645 Introduction to Computer Graphics. Lecture 21 Representing Rotations

Fundamentals of Computer Animation

CS770/870 Spring 2017 Quaternions

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1

Animation and Quaternions

Animation. CS 4620 Lecture 32. Cornell CS4620 Fall Kavita Bala

CS230 : Computer Graphics Lecture 12: Introduction to Animation. Tamar Shinar Computer Science & Engineering UC Riverside

Animation. Traditional Animation Keyframe Animation. Interpolating Rotation Forward/Inverse Kinematics

Rotational Joint Limits in Quaternion Space. Gino van den Bergen Dtecta

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation

Rotations in 3D Graphics and the Gimbal Lock

CS354 Computer Graphics Rotations and Quaternions

Animations. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Kavita Bala

Computer Animation Fundamentals. Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics

Autonomous Navigation for Flying Robots

3D Rotation: more than just a hobby

Animating orientation. CS 448D: Character Animation Prof. Vladlen Koltun Stanford University

Transformation. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

3D Kinematics. Consists of two parts

3D Mathematics. Co-ordinate systems, 3D primitives and affine transformations

Transformations Week 9, Lecture 18

GEOMETRIC TRANSFORMATIONS AND VIEWING

Quaternions & Rotation in 3D Space

Visual Recognition: Image Formation

ME 597: AUTONOMOUS MOBILE ROBOTICS SECTION 2 COORDINATE TRANSFORMS. Prof. Steven Waslander

Quaternions and Rotations

Computer Animation II

Orientation & Quaternions

Keyframe Animation. Animation. Computer Animation. Computer Animation. Animation vs Modeling. Animation vs Modeling

Animation Curves and Splines 2

Analysis of Euler Angles in a Simple Two-Axis Gimbals Set

3D Rotations and Complex Representations. Computer Graphics CMU /15-662, Fall 2017

Advanced Computer Graphics Transformations. Matthias Teschner

3D Transformations World Window to Viewport Transformation Week 2, Lecture 4

Rotation with Quaternions

Realization of orientation interpolation of 6-axis articulated robot using quaternion

Animation. CS 4620 Lecture 19. Cornell CS4620 Fall 2013 Lecture Steve Marschner (with previous instructors James/Bala)

Rotation parameters for model building and stable parameter inversion in orthorhombic media Cintia Lapilli* and Paul J. Fowler, WesternGeco.

12.1 Quaternions and Rotations

Inertial Measurement Units II!

Transformations: 2D Transforms

Today. Today. Introduction. Matrices. Matrices. Computergrafik. Transformations & matrices Introduction Matrices

Application of Quaternion Interpolation (SLERP) to the Orientation Control of 6-Axis Articulated Robot using LabVIEW and RecurDyn

Quaternions and Rotations

CS 475 / CS 675 Computer Graphics. Lecture 16 : Interpolation for Animation

Computer Graphics with OpenGL ES (J. Han) Chapter IV Spaces and Transforms

2D transformations: An introduction to the maths behind computer graphics

Quaternions and Rotations

Le s s on 02. Basic methods in Computer Animation

3D GRAPHICS. design. animate. render

Quaternions and Euler Angles

Basic Elements. Geometry is the study of the relationships among objects in an n-dimensional space

3D Transformations and Complex Representations. Computer Graphics CMU /15-662, Fall 2016

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective

Reading. Topics in Articulated Animation. Character Representation. Animation. q i. t 1 t 2. Articulated models: Character Models are rich, complex

Aalto CS-C3100 Computer Graphics, Fall 2016

Rotations (and other transformations) Rotation as rotation matrix. Storage. Apply to vector matrix vector multiply (15 flops)

2D and 3D Coordinate Systems and Transformations

Representations and Transformations. Objectives

For each question, indicate whether the statement is true or false by circling T or F, respectively.

Three-Dimensional Viewing Hearn & Baker Chapter 7

Moving Objects. We need to move our objects in 3D space.

Computer Vision I - Appearance-based Matching and Projective Geometry

CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014

CS184: Using Quaternions to Represent Rotation

Overview. By end of the week:

Computer Vision cmput 428/615

3D Modelling: Animation Fundamentals & Unit Quaternions

Inverse Kinematics Programming Assignment

Working With 3D Rotations. Stan Melax Graphics Software Engineer, Intel

Click the mouse button or press the Space Bar to display the answers.

Transformations. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Why animate humans? Why is this hard? Aspects of the Problem. These lectures. Animation Apreciation 101

Animation. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 4/23/07 1

Animation. Animation

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Introduction to Homogeneous coordinates

3D Transformations. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 11

QUATERNIONS AND ROTATIONS

Part II: OUTLINE. Visualizing Quaternions. Part II: Visualizing Quaternion Geometry. The Spherical Projection Trick: Visualizing unit vectors.

Quaternions and Rotations

Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

Reading. Hierarchical Modeling. Symbols and instances. Required: Angel, sections , 9.8. Optional:

CS 130 Final. Fall 2015

Objectives. transformation. General Transformations. Affine Transformations. Notation. Pipeline Implementation. Introduce standard transformations

a a= a a =a a 1 =1 Division turned out to be equivalent to multiplication: a b= a b =a 1 b

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

ME5286 Robotics Spring 2014 Quiz 1 Solution. Total Points: 30

Splines & Quaternions (splines.txt) by Jochen Wilhelmy a.k.a. digisnap

CMSC 425: Lecture 6 Affine Transformations and Rotations

Development of intelligent systems

Specifying Complex Scenes

Computer Graphics Geometric Transformations

CS612 - Algorithms in Bioinformatics

Vector Calculus: Understanding the Cross Product

PSE Game Physics. Session (3) Springs, Ropes, Linear Momentum and Rotations. Oliver Meister, Roland Wittmann

Transcription:

Rendering Pipeline Another look at rotation Photography: real scene camera (captures light) photo processing Photographic print processing Computer Graphics: 3D models camera tone model reproduction (focuses simulated lighting) synthetic image Coordinate Transformations How to specify placement of individual objects into a scene Two coordinate systems Object coordinate system World coordinate system Coordinate Transformation Transformation Matrix & xw # & m m m3 m4 # & xo # yw m m m3 m4 ' yo = z 3 3 33 34 w m m m m zo % 4 4 43 { % m m m m 44 44 4444 3 %{ world transformation object Coordinate Transformation Problem in animation Rotation & ' sin( = sin( ( ) % R z # R x & ( ) = % sin( ' sin( # Transformation is a function of time May need to interpolate How to represent a given orientation R y & ( ) = ' sin( % sin( #

6. Straight ahead action and Pose-to-pose action The idea behind keyframing The two main approaches to hand drawn animation. Straight ahead action the animator works straight ahead from his first drawing in the scene. Pose-to-pose (keyframing) the animator plans his actions, figures out just what drawings will be needed to animate the business, makes the drawings concentrating on the poses,... and then draws the inbetweens. Link Animator provides position/orientation at key points in time System calculates position/orientation for frames between keys using interpolation. Transformation matrix & xw # & m m m3 m4 # & xo # yw m m m3 m4 ' yo = z 3 3 33 34 w m m m m zo % 4 4 43 { % m m m m 44 44 4444 3 %{ world transformation translation object Transformation matrix Can we use as a standard for Can we interpolate transformation matrices, element by element, to get orientation between keys? rotation Transformation matrix Can we use as a standard for Survey says: NO Interpolated values may not be valid transformation matrix Rotation matrix Rotation matrix factoids: Rotation matrices are orthogonal M - = M T MM T = I det (M) = Note: problem is with rotation, not translation When interpolating, resulting matrices may not have these properties

Transformation matrix Consider the following & # %' Start with 9 degree y-axis rotation & % ' # End with -9 degree y-axis rotation & % # Interpolated matrix halfway Fixed Angle / Euler angles Angles used to rotate around fixed axes Fixed order of rotation is implied E.g. x-y-z (First x, then y, then z) Any ordering will do as long as you re consistent. Given by a triplet E.g. (, 45, 9) How many degrees of freedom now? Coordinate Transformation Beware: Transformation is not communitive Order of Fixed Angles is important Ry T S Rx Ry S Rx T Euler Angles Fixed angle situation where angles of rotation are the x, y, z axis with respect to the object coordinate system. Fixed Angle / Euler angles Can we use as a standard for Let s go to the video tape. Fixed Angle / Euler angles Can we use as a standard for Survey says: NO Interpolated values are indeed valid, however Interpolated values may seem unnatural Plus.the dreaded gimbal lock 3

Fixed Angle / Euler angles Gimbal lock Gimbal lock is the phenomenon of two rotational axis of an object pointing in the same direction. Easily achieved by rotating about an axis 9 degrees Loss of one degree of freedom Link Fixed Angle / Euler Angle This is a gimble Used for aircraft navigation Gimble lock was almost a deadly problem in Apollo. (link) Euler s Rotation Theorem One orientation can be derived from another by a single rotation about an axis. Define an orientation by a 4-tuple (x, y, z, θ) - rotate θ around the axis (x,y,z) Interpolating From (A, θ ) to (A, θ ) Intermediate axis can be determined by rotating from one axis to the next. Intermediate angle can be simply interpolated. Α θ Α Y θ A x A θ Z X. Interpolate axis from A to A Rotate axis about A x A to get A. Interpolate angle from θ to θ to get θ 3. Rotate object by θ around A Problem with angle/axis Interpolates fine but Can t concatenate rotations. To fix this enter the Quaternion. 4

Similar idea to axis/angle Define an orientation by a 4-tuple [w, x, y, z] Or by a pair [w, v] where w is a scalar and v is a 3d vector. Technically, a quaternion is a 3D extension of complex numbers. q = w + xi + yj + zk Where w, x, y, and z are all real numbers. And i = j = k = sqrt (-) There is an algebra built around this definition. Quaternion math Given quaternions q =[w, x, y, z ] = [w, v ] q =[w, x, y, z ] = [w, v ] Quaternion addition: q + q = [w +w, v +v ] q + q = [w +w, x + x, y + y, z + z ] Quaternion math Quaternion multiplication (q * q ) = [w w - v v, w v + w w + v v ] (q * q ).w = (w w - x x - y y - z z ) (q * q ).x = (w x + x w + y z - z y ) (q * q ).y = (w y - x z + y w + z x ) (q * q ).z = (w z + x y - y x + z w ) Note: quaternion multiplication is not commutative. Quaternion math Magnitide of a quaternion q = sqrt (w + x + y + z ) Yes, you can (and should) normalize quaternions. Identity properties q[ ] = q [ s v q ] = q qq = [ ] and rotation. essentially encodes the info of an axis/angle rotation R θ, (x,y,z) = [ θ/), sin (θ/) (x, y, z) ] 5

A series of rotations can be accomplished by using quaternion multiplication Rotation by p then by q is the same as rotation by qp To interpolate quaternions Interpolate each element one at a time Sort of. More on this when we talk about interpolation next time Questions. Rotation During rendering of a scene, API or render will need the 3x3 rotation portion of the transformation matrix. Thankfully, there are conversions to and from quaternions to rotation matrix. Conversions: Quaternion -> Rotation Matrix q = [w, x, y, z], q normalized # y z xy wz xz + wy & % ( % xy + wz x z yz wx ( % xz wy yz + wx x y ' ( Conversions: Rotation Matrix -> Quaternion & m m m3 m4 # m m m3 m4 m 3 m3 m33 m34 4 4 43 4 % m m m m 4 44 4444 3 transformation w = m + m + m 33 + x = m + w y = m + w Other conversions To/from Euler angles See Shoemake paper on READING LIST Questions? z = m 33 + w 6

Question Given an object to be placed / oriented in a scene How does one specify this placement / orientation for each frame Use translation (x,y,z) and quaternion [w, x, y, z] How many parameters are required? 7 Each controllable parameter is a degree of freedom Degree of Freedom problem 3 objects minute animation 3 frames / second 3 frames x 6 seconds = 8 frames Must define position and orientation of each (7 degrees of freedom/object) = degrees of freedom 8 frames x dof = 378 values Animation There is no particular mystery in animation it s really very simple, and like anything that is simple, It is about the hardest thing in the world to do -- Bill Tytla, Disney Animator, 937 Next time Next time Interpolation schemes Assignment # Class Web Site: http://www.cs.rit.edu/~jmg/animation Any questions? 7