Realtime 3D Computer Graphics Virtual Reality

Similar documents
CS 4204 Computer Graphics

Basic Problem: Map a 3D object to a 2D display surface. Analogy - Taking a snapshot with a camera

4BA6 - Topic 4 Dr. Steven Collins. Chap. 5 3D Viewing and Projections

From 3D to 2D: Orthographic and Perspective Projection Part 1

Geometry for Computer Graphics

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

3D Viewing. Chapter 7. Projections. 3D clipping. OpenGL viewing functions and clipping planes

How to read Plans and Do Basic Drawings

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

521493S Computer Graphics. Exercise 2 & course schedule change

2D Geometrical Transformations. Foley & Van Dam, Chapter 5

INTRODUCTION TO RENDERING TECHNIQUES

Computer Graphics. Introduction. Computer graphics. What is computer graphics? Yung-Yu Chuang

Wallingford Public Schools - HIGH SCHOOL COURSE OUTLINE

Transformations in the pipeline

w = COI EYE view direction vector u = w ( 010,, ) cross product with y-axis v = w u up vector

Traditional Drawing Tools

Geometric Camera Parameters

The Geometry of Perspective Projection

2D Geometric Transformations

Introduction to Computer Graphics

A Short Introduction to Computer Graphics

TWO-DIMENSIONAL TRANSFORMATION

CS 4204 Computer Graphics

Solving Simultaneous Equations and Matrices

Scan-Line Fill. Scan-Line Algorithm. Sort by scan line Fill each span vertex order generated by vertex list

3D Math Overview and 3D Graphics Foundations

LEAVING CERT DCG SCHEME OF WORK

Creating 2D Drawings from 3D AutoCAD Models

SOEM 024: Computer Aided Design. E. Rozos

Technical Drawing Specifications Resource A guide to support VCE Visual Communication Design study design

The Essentials of CAGD

Blender addons ESRI Shapefile import/export and georeferenced raster import

Lecture 3: Coordinate Systems and Transformations

B2.53-R3: COMPUTER GRAPHICS. NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions.

Lecture 2: Homogeneous Coordinates, Lines and Conics

Lecture Notes. Fundamentals of Computer Graphics. Prof. Michael Langer School of Computer Science McGill University

OD1641 PRINCIPLES OF DRAFTING AND SHOP DRAWINGS

Orthogonal Projections

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

Affine Transformations

Kankakee Community College

Geometric Transformation CS 211A

Masters of Science in Software & Information Systems

CSE 564: Visualization. GPU Programming (First Steps) GPU Generations. Klaus Mueller. Computer Science Department Stony Brook University

Proseminar Graphikprogrammierung

How to Draw With Perspective. Created exclusively for Craftsy by Paul Heaston

Course Description. Spring

Anamorphic Projection Photographic Techniques for setting up 3D Chalk Paintings

Given a point cloud, polygon, or sampled parametric curve, we can use transformations for several purposes:

Understand the Sketcher workbench of CATIA V5.

Twelve. Figure 12.1: 3D Curved MPR Viewer Window

3. INNER PRODUCT SPACES

The Rocket Steam Locomotive - Animation

Architecture for Direct Model-to-Part CNC Manufacturing

Chapter 9. Editing Features. Learning Objectives

Geometry: Unit 1 Vocabulary TERM DEFINITION GEOMETRIC FIGURE. Cannot be defined by using other figures.

Creating detailed drawings

How To Fuse A Point Cloud With A Laser And Image Data From A Pointcloud

KINECT PROJECT EITAN BABCOCK REPORT TO RECEIVE FINAL EE CREDIT FALL 2013

Institution : Majmaah University. Academic Department : College of Science at AzZulfi. Programme : Computer Science and Information Course :

Rotation and Inter interpolation Using Quaternion Representation

Iris Sample Data Set. Basic Visualization Techniques: Charts, Graphs and Maps. Summary Statistics. Frequency and Mode

CS 534: Computer Vision 3D Model-based recognition

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

Computer Graphics Hardware An Overview

4. CAMERA ADJUSTMENTS

Animation (-4, -2, 0 ) + (( 2, 6, -4 ) - (-4, -2, 0 ))*.75 = (-4, -2, 0 ) + ( 6, 8, -4)*.75 = (.5, 4, -3 ).

Game Development in Android Disgruntled Rats LLC. Sean Godinez Brian Morgan Michael Boldischar

How To Draw A 3D Virtual World In 3D Space (Computer Graphics)

Essential Mathematics for Computer Graphics fast

GPU(Graphics Processing Unit) with a Focus on Nvidia GeForce 6 Series. By: Binesh Tuladhar Clay Smith

3D Drawing. Single Point Perspective with Diminishing Spaces

Bachelor of Games and Virtual Worlds (Programming) Subject and Course Summaries

Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 9 The Game Engine

Creating an Axonometric View in Rhino

3D Distance from a Point to a Triangle

MA 323 Geometric Modelling Course Notes: Day 02 Model Construction Problem

Introduction to 2D and 3D Computer Graphics Mastering 2D & 3D Computer Graphics Pipelines

Vector Notation: AB represents the vector from point A to point B on a graph. The vector can be computed by B A.

Introduction to Computer Graphics. Reading: Angel ch.1 or Hill Ch1.

An introduction to 3D draughting & solid modelling using AutoCAD

A. OPENING POINT CLOUDS. (Notepad++ Text editor) (Cloud Compare Point cloud and mesh editor) (MeshLab Point cloud and mesh editor)

Chapter 2 - Graphics Programming with JOGL

CATIA: Navigating the CATIA V5 environment. D. CHABLAT / S. CARO Damien.Chablat@irccyn.ec-nantes.fr

Optimizing Unity Games for Mobile Platforms. Angelo Theodorou Software Engineer Unite 2013, 28 th -30 th August

Jan Köhnlein and Helmut Weberpals

TABLE OF CONTENTS. INTRODUCTION... 5 Advance Concrete... 5 Where to find information?... 6 INSTALLATION... 7 STARTING ADVANCE CONCRETE...

Computer Applications in Textile Engineering. Computer Applications in Textile Engineering

Leaving Certificate. Design and Communication. (Ordinary Level and Higher Level)

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1

Castle Modeling. In this PDF tutorial we will be modeling a simple castle as pictured above.

Freehand Sketching. Sections

Technical Drawing. MEC1000 Spring 2006 Instructor: David Anderson

Basic controls of Rhinoceros 3D software

The Dot and Cross Products

MobiX3D: a player for displaying 3D content on mobile devices

Welcome to Corel DESIGNER, a comprehensive vector-based drawing application for creating technical graphics.

COM CO P 5318 Da t Da a t Explora Explor t a ion and Analysis y Chapte Chapt r e 3

Transcription:

Realtime 3D Computer Graphics Virtual Realit Viewing and projection Classical and General Viewing

Transformation Pipeline CPU Pol. DL Pixel Per Vertex Texture Raster Frag FB object ee clip normalized device window v e r t e x Modelview Matrix Projection Matrix Perspective Division Viewport Transform Modelview Modelview!!! Projection other calculations here material " color shade model (flat) polgon rendering mode polgon culling clipping Viewing Process for Seeing a world Projection of a 3D world onto a 2D plane Snthetic Camera Model Location of viewer and view plane What can be seen (Culling and Clipping) How relationships are maintained Parallel Lines Angles Distances (Foreshortening) Relation to Viewer Objects vs. Scenes: Some viewing techniques better suited for viewing single objects rather than entire scenes Viewing an object from the outside (external viewing) Engineering, External Buildings, Viewing an object from within (internal viewing) Internal Buildings, Games,

Viewing and projection Planar Geometric Projections Map transformed world from 3D to 2D. b appropriate projection matrices. Several projection tpes exist: Perspective projection is of major interest for 3D-CG. Parallel projection importance Pipeline often separates projection normalization from 3D-2D projection for additional depth testing. Calculation of the perspective projection for VR displas: Displa often require off-axis projection. COPs are constantl moving. Projection calculation has to be performed for 2 ees. Image planes might not be flat. Top (Plan) Front Parallel OrthographicOblique Side Cabinet Axonometric Cavalier One-point Perspective Two-point Threepoint Definitions Projection: a transformation that maps from a higher dimensional space to a lower dimensional space (e.g. 3D->2D) Center of projection (COP): the position of the ee or camera with respect to which the projection is performed (also ee point, camera point, proj. reference point) Direction of projection (DOP): the direction of an ee or camera assumed to be infinite far awa. Projection plane: in a 3D->2D projection, the plane to which the projection is performed (also view plane) Projectors: lines from coordinate in original space to coordinate in projected space

Projections Perspective: Distance to COP is finite Parallel: Distance to COP is infinite Planar Geometric Projections Projection onto a plane Projectors are straight lines Alternatives: Some Cartographic Projections Omnimax Top (Plan) Orthographic Front Side Planar Geometric Projections Parallel Axonometric Perspective One-point Oblique Two-point Cabinet Cavalier Three-point

Parallel Projections Orthographic: Direction of projection is orthogonal to the projection plane Elevations: Projection plane is perpendicular to a principal axis Front Top (Plan) Side Axonometric: Projection plane is not orthogonal to a principal axis Isometric: Direction of projection makes equal angles with each principal axis. Oblique: Direction of projection is not orthogonal to the projection plane; projection plane is normal to a principal axis Cavalier: Direction of projection makes a 45 angle with the projection plane Cabinet: Direction of projection makes a 63.4 angle with the projection plane Orthographic Projections Special case of perspective projection Parallel projectors perpendicular to projection plane Top (Plan) Orthographic Front Side Planar Geometric Projections Parallel Axonometric Perspective One-point Oblique Two-point Cabinet Cavalier Three-point Multiview Projection Plane Parallel to Principle Faces Classical Drafting Views Preserves both distance and angles Suitable to Object Views, not scenes (a): Front-Elevation (b): Top or Plan-Elevation (c): Side-Elevation (b) (a) (c)

Axonometric Projections Projection plane can have an orientation to object Parallel lines preserved Angles are not preserved Foreshortening: Length is shorter in image space than in object space Uniform Foreshortening (Perspective projections: foreshortening is dependent on distance from object to COP) Top (Plan) Orthographic Front Side Planar Geometric Projections Parallel Axonometric Perspective One-point Oblique Two-point Cabinet Cavalier Three-point Isometric: Smmetric to three faces Dimetric: Smmetric to two faces Trimetric: General Axonometric case Oblique Projections Parallel Projections not perpendicular to projection plane Oblique projection tpes: Cavalier: 45-degree Angles from Projection Plane Top (Plan) Orthographic Front Side Cabinet: Arctan(2) or 63.4-degree Angles from Projection Plane Planar Geometric Projections Parallel Axonometric Perspective One-point Oblique Two-point Cabinet Cavalier Three-point

Perspective Projections First discovered b Donatello, Brunelleschi, and DaVinci during Renaissance Parallel lines appear to converge to single point Foreshortening: Objects closer to viewer look larger Length is not preserved Depends on distance from viewer Top (Plan) Orthographic Front Side Planar Geometric Projections Parallel Axonometric Perspective One-point Oblique Two-point Cabinet Cavalier Three-point (a) Three-point: Three principal axes cut b projection plane Three axis vanishing points (b) Two-point: Two principal axes cut b projection plane Two axis vanishing points (c) One-point: One principal axis cut b projection plane One axis vanishing point Vanishing Points Perspective Projection of an set of parallel line (not perpendicular to the projection plane) converge to a vanishing point Infinit of vanishing points one of each set of parallel lines Axis Vanishing Points Vanishing point of lines parallel to one of the three principal axes There is one axis vanishing point for each axis cut b the projection plane At most, 3 such points Perspective Projections are categorized b number of axis vanishing points

Perspective Foreshortening How tall should this bunn be? Projection Transformations NOTE: Throughout the following discussions, we assume a camera coordinate sstem with COP at the origin and DOP along the z axis (OpenGL-like). The concepts are the same for an arbitrar viewing configuration.

Orthogonal Projections DOP parallel to z-axis Looking down negative z Displa Plane at z=0 Special Case of Perspective Projection Z Orthogonal Projections DOP parallel to z-axis Looking down negative z Displa Plane at z=0 Special Case of Perspective Projection Z

Perspective Projection: Points onto a Plane Projection of world onto displa plane involves a perspective transformation: p =M per p Observe:! Results in non-uniform foreshortening, not affine, not reversible One-point perspective projection Center of Projection on the poitive z-axis Viewplane in the x- plane. # Geometr of similar triangles. Top view: View plane p =? d Z x p = xd/(d+z) = x/(1+(z/d)) p = d/(d+z) = /(1+(z/d)) z p = 0

One-point perspective projection Center of Projection on the positive z-axis Viewplane in the x- plane. # Geometr of similar triangles. Top view: View plane p =? d Z x p = xd/(d+z) = x/(1+(z/d)) p = d/(d+z) = /(1+(z/d)) z p = 0 One-point perspective projection Center of Projection at origin Viewplane not in the x- plane. View plane p =? d Point p in 3D become lines through origin in 4D:! As long as w! 0, we can recover original point p per = M per p = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1/d 0 x z 1 = x z z/d = x/(z/d) /(z/d) d 1

One-point perspective projection Center of Projection at origin Viewplane not in the x- plane. View plane p =? d Point p in 3D become lines through origin in 4D:! As long as w! 0, we can recover original point p per = M per p = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1/d 0 x z 1 = Perspective division x z z/d = x/(z/d) /(z/d) d 1 3D Viewing Transformation Projection Matrixes Input 3D World Coordinates Output 3D Normalized Device Coordinates (a.k.a. Window Coordinates) Just set z to zero (or ignore)

Projection normalization Several issues are not address with the simple projection matrices we have developed: 3D Clipping Efficienc in a Frustum Viewing Volume Hidden Surface Efficienc Solution: Use Projection Normalization Get rid of perspective and other problem projections! Everthing is easier in an canonical, orthogonal world! Distort world until viewing volume in world fits into a parallel canonical view volume. Find a transformation that distorts the vertices in a wa that we can use a simple canonical projection. +x Front Clipping Plane z + 1,1,-1 Back Clipping Plane -z - -1,-1,-1 View Volume -x Idea: Canonical View Volume Define Viewing Volume via Canonical View Volumes Plus: Easier Clipping Minus: Another Transformation OpenGL s canonical view volume (other APIs ma be different): -1,-1,1

Projection Normalization Distort world until viewing volume in world fits into a parallel canonical view volume. Find a transformation that distorts the vertices in a wa that we can use a simple canonical projection. -1,-1,1 Camera Transformation and Projection Normalization for Orthogonal Views Camera Transformation in Orthogonal Views (M cam ) 1. Convert World to Camera Coordinates Camera at origin, looking in the z direction Displa plane center along the z axis 2. Combinations of translate, scale, and rotate transformations Can be accomplished through camera location specification Projection Normalization for Orthographic Views (M ortho ) 1. Translate along the z axis until the front clipping plane is at the origin 2. Scale in all three dimensions until the viewing volume is in canonical form

Projection Normalization for Orthogonal Parallel Projections Mapping a orthogonal view volume to a canonical view volume requires two affine transformations: these can be concatenated to The camera is pointing in the negative z direction. All projectors are from infinit towards the origin. Hence M can be written as: OpenGL note: OpenGL offers just an interface for the orthogonal case using glortho(xmin, xmax, max, min, near, far) Projection Normalization for Orthogonal Parallel Projections Finall, the resulting matrix has to be post multiplied b a simple orthogonal parallel projection