Rendering Pipeline Fall, 2015.

Slides:



Advertisements
Similar presentations
Three Dimensional Viewing
Advertisements

Projection.
Viewing and Projections
CS485/685 Computer Vision Prof. George Bebis
1 Lecture 8 Clipping Viewing transformations Projections.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Viewing/Projections I.
1 Chapter 5 Viewing. 2 Perspective Projection 3 Parallel Projection.
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)
Projection Projection - the transformation of points from a coordinate system in n dimensions to a coordinate system in m dimensions where m
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
Graphics Graphics Korea University cgvr.korea.ac.kr 3D Viewing 고려대학교 컴퓨터 그래픽스 연구실.
Computer Graphics Bing-Yu Chen National Taiwan University.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 2D Viewing 고려대학교 컴퓨터 그래픽스 연구실.
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
Background Mathematics Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006.
3D Polygon Rendering Pipeline 원본 – ( Thomas Funkhouser (Princeton.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Jinxiang Chai CSCE 441 Computer Graphics 3-D Viewing 0.
Three-Dimensional Viewing
Three-Dimensional Viewing Hearn & Baker Chapter 7
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
3D Object Representations 2011, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
Taxonomy of Projections FVFHP Figure Taxonomy of Projections.
Projections Angel: Interactive Computer Graphics.
Rendering Pipeline and Graphics Hardware Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Chapter 1 Graphics Systems and Models Models and Architectures.
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Outline 3D Viewing Required readings: HB 10-1 to 10-10
Projection. Conceptual model of 3D viewing process.
Computer Graphics Projections.
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
3D Rendering 2016, Fall.
Chapter 11 Three-Dimensional Geometric and Modeling Transformations
Three Dimensional Viewing
Visible Surface Detection
University of North Carolina at Greensboro
PERSPECTIVE PROJECTION…...
Projection Our 3-D scenes are all specified in 3-D world coordinates
Intro to 3D Graphics.
3D Viewing cgvr.korea.ac.kr.
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics
Computer Graphics Viewing
CSCE 441 Computer Graphics 3-D Viewing
Viewing in 3D Chapter 6.
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
Unit 4 3D Viewing Pipeline Part - 2
3D Transformation Pipeline
3D Graphics Rendering PPT By Ricardo Veguilla.
Models and Architectures
Viewing/Projections I Week 3, Fri Jan 25
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
A Photograph of two papers
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
Three Dimensional Viewing
OpenGL 2D Viewing Pipeline
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016
Computer Graphics (Spring 2003)
Lecture 13 Clipping & Scan Conversion
3D Graphics.
Models and Architectures
Viewing (Projections)
Models and Architectures
Viewing (Projections)
THREE-DIMENSIONAL VIEWING
Presentation transcript:

Rendering Pipeline Fall, 2015

Rendering Generate an image from geometric primitives

Overview 3D scene representation 3D viewer representation Visible surface determination Lighting simulation How is the 3D scene described in a computer?

3D Scene Representation Scene is usually approximated by 3D primitives Point Line segment Polygon Polyhedron Curved surface Solid object etc.

3D point Specifies a location Represented by three coordinates Infinitely small

3D Vector Specifies a direction and a magnitude Represented by three coordinates Magnitude Has no location

3D Vector Dot(=Scalar) product of two 3D vectors

3D Vector Cross(=Vector) product of two 3D vectors (dx2, dy2, dz2) V1 X V2 = vector perpendicular V1 and V2 (dx2, dy2, dz2) (dx1, dy1, dz1)

3D Ray Line segment with one endpoint at infinity Parametric representation

Overview 3D scene representation 3D viewer representation Visible surface determination Lighting simulation How is the viewing device described in a computer?

Camera Models The most common model is pin-hole camera All captured light ray arrive along paths toward focal point without lens distortion (everything is in focus) Sensor response proportional to radiance Other models consider… Depth of field Motion blur Lens distortion

Camera Parameters Position Orientation Aperture Film plane Eye position (px, py, pz) Orientation View direction (dx, dy, dz) Up direction (vx, vy, vz) Aperture Field of view (xfov, yfov) Film plane “Look at” point View plane normal

View Frustum V Back N Right U View Frustum

Overview 3D scene representation 3D viewer representation Visible surface determination Lighting simulation How can the front-most surface be found with an algorithm?

Visible Surface Determination The color of each pixel on the view plane depends on the radiance emanating from visible surfaces Simple method is ray casting

Overview 3D scene representation 3D viewer representation Visible surface determination Lighting simulation How do we compute the radiance for each sample ray?

Lighting Simulation Lighting parameters Light source emission Surface reflection Atmospheric attenuation Camera response

Lighting Simulation

Summary Major issues in 3D rendering Conclusion note 3D scene representation 3D viewer representation Visible surface determination Lighting simulation Conclusion note Accurate physical simulation is complex and intractable Rendering algorithms apply many approximations to simplify representations and computations

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

3D Polygon Rendering What steps are necessary to utilize spatial coherence while drawing these polygons into a 2D image?

3D Rendering Pipeline (for direct illumination) Transform into 3D world coordinate system Illuminate according to lighting and reflection Transform into 3D camera coordinate system Transform into 2D camera coordinate system Clip primitives outside camera’s view Transform into image coordinate system Draw pixels (includes texturing, hidden surface, …)

Transformations

Viewing Transformations

Viewing Transformation Mapping from world to camera coordinates Eye position maps to origin Right vector maps to X axis Up vector maps to Y axis Back vector maps to Z axis Y X World Z

Camera Coordinates Canonical coordinate system Convention is right-handed (looking down –z axis) Convenient for projection, clipping, etc .

Finding the viewing transformation We have the camera (in world coordinates) We want T taking objects from world to camera Trick: find T-1 taking objects in camera to world

Finding the viewing transformation Trick: map from camera coordinate to world Origin maps to eye position Z axis maps to Back vector Y axis maps to Up vector X axis maps to Right vector This matrix is T-1 so we invert in to get T (easy)

Viewing Transformations

Projection General definition: In computer Graphics: Transform points in n-space to m-space (m<n) In computer Graphics: Map 3D camera coordinates to 2D screen coordinates

Taxonomy of Projections

Parallel Projection Center of projections is at infinity Direction of projection (DOP) same for all points

Orthogonal Projections DOP perpendicular to view plane

Oblique Projections DOP not perpendicular to view plane 1) Cavalier projection when angle between projector and view plane is 45 degree foreshortening ratio for all three principal axis are equal. 2) Cabinet projection the foreshortening ratio for edges that perpendicular to the plane of projection is one-half (angle 63.43 degree ) perpendicular angle Oblique angle

Oblique Projections DOP not perpendicular to view plane φ describes the angle of the projection of the view plane’s normal L represents the scale factor applied to the view plane’s normal

Parallel Projection View Volume

Parallel Projection Matrix General parallel projection transformation

Perspective Projection Map points onto “view plane” along “projectors” emanating from “center of projection” (COP)

Perspective Projection How many vanishing points?

Perspective Projection View Volume

Perspective Projection Compute 2D coordinates from 3D coordinates with similar triangles

Perspective Projection Matrix 4 x 4 matrix representation?

Perspective Projection Matrix 4 x 4 matrix representation?

Perspective vs. Parallel Parallel Projection + Good for exact measurements + Parallel lines remain parallel Angles are not (in general) preserved Less realistic looking Perspective Projection + Size varies inversely with distance – looks realistic Distance and angles are not (in general) preserved Parallel line do not (in general) remain parallel

Classical Projections

Taxonomy of Projections

Viewing Transformations Summary Camera Transformation Map 3D world coordinates to 3D camera coordinates Matrix has camera vectors are rows Projection Transformation Map 3D camera coordinates to 2D screen coordinates Two type of projections Parallel Perspective

3D Rendering Pipeline (for direct illumination)

2D Rendering Pipeline Clip portions of geometric primitives residing outside the window Transform the clipped primitives From screen to image coordinates Fill pixels representing primitives In screen coordinates

Clipping Avoid drawing parts of primitives outside window Window defines part of scene being viewed Must draw geometric primitives only inside window

Clipping Avoid drawing parts of primitives outside window Points Lines Polygons Circles etc.

Point Clipping Is point (x, y) inside window?

Line Clipping Find the part of a line inside the clip window

Polygon Clipping Find the part of a polygon inside the clip window?

Sutherland Hodgeman Clipping Clip each window boundary one at a time

2D Rendering Pipeline Clip portions of geometric primitives residing outside the window Transform the clipped primitives From screen to image coordinates Fill pixels representing primitives In screen coordinates

Viewport Transformation Transformation 2D geometric primitives from screen coordinate system (normalized device coordinates) to image coordinate system (pixels)

Viewport Transformation Window-to-Viewport mapping

Summary of Transformations

Summary

Next Time