Unit 4 3D Viewing Pipeline Part - 2

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

Three Dimensional Viewing
Projection.
Three-Dimensional Viewing Sang Il Park Sejong University Lots of slides are stolen from Jehee Lee’s.
ENGINEERING GRAPHICS 1E7
ENGINEERING GRAPHICS 1E9
1 of 19 New Lecture And Lab Information Lectures: –Thursday 13:00 – 14:00 (A322) Does anyone miss lunch? –Friday 15:00 – 16:00 (A28) Labs: –Wednesday 10:00.
Classical Viewing CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
IT- 601: Computer Graphics Lecture-11 Mathematics of Projection Jesmin Akhter Lecturer,IIT Jahangirnagar University, Savar, Dhaka,Bangladesh.
Multi-View Drawing (Text Chapter 8)
Computer Graphics I, Fall 2010 Classical Viewing.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
1 E. Angel and D. Shreiner : Interactive Computer Graphics 6E © Addison-Wesley 2012 Classical Viewing Sai-Keung Wong ( 黃世強 ) Computer Science National.
1 Classical Viewing. 2 Objectives Introduce the classical views Compare and contrast image formation by computer with how images have been formed by architects,
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 67 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 67 Computer Graphics Three-Dimensional Graphics III.
Computer Graphics Bing-Yu Chen National Taiwan University.
Demetriou/Loizidou – ACSC330 – Chapter 5 Viewing Dr. Giorgos A. Demetriou Computer Science Frederick Institute of Technology.
I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam 3D Viewing I CIS 736 Computer Graphics Review of Basics 2 of 5: 3D Viewing.
CS5500 Computer Graphics March 12, 2007.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
Three-Dimensional Viewing
Three-Dimensional Viewing Hearn & Baker Chapter 7
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
SANTANA DRAFTING MULTIVIEWS 1 An introduction Mr. Fitzgerald Rm
Projection.
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
1 PTT 105/3: Engineering Graphics. TAXONOMY OF PLANAR GEOMETRIC PROJECTIONS PTT 105/3: Engineering Graphics 2 Planar Geometric Projections Parallel Multiview.
RAC/RA Projection Types of Projection Simple Projections Generalized Projection.
Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Computer Graphics Lecture 19 PROJECTIONS I Taqdees A. Siddiqi
Projection. Conceptual model of 3D viewing process.
Computer Graphics Projections.
PROJECTIONS PROJECTIONS 1. Transform 3D objects on to a 2D plane using projections 2 types of projections Perspective Parallel In parallel projection,
COMPUTER GRAPHICS 1/36 Viewing 1 Viewing: Types of Projections Computer Graphics.
Scale and Projections. Scale Scales are used to measure distances on technical drawings. Types of scales – Mechanical Engineers Scale (Fractional divisions)
Chapter 11 Three-Dimensional Geometric and Modeling Transformations
Three Dimensional Viewing
Rendering Pipeline Fall, 2015.
PERSPECTIVE PROJECTION…...
Projection Our 3-D scenes are all specified in 3-D world coordinates
MULTIVIEWS 1 An introduction
3D Viewing cgvr.korea.ac.kr.
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics
CSCE 441 Computer Graphics 3-D Viewing
CSC461: Lecture 18 Classical Viewing
CSC461: Lecture 20 Parallel Projections in OpenGL
Engineering Communications GL2 Geometric modelling Projection Systems
Orthographic Projection
Classical Viewing Ed Angel
Orthographic Projection
Isaac Gang University of Mary Hardin-Baylor
Introduction to Computer Graphics with WebGL
Three Dimensional Viewing
OpenGL 2D Viewing Pipeline
Isometric and Oblique Pictorials
Planar Geometric Projection Classes
3D Graphics.
Isometric and Oblique Pictorials
Viewing (Projections)
Viewing (Projections)
Interactive Computer Graphics Viewing
University of New Mexico
Isaac Gang University of Mary Hardin-Baylor
Engineering Graphics I
Presentation transcript:

Unit 4 3D Viewing Pipeline Part - 2 Projections

3D Viewing Pipeline Primitives Object space World space Camera space Modeling Transformation World space Viewing Transformation Camera space Hidden Surface Removal Lighting & Shading 3D-Clipping Projection Normalized view space Scan conversion, Hiding Image space, Device coordinates Balwinder Kaur, Assistant Professor, LPU. Image

Introduction Perspective Projections Parallel Projections Contents Introduction Perspective Projections Parallel Projections

Viewing and Projection Camera Analogy: 1. Set up your tripod and point the camera at the scene (viewing transformation). 2. Arrange the scene to be photographed into the desired composition (modeling transformation). 3. Choose a camera lens or adjust the zoom (projection transformation). 4. Determine how large you want the final photograph to be - for example, you might want it enlarged (viewport transformation). Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Projections Our 3-D scenes are all specified in 3-D world coordinates To display these we need to generate a 2-D image - project objects onto a picture plane So how do we figure out these projections? Picture Plane Objects in World Space Balwinder Kaur, Assistant Professor, LPU.

Projections Projection is just one part of the process of converting from 3-D world coordinates to a 2-D image 3-D world coordinate output primitives Clip against view volume Project onto projection plane Transform to 2-D device coordinates 2-D device coordinates Balwinder Kaur, Assistant Professor, LPU.

Projection Transformation Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Projections There are two broad classes of projection: Parallel: Typically used for architectural and engineering drawings Perspective: Realistic looking and used in computer graphics Perspective Projection Parallel Projection Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Classical viewing Viewing requires three basic elements • One or more objects • A viewer with a projection surface • Projectors that go from the object(s) to the projection surface Classical views are based on the relationship among these elements • The viewer picks up the object and orients it how she would like to see it Each object is assumed to constructed from flat principal faces • Buildings, polyhedra, manufactured objects Balwinder Kaur, Assistant Professor, LPU.

Classical Projections Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Projections Balwinder Kaur, Assistant Professor, LPU.

Introduction Perspective Projections Parallel Projections Contents Introduction Perspective Projections Parallel Projections

Perspective Projections Perspective projections are much more realistic than parallel projections and are used by artists. Balwinder Kaur, Assistant Professor, LPU.

Perspective Projections Perspective projections are described by Centre of projection: Eye of artists or lens of camera View Plane: Plane containing canvas or film strip or frame buffer A ray called projector is drawn from COP to object point, its intersection with view plane determines the projected image point on view plane. Projector COP View Plane Y-axis Z-axis Object point Projected point X-axis Balwinder Kaur, Assistant Professor, LPU.

Perspective Projection Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Parallel Projections Balwinder Kaur, Assistant Professor, LPU.

Perspective Projections There are a number of different kinds of perspective views The most common are one-point and two point perspectives Balwinder Kaur, Assistant Professor, LPU.

Perspective Projections Perspective drawings are characterised by Perspective foreshortening Vanishing points View Confusion Topological Distortion These are also known as Perspective Anomalies. These anomalies enhance realism in terms of depth cues, but distorts the actual size, shape and relationship between parts of object. Balwinder Kaur, Assistant Professor, LPU.

Perspective Projections 1. Perspective foreshortening: an illusion that objects and lengths appear smaller as their distance form COP increases. We can see three balls have different dimensions, since they placed at different distances they are projected to same length Y-axis Z-axis COP(0,0,-d) Balwinder Kaur, Assistant Professor, LPU.

Perspective Projections Increasing the field of view angle increases the height of the view plane and so increases foreshortening Balwinder Kaur, Assistant Professor, LPU.

Perspective Projections The amount of foreshortening that is present can greatly affect the appearance of our scenes Balwinder Kaur, Assistant Professor, LPU.

Perspective Projections 2. Vanishing points: An illusion that certain sets of parallel lines appear to meet at a point (called vanishing point). These are those lines that are not parallel to view plane i.e. lines that are not  to view plane normal. Principal vanishing points are formed by apparent intersection of lines parallel to one of the three principal axes. The number of principal vanishing points is determined by the number of principal axis intersected by the view plane. X-axis Z-axis Y-axis COP (0,0,-d) L1 L2 L’1 L’2 O Balwinder Kaur, Assistant Professor, LPU.

Perspective Projections (from Donald Hearn and Pauline Baker) Balwinder Kaur, Assistant Professor, LPU.

Classes of Perspective Projection One-Point Perspective Two-Point Perspective Three-Point Perspective Balwinder Kaur, Assistant Professor, LPU.

One-Point Perspective Balwinder Kaur, Assistant Professor, LPU.

Two-point perspective projection: This is often used in architectural, engineering and industrial design drawings. Balwinder Kaur, Assistant Professor, LPU.

Three-point perspective projection Three-point perspective projection is used less frequently as it adds little extra realism to that offered by two-point perspective projection Balwinder Kaur, Assistant Professor, LPU.

Perspective Projections 3. View Confusion: An object behind the COP is projected upside down and backward onto the view plane. X-axis Z-axis Y-axis COP(0,0,-d) L1 L2 L’1 L’2 O Balwinder Kaur, Assistant Professor, LPU.

Perspective Projections 4. Topological Distortion: All points lying on the plane parallel to view plane and passing through the COP are projected to ∞ by the perspective transformation. This may make a finite line segment to appear as two infinite rays. X-axis Z-axis Y-axis COP(0,0,-d) O P1 P2 P’1 P’2 P3 ∞ Balwinder Kaur, Assistant Professor, LPU.

Perspective Projections Balwinder Kaur, Assistant Professor, LPU.

Perspective Projections Although a perspective projection is set up by specifying the position and size of the view plane and the position of the projection reference point called COP However, this can be kind of awkward Balwinder Kaur, Assistant Professor, LPU.

Perspective Projections The field of view angle can be a more intuitive way to specify perspective projections This is analogous to choosing a lense for a camera Balwinder Kaur, Assistant Professor, LPU. Field of view

Perspective Projections We need one more thing to specify a perspective projections using the filed of view angle The aspect ratio gives the ratio between the width sand height of the view plane Balwinder Kaur, Assistant Professor, LPU.

Introduction Perspective Projections Parallel Projections Contents Introduction Perspective Projections Parallel Projections

Balwinder Kaur, Assistant Professor, LPU. Parallel Projections Parallel projections are used by drafter and engineers to create working drawings of an object as they preserve scale and shape These are described by Viewing Direction: which describe the direction of projection View Plane: Plane containing canvas or film strip or frame buffer A ray called projector is drawn || to Viewing direction and passing through object point, its intersection with view plane determines the projected image point on view plane. Y-axis Object Viewing Direction Object’ View Plane X-axis Balwinder Kaur, Assistant Professor, LPU. Z-axis

Balwinder Kaur, Assistant Professor, LPU. Parallel Projection Center of projection is at infinity Direction of projection (DOP) same for all points View Plane DOP Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Parallel Projections Balwinder Kaur, Assistant Professor, LPU.

Orthographic Projections DOP perpendicular to view plane Front Top Side Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Oblique Projections DOP not perpendicular to view plane Cavalier (DOP  = 45o) Cabinet (DOP  = 63.4o) Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Cavalier Projection- It is obtained when the angle between the oblique projectors and the plane of projection is 45 degree and the foreshortening factors for all three principal directions are equal. In Cavalier projection , the resulting figure is too thick. Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Cabinet Projection- It is used to correct the deficiency that is produced by Cavalier projection. An oblique projection for which the foreshortening factor for the edge perpendicular to the plane of projection is one-half is called Cabinet projection. For a cabinet projection, the angle between the projectors and the plane of projection is 63.43. Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Parallel Projections Oblique Projection Identify type parallel projections Orthographic Projection Balwinder Kaur, Assistant Professor, LPU. Isometric Projection

Balwinder Kaur, Assistant Professor, LPU. Parallel Projections Isometric projections have been used in computer games from the very early days of the industry up to today Q*Bert Sim City Virtual Magic Kingdom Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Auxiliary View An auxiliary view is an orthographic view taken in such a manner that the lines of sight are not parallel to the principal projection planes (frontal, horizontal, or profile). There are an infinite number of possible auxiliary views of any given object. Principal faces of the object are not parallel to PP planes. Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Why Auxiliary View? Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Why Auxiliary View? Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Why Auxiliary View? Inclined planes and oblique lines do not appear true length or true size in any of the principle planes of projection To determine the true length of an oblique line or the true size of an inclined plane, an auxiliary view must be created. The auxiliary view shows the true shape and size of circular shapes. Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Orthogonal: glMatrixMode(GL_PROJECTION); glLoadIdentity(); Orthogonal: 1. glOrtho(left, right, bottom, top, near, far); 2. gluOrtho2D(left, right, bottom, top); Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU. Perspective: Perspective: 1. gluPerspective(fovy, aspect, zNear, zFar ); 2. (glFrustum) Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU.

Balwinder Kaur, Assistant Professor, LPU.