IMAGE-BASED RENDERING AND ANIMATION

Similar documents
RASTERISED RENDERING

CS354 Computer Graphics Rotations and Quaternions

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

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

Computer Animation II

INTRODUCTION COMPUTER GRAPHICS AND INTERACTION. Christopher Peters. CST, KTH Royal Institute of Technology, Sweden

LIGHTING AND SHADING

INTRODUCTION COMPUTER GRAPHICS AND INTERACTION. Christopher Peters. CST, KTH Royal Institute of Technology, Sweden

GLOBAL ILLUMINATION. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION

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

Visual Recognition: Image Formation

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

3D GRAPHICS. design. animate. render

Orientation & Quaternions

Quaternions and Rotations

CS612 - Algorithms in Bioinformatics

Autonomous Navigation for Flying Robots

Computer Graphics: Viewing in 3-D. Course Website:

3D Modelling: Animation Fundamentals & Unit Quaternions

CS 130 Final. Fall 2015

HIERARCHICAL TRANSFORMATIONS A Practical Introduction

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

Computer Graphics 7: Viewing in 3-D

Quaternions and Rotations

Quaternions and Rotations

Computer Animation Fundamentals. Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics

Lab 2A Finding Position and Interpolation with Quaternions

12.1 Quaternions and Rotations

Quaternions & Rotation in 3D Space

Transformations Week 9, Lecture 18

Advanced Computer Graphics Transformations. Matthias Teschner

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

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

GEOMETRIC TRANSFORMATIONS AND VIEWING

3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models

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

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

Rotations in 3D Graphics and the Gimbal Lock

Fundamentals of Computer Animation

CS770/870 Spring 2017 Quaternions

Jorg s Graphics Lecture Notes Coordinate Spaces 1

The Graphics Pipeline and OpenGL I: Transformations!

Graphics and Interaction Rendering pipeline & object modelling

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

CS451Real-time Rendering Pipeline

Animation and Quaternions

HIERARCHICAL TRANSFORMATIONS A Practical Introduction

COMP30019 Graphics and Interaction Scan Converting Polygons and Lines

Inertial Measurement Units II!

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

COMPUTER GRAPHICS AND INTERACTION

Quaternions and Rotations

3D Transformations. CS 4620 Lecture 10. Cornell CS4620 Fall 2014 Lecture Steve Marschner (with previous instructors James/Bala)

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

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

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

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

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

Software Engineering. ò Look up Design Patterns. ò Code Refactoring. ò Code Documentation? ò One of the lessons to learn for good design:

6.837 Introduction to Computer Graphics Quiz 2 Thursday November 20, :40-4pm One hand-written sheet of notes allowed

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

HIERARCHICAL TRANSFORMATIONS A Practical Introduction

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

3D Kinematics. Consists of two parts

Geometric transformations in 3D and coordinate frames. Computer Graphics CSE 167 Lecture 3

COMP371 COMPUTER GRAPHICS

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

MTRX4700 Experimental Robotics

3D Rotation: more than just a hobby

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

COMP30019 Graphics and Interaction Rendering pipeline & object modelling

Lecture outline. COMP30019 Graphics and Interaction Rendering pipeline & object modelling. Introduction to modelling

EECE 478. Learning Objectives. Learning Objectives. Linear Algebra and 3D Geometry. Linear algebra in 3D. Coordinate systems

Lecture 4. Viewing, Projection and Viewport Transformations

Kinematics and Orientations

Computer graphics 2: Graduate seminar in computational aesthetics

Aalto CS-C3100 Computer Graphics, Fall 2016

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination

Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment

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

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

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects

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

Overview. By end of the week:

Computer Graphics. Lecture 02 Graphics Pipeline. Edirlei Soares de Lima.

Rasterization Overview

The Graphics Pipeline and OpenGL I: Transformations!

COMP3421. Vector geometry, Clipping

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

Animation. Animation

Game Architecture. 2/19/16: Rasterization

CSE4030 Introduction to Computer Graphics

Transformation. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

Matrix Operations with Applications in Computer Graphics

Applications of Dual Quaternions in Three Dimensional Transformation and Interpolation

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

Chapter 5. Projections and Rendering

Computer Graphics. Chapter 5 Geometric Transformations. Somsak Walairacht, Computer Engineering, KMITL

Spring 2011 Prof. Hyesoon Kim

Transcription:

DH2323 DGI17 INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION IMAGE-BASED RENDERING AND ANIMATION Christopher Peters CST, KTH Royal Institute of Technology, Sweden chpeters@kth.se http://kth.academia.edu/christopheredwardpeters

Graphics Pipeline Architecture Can divide pipeline into three conceptual stages: Application (input, animations, think SDL) Geometry (transforms, projections, lighting) Rasteriser (draw image as pixels) Application Geometry Rasteriser These define the core structure of the pipeline

Geometry Stage Responsible for polygon and vertex operations Consists of five sub-stages: Model and View Transform Lighting and Shading Projection Clipping Screen Mapping Model and View Transform Lighting Projection Clipping Screen Mapping

What is OpenGL? Software interface to graphics hardware Commands for interactive three-dimensional graphics Hardware independent interface Drawing operations performed by underlying system and hardware 2013 Christopher Peters, Simulating virtual crowds: A perceptual approach chpeters@kth.se

I. Image-based Rendering

Image-based Rendering X constitutes: Geometry Texture Lighting Material Parameterisation of the 'world'

Image-based Rendering How does f(.) manipulate X? Light Surface interaction Light transport Formulate model f(.) through assumptions

Image-based Rendering Computer Vision Image easy to acquire Solve inverse problem What parameters have generated the image?

Image-based Rendering Challenge: Given an image recover the parameters Texture Light Geometry Models still valid x i = f -1 (y i )

Image-based Rendering Rendering: generate images from viewpoints Image-based rendering: replace geometry and material attributes with real images Most realistic image? A photograph Lacks flexibility Cannot change lighting or viewpoint Combine images to produce a new one

Epipolar Geometry The geometry of stereo vision Two cameras viewing 3D scene from different positions Study geometric relations between 3D points and their 2D projections More images = more constraints

II. Animation

Traditional Animation Showing consecutive related static images one after another produces the perception of a moving image Master artists draw certain important keyframes in the animation Apprentices draw the multitude of frames inbetween these key-frames Called tweens

Computer Animation Objects have an initial configuration and a final configuration (often specified by the artist) Position, orientation, etc Computer calculates the intermediate configurations: interpolation Orientation Interpolation: Given two key-frame orientations, calculate an intermediate orientation between them

Question How do we interpolate orientations?

Question How do we interpolate orientations? Remember how they are represented 1) Rotations around axes 2) Rotation matrices

Question How do we interpolate orientations? Remember how they are represented 1) Rotations around axes 2) Rotation matrices Possible solutions: Euler angles and rotation matrix interpolation

#1: Euler Angles An Euler angle is a rotation around a single axis Any orientation can be specified by composing three rotations Each rotation is around one of the principle axes i.e. (x, y, z) first rotate around x, then y, then z Think of roll, pitch and yaw of a flight simulator When rotating about a single axis, is possible to interpolate a single value However, for more than one axis, interpolating individual angles will not work well Unpredictable intermediate rotations Gimbal lock

#2: Rotation Matrices Interpolating between two rotation matrices does not result in a rotation matrix Does not preserve rigidity of angles and lengths This result of an interpolation of 0.5 between the identity matrix and 90 degrees around the x-axis does not produce a valid rotation matrix:

Solution Use quaternion interpolation Quaternions don t suffer from Gimbal lock Can be represented as 4 numbers instead of 9 of a 3x3 matrix Trivial conversion between angle/axis representation Interpolation between two quaternions is easy (once you know how) Quaternion looks like this: q[w,(x,y,z)] q = w + xi + yj + zk also written q[w,v] where v = (x,y,z)

Representation For a right-hand rotation of θ radians about unit vector v, quaternion is: q = (cos(θ/2); v sin(θ/2)) Note how the 3 imaginary coordinates are noted as a vector Only unit quaternions represent rotations Such a quaternion describes a point on the 4D unit hypersphere Important note: q and q represent the exact same orientation Different methods for doing quaternion interpolation: LERP, SLERP (Spherical linear interpolation)

In Practice Not always the best choice Quaternions are (as you will have noticed) hard to visualise and think about If another method will do and is simpler, it will be a more appropriate choice But Extremely useful in many situations where other representations are awkward Easy to use in your own programs once you have a quaternion class See Animation track labs and GLM library

Reminders You should be working on Lab 3 Labs due on Friday 26 th May Canvas DH2323 submission will open this week Project work (due May 31st) Lab session: Today from 13:00-15:00, Visualization Studio 2017

Next lecture User studies and perception Will take place in B2 Monday 15 th May 10:00 12:00 2017