Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

MAT 594CM S2010Fundamentals of Spatial ComputingAngus Forbes Overview Goals of the course: 1. to introduce real-time 3D graphics programming with openGL.
Computer Graphics Lecture 4 Geometry & Transformations.
1 Computer Graphics Chapter 8 3D Transformations.
Week 15 - Monday.  What did we talk about last time?  Future of graphics  Hardware developments  Game evolution  Current research.
CS 4363/6353 INTRODUCTION TO COMPUTER GRAPHICS. WHAT YOU’LL SEE Interactive 3D computer graphics Real-time 2D, but mostly 3D OpenGL C/C++ (if you don’t.
3-D Geometry.
3D orientation.
CSCE 689: Computer Animation Rotation Representation and Interpolation
CSCE 641: Computer Graphics Rotation Representation and Interpolation Jinxiang Chai.
Now Playing: Gong Sigur Rós From Takk... Released September 13, 2005.
Orientations Goal: –Convenient representation of orientation of objects & characters in a scene Applications to: – inverse kinematics –rigid body simulation.
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Technical Background.
10/5/04© University of Wisconsin, CS559 Fall 2004 Last Time Compositing Painterly Rendering Intro to 3D Graphics Homework 3 due Oct 12 in class.
CS 450: COMPUTER GRAPHICS 3D TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
Rotations and Translations
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
CS 450: COMPUTER GRAPHICS QUATERNIONS SPRING 2015 DR. MICHAEL J. REALE.
Transformations Dr. Amy Zhang.
Week 2 - Wednesday CS361.
Computer Graphics World, View and Projection Matrices CO2409 Computer Graphics Week 8.
Geometric Transformations Jehee Lee Seoul National University.
Rotations and Translations
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
MIT EECS 6.837, Durand and Cutler Graphics Pipeline: Projective Transformations.
10/3/02 (c) 2002 University of Wisconsin, CS 559 Last Time 2D Coordinate systems and transformations.
SE 313 – Computer Graphics Lecture 8: Transformations and Projections Lecturer: Gazihan Alankuş 1.
CS 450: COMPUTER GRAPHICS PROJECTIONS SPRING 2015 DR. MICHAEL J. REALE.
CSE Real Time Rendering Week 5. Slides(Some) Courtesy – E. Angel and D. Shreiner.
Basic Perspective Projection Watt Section 5.2, some typos Define a focal distance, d, and shift the origin to be at that distance (note d is negative)
1 Chapter 2: Geometric Camera Models Objective: Formulate the geometrical relationships between image and scene measurements Scene: a 3-D function, g(x,y,z)
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 17, 2015 TRANSFORMATIONS AFFINE TRANSFORMATIONS QUATERNIONS.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
2/19/04© University of Wisconsin, CS559 Spring 2004 Last Time Painterly rendering 2D Transformations –Transformations as coordinate system changes –Transformations.
CS 445 / 645 Introduction to Computer Graphics Lecture 24 Final Exam Prep Lecture 24 Final Exam Prep.
Geometric Transformations Sang Il Park Sejong University Many slides come from Jehee Lee’s.
Affine Geometry.
Computer Graphics Matrices
This Week WeekTopic Week 1 Coordinate Systems, Basic Functions Week 2 Trigonometry and Vectors (Part 1) Week 3 Vectors (Part 2) Week 4 Vectors (Part 3:
Coordinate Systems Lecture 1 Fri, Sep 2, The Coordinate Systems The points we create are transformed through a series of coordinate systems before.
CS 445 / 645: Introductory Computer Graphics Review.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
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.
Viewing and Projection. The topics Interior parameters Projection type Field of view Clipping Frustum… Exterior parameters Camera position Camera orientation.
3D GRAPHICS RENDERING PIPELINE CS / TECHNICAL BACKGROUND PAGE 11.
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Image Warping 2D Geometric Transformations
3D Ojbects: Transformations and Modeling. Matrix Operations Matrices have dimensions: Vectors can be thought of as matrices: v=[2,3,4,1] is a 1x4 matrix.
Introduction to Computer Graphics
- Introduction - Graphics Pipeline
Computer Animation Algorithms and Techniques
CPSC 641: Computer Graphics Rotation Representation and Interpolation
Week 5 - Friday CS361.
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 TRANSFORMATIONS
CSCE 441 Computer Graphics 3-D Viewing
3D Transformations Source & Courtesy: University of Wisconsin,
CENG 477 Introduction to Computer Graphics
CS451Real-time Rendering Pipeline
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
Computer Animation and Visualisation Lecture 4. Skinning
(c) University of Wisconsin, CS559
UMBC Graphics for Games
UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN
Presentation transcript:

Week 5 - Wednesday

 What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions

 Quaternions are a compact way to represent orientations  Pros:  Compact (only four values needed)  Do not suffer from gimbal lock  Are easy to interpolate between  Cons:  Are confusing  Use three imaginary numbers  Have their own set of operations

 A quaternion has three imaginary parts and one real part  We use vector notation for quaternions but put a hat on them  Note that the three imaginary number dimensions do not behave the way you might expect

 Multiplication  Addition  Conjugate  Norm  Identity

 Inverse  One (useful) conjugate rule:  Note that scalar multiplication is just like scalar vector multiplication for any vector  Quaternion quaternion multiplication is associative but not commutative  For any unit vector u, note that the following is a unit quaternion:

 Take a vector or point p and pretend its four coordinates make a quaternion  If you have a unit quaternion the result of is p rotated around the u axis by 2   Note that, because it's a unit quaternion,  There are ways to convert between rotation matrices and quaternions  The details are in the book

 Short for spherical linear interpolation  Using unit quaternions that represent orientations, we can slerp between them to find a new orientation at time t = [0,1], tracing the path on a unit sphere between the orientations  To find the angle  between the quaternions, you can use the fact that cos  = q x r x + q y r y + q z r z + q w r w

 If we animate by moving rigid bodies around each other, joints won't look natural  To do so, we define bones and skin and have the rigid bone changes dictate blended changes in the skin

 The following equation shows the effect that each bone i (and its corresponding animation transform matrix B i (t) and bone to world transform matrix M i ) have on the p, the original location of a vertex  Vertex blending is popular in part because it can be computed in hardware with the vertex shader

 Morphing is the technique for interpolating between two complete 3D models  It has two problems:  Vertex correspondence ▪ What if there is not a 1 to 1 correspondence between vertices?  Interpolation ▪ How do we combine the two models?

 We're going to ignore the correspondence problem (because it's really hard)  If there's a 1 to 1 correspondence, we use parameter s  [0,1] to indicate where we are between the models and then find the new location m based on the two locations p 0 and p 1  Morph targets is another technique that adds in weighted poses to a neutral model

 Finally, we deal with the issue of projecting the points into view space  Since we only have a 2D screen, we need to map everything to x and y coordinates  Like other transforms, we can accomplish projection with a 4 x 4 matrix  Unlike affine transforms, projection transforms can affect the w components in homogeneous notation

 An orthographic projection maintains the property that parallel lines are still parallel after projection  The most basic orthographic projection matrix simply removes all the z values  This projection is not ideal because z values are lost  Things behind the camera are in front  z-buffer algorithms don't work

 To maintain relative depths and allow for clipping, we usually set up a canonical view volume based on (l,r,b,t,n,f)  These letters simply refer to the six bounding planes of the cube  Left  Right  Bottom  Top  Near  Far  Here is the (OpenGL) matrix that translates all points and scales them into the canonical view volume

 OpenGL normalizes to a canonical view volume from [-1,1] in x, [-1,1] in y, and [-1,1] in z  Just to be silly, SharpDX normalizes to a canonical view volume of [-1,1] in x, [-1,1] in y, and [0,1] in z  Thus, its projection matrix is:

 A perspective projection does not preserve parallel lines  Lines that are farther from the camera will appear smaller  Thus, a view frustum must be normalized to a canonical view volume  Because points actually move (in x and y) based on their z distance, there is a distorting term in the w row of the projection matrix

 Here is the SharpDX projection matrix  It is different from the OpenGL again because it only uses [0,1] for z

 Light  Materials  Sensors

 Read Chapter 5 for Friday  Exam 1 next Friday  Keep working on Project 2