Today. Rendering pipeline. Rendering pipeline. Object vs. Image order. Rendering engine Rendering engine (jtrt) Computergrafik. Rendering pipeline
|
|
- Julia Morris
- 5 years ago
- Views:
Transcription
1 Computergrafik Today Rendering pipeline s View volumes, clipping Viewport Matthias Zwicker Universität Bern Herbst 2008 Rendering pipeline Rendering pipeline Hardware & software that draws 3D scenes on the screen Most operations performed by specialized hardware (GPU) Access to hardware through low-level 3D API (DirectX, OpenGL) jogl is a Java binding to OpenGL All scene data flows through the pipeline at least once for each frame Rendering pipeline Rendering pipeline implements object order algorithm Loop over all objects Draw triangles one by one (rasterization) Alternatives? Advantages, disadvantages? Object vs. order Object order Rasterization type algorithms Desirable memory access pattern ( streaming, data locality, avoid random scene access) Suitable for real time rendering (OpenGL, DirectX) Popular for production rendering (Pixar RenderMan), where scenes often do not fit in RAM Full global illumination not possible with purely object order algorithm order Ray tracing type algorithms Undesirable memory access pattern (random scene access) Requires sophisticaed data structures for fast scene access Full global illumination possible Most popular for photo-realistic image synthesis Rendering engine Rendering engine (jtrt) Rendering pipeline Additional software layer encapsulating low-level API (OpenGL, DirectX, ) Additional functionality Layered software architecture common in industry Game engines /Game_engine 1
2 Rendering pipeline stages Rendering pipeline stages Geometry Vertices and how they are connected Triangles, lines, points, triangle strips Attributes such as color Specified in object Processed by the rendering pipeline one-by-one Textures, lights, etc. Transform object to camera MODELVIEW matrix Specified by GL_MODELVIEW matrix in OpenGL User computes GL_MODELVIEW matrix as discussed Rendering pipeline stages Rendering pipeline stages Look up light sources Compute color for each vertex Later in the course Project 3D vertices to 2D image positions GL_PROJECTION matrix This lecture Rendering pipeline stages Rendering pipeline stages Draw primitives (triangles, lines, etc.) Determine what is visible Next lecture Pixel colors 2
3 Today Rendering pipeline s View volumes, clipping Viewport Object, world, camera coords. Object World Objects in camera We have things lined up the way we like them on screen x to the right y up -z going into the screen Objects to look at are in front of us, i.e. have negative z values But objects are still in 3D Today: how to project them into 2D s Given 3D points (vertices) in camera, determine corresponding 2D image Orthographic projection Simply ignore z-coordinate Use camera space xy as image Orthographic projection Project points to x-y plane along parallel lines Graphical illustrations, architecture Most common for computer graphics Simplified model of human eye, or camera lens (pinhole camera) Things farther away seem smaller Discovery/formalization attributed to Filippo Brunelleschi in the early 1400 s 3
4 Project along rays that converge in center of projection Parallel lines no longer parallel, converge at one point Center of projection 3D scene 2D image plane Earliest example La Trinitá (1427) by Masaccio The math: simplified case The math: simplified case plane plane Can express this using homogeneous, 4x4 matrices The math: simplified case matrix Homogeneous division matrix Homogeneous coord.!= 1! Homogeneous division Using projection matrix, homogeneous division seems more complicated than just multiplying all by d/z, so why do it? Will allow us to handle different types of projections in a unified way define arbitrary view volumes 4
5 Background Projective space: the space of one-dimensional vector subspaces of a given vector space Elements of projective spaces are 1D vector subspaces Each element of 1D subspace is equivalent (represents same element of projective space) For example, projective space P 3 represented using R 4 and homogeneous Each point along 4D ray is equivalent to same 3D point at w=1 x λx x/w y λy y/w equivalent z λz z/w w λw 1 1D vector subspace, arbitrary scalar value Equivalent element, for any Background Projective mapping: any non-singular linear mapping on homogeneous, for example, Generalization of affine mappings, arbitrary homogeneous coordinate Projective mappings preserve straight lines, but not parallel lines Much more theory Background P 3 can be interpreted as consisting of R 3 and its points at infinity Points are said to be at infinity if w = 0 Represented by direction vector Do parallel lines intersect at infinity? In projective geometry, yes. ity.html Points at infinity (2,1,0,1) (2,1,0,0.5) ~ (4,2,0,1) Point at infinity, direction vector (2,1,0,0) (2,1,0, ) ~ (6,3,0,1) 2D line intersection Two line equations Intersection c b x 0 = 0 0 / c 1 b 1 y 0 = a 0 c 0 a 1 c 1 a 0 x + b 0 y + c 0 =0 a 1 x + b 1 y + c 1 =0 a 0 b 0 a 1 b 1 / a 0 b 0 a 1 b 1 Determinant Using homogeneous Line equations a 0 x + b 0 y + wc 0 =0 a 1 x + b 1 y + wc 1 =0 h a0 b 0 x i c 0 y w h a1 b 1 x i c 1 y w Lines parallel: division by zero 5
6 Using homogeneous Line equations a 0 x + b 0 y + wc 0 =0 a 1 x + b 1 y + wc 1 =0 h a0 b 0 x i c 0 y w h a1 b 1 x i c 1 y w Intersection: any scalar multiple of = x 0 a 0 a y 0 b 0 1 b w 0 1 c 0 c x 0 /w 0 1 y 0 /w 0 Lines not parallel: intersection is 1 Lines parallel: w =0, intersection at infinity! Projective space Projective space [xyzw] homogeneous includes points at infinity (w=0) projective mappings (perspective projection) Vector space Affine space [xyz] [xyz1], [xyz0] represents vectors homogeneous coords. linear mappings distinguishes points (rotation around origin, and vectors scaling, shear) affine mappings (translation) In practice Use 4x4 homogeneous matrices normally Modeling & viewing s are affine mappings points keep w=1 no need to divide by w when doing modeling operations or transforming into camera space is a projective transform Resulting w coordinate not always 1 Divide by w (perspective division, homogeneous division) after multiplying with projection matrix OpenGL rendering pipeline (graphics hardware) does this automatically Realistic image formation More than perspective projection Lens effects Focus, depth of field Fish-eye lens Realistic image formation Chromatic aberration Motion blur Today Rendering pipeline s View volumes, clipping Viewport Often too complicated for hardware rendering pipeline 6
7 View volumes Define 3D volume seen by camera Perspective view volume General view volume Perspective view volume Orthographic view volume World World Defined by 6 parameters, in camera Left, right, top, bottom boundaries Near, far clipping planes Clipping planes to avoid numerical problems Divide by zero Low precision for distant objects Usually symmetric, i.e., left=-right, top=-bottom Perspective view volume Symmetric view volume Orthographic view volume y y=top FOV -z z=-near Only 4 parameters Vertical field of view (FOV) aspect ratio (width/height) Near, far clipping planes z=-far right left aspect ratio= top bottom right top tan(fov /2) top near Parametrized by 6 parameters Right, left, top, bottom, near, far If symmetric Width, height, near, far Clipping Need to identify objects outside view volume Avoid division by zero Efficiency, don t draw objects outside view volume Performed by OpenGL rendering pipeline Clipping always to canonic view volume Cube[-1..1]x[-1..1]x[-1..1] centered at origin Need to transform desired view frustum to canonic view frustum Clipping Primitives Clip to view frustum 7
8 Canonic view volume matrix is set such that User defined view volume is transformed into canonic view volume, i.e., cube [-1,1]x[-1,1]x[-1,1] Multiplying vertices of view volume by projection matrix and performing homogeneous divide yields canonic view volume Perspective and orthographic projection are treated exactly the same way matrix matrix Canonic view volume Clipping matrix General view frustum matrix Compare to simple projection matrix from before Simple projection General view frustum matrix Symmetric view frustum with field of view, aspect ratio, near and far clip planes y y=top FOV z=-near aspect tan(fov /2) P persp (FOV,aspect,near, far) tan(fov /2) near far 0 0 near far z=-far -z 2 near far near far Orthographic projection matrix 2 right left 0 0 right left right left 2 top bottom 0 0 P ortho (right,left,top,bottom,near, far) top bottom top bottom 2 far near 0 0 far near far near width P ortho (width,height,near, far) height 2 far near 0 0 far near far near w = 1 after mult. with orthographic projection matrix 8
9 Questions? Today Rendering pipeline s View volumes Viewport Viewport After applying projection matrix, image points are in normalized view Per definition range [-1..1] x [-1..1] Map points to image (i.e., pixel) User defined range [x0 x1] x [y0 y1] Scale and translation The complete transform Mapping a 3D point in object to pixel Object space Dx 0, x 1, y 0, y x 0 x x 1 x 0 0 y 1 y y 0 y The complete transform Mapping a 3D point in object to pixel The complete transform Mapping a 3D point in object to pixel Object space World space Object space World space space 9
10 The complete transform Mapping a 3D point in object to pixel The complete transform Mapping a 3D point in object to pixel Object space World space space Canonic view volume Object space World space space Canonic view volume space The complete transform Mapping a 3D point in object to pixel OpenGL OpenGL GL_MODELVIEW matrix OpenGL GL_PROJECTION matrix Pixel OpenGL rendering pipeline performs these matrix multiplications automatically User just specifies the matrices Seejrtr.GLRenderContext.draw OpenGL GL_MODELVIEW, C -1 M Up to you to define GL_PROJECTION, P Utility routines to set it by specifying view volume: glfrustum(), glperspective(), glortho() Do not use utility functions for project 2 You will implement a software renderer in project 3, which will not rely on any OpenGL Viewport, D Specify implicitly via glviewport() No direct access Coming up Next lecture Drawing (rasterization) Visibility (z-buffering) Exercise session Project 2, interactive viewing 10
CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012
CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Project 2 due Friday, October 12
More informationCMSC427 Transformations II: Viewing. Credit: some slides from Dr. Zwicker
CMSC427 Transformations II: Viewing Credit: some slides from Dr. Zwicker What next? GIVEN THE TOOLS OF The standard rigid and affine transformations Their representation with matrices and homogeneous coordinates
More informationCSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation
CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 Announcements Project 2 due Friday, October 11
More informationCSE 167: Introduction to Computer Graphics Lecture #5: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017
CSE 167: Introduction to Computer Graphics Lecture #5: Projection Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 Announcements Friday: homework 1 due at 2pm Upload to TritonEd
More informationProjection and viewing. Computer Graphics CSE 167 Lecture 4
Projection and viewing Computer Graphics CSE 167 Lecture 4 CSE 167: Computer Graphics Review: transformation from the object (or model) coordinate frame to the camera (or eye) coordinate frame Projection
More informationToday. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing
Today Rendering Algorithms Course overview Organization Introduction to ray tracing Spring 2009 Matthias Zwicker Universität Bern Rendering algorithms Problem statement Given computer representation of
More informationToday. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing
Today Rendering Algorithms Course overview Organization Introduction to ray tracing Spring 2010 Matthias Zwicker Universität Bern Rendering algorithms Problem statement Given computer representation of
More informationOverview. By end of the week:
Overview By end of the week: - Know the basics of git - Make sure we can all compile and run a C++/ OpenGL program - Understand the OpenGL rendering pipeline - Understand how matrices are used for geometric
More informationRasterization Overview
Rendering Overview The process of generating an image given a virtual camera objects light sources Various techniques rasterization (topic of this course) raytracing (topic of the course Advanced Computer
More informationCSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016
CSE 167: Introduction to Computer Graphics Lecture #3: Projection Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements Next Monday: homework discussion Next Friday:
More informationCSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013
CSE 167: Introduction to Computer Graphics Lecture #3: Projection Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 Announcements Project 1 due tomorrow (Friday), presentation
More informationCSE528 Computer Graphics: Theory, Algorithms, and Applications
CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin Stony Brook University (SUNY at Stony Brook) Stony Brook, New York 11794-2424 Tel: (631)632-845; Fax: (631)632-8334 qin@cs.stonybrook.edu
More informationNotes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment
Notes on Assignment Notes on Assignment Objects on screen - made of primitives Primitives are points, lines, polygons - watch vertex ordering The main object you need is a box When the MODELVIEW matrix
More informationProf. Feng Liu. Fall /19/2016
Prof. Feng Liu Fall 26 http://www.cs.pdx.edu/~fliu/courses/cs447/ /9/26 Last time More 2D Transformations Homogeneous Coordinates 3D Transformations The Viewing Pipeline 2 Today Perspective projection
More informationGeometry: Outline. Projections. Orthographic Perspective
Geometry: Cameras Outline Setting up the camera Projections Orthographic Perspective 1 Controlling the camera Default OpenGL camera: At (0, 0, 0) T in world coordinates looking in Z direction with up vector
More informationModels and The Viewing Pipeline. Jian Huang CS456
Models and The Viewing Pipeline Jian Huang CS456 Vertex coordinates list, polygon table and (maybe) edge table Auxiliary: Per vertex normal Neighborhood information, arranged with regard to vertices and
More informationCSE328 Fundamentals of Computer Graphics
CSE328 Fundamentals of Computer Graphics Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 794--44 Tel: (63)632-845; Fax: (63)632-8334 qin@cs.sunysb.edu
More informationLecture 4. Viewing, Projection and Viewport Transformations
Notes on Assignment Notes on Assignment Hw2 is dependent on hw1 so hw1 and hw2 will be graded together i.e. You have time to finish both by next monday 11:59p Email list issues - please cc: elif@cs.nyu.edu
More informationThree-Dimensional Viewing Hearn & Baker Chapter 7
Three-Dimensional Viewing Hearn & Baker Chapter 7 Overview 3D viewing involves some tasks that are not present in 2D viewing: Projection, Visibility checks, Lighting effects, etc. Overview First, set up
More information3D Viewing. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 9
3D Viewing CS 46 Lecture 9 Cornell CS46 Spring 18 Lecture 9 18 Steve Marschner 1 Viewing, backward and forward So far have used the backward approach to viewing start from pixel ask what part of scene
More informationRendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane
Rendering Pipeline Rendering Converting a 3D scene to a 2D image Rendering Light Camera 3D Model View Plane Rendering Converting a 3D scene to a 2D image Basic rendering tasks: Modeling: creating the world
More informationCSE 167: Introduction to Computer Graphics Lecture #3: Coordinate Systems
CSE 167: Introduction to Computer Graphics Lecture #3: Coordinate Systems Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015 Announcements Project 2 due Friday at 1pm Homework
More information3D Viewing. CS 4620 Lecture 8
3D Viewing CS 46 Lecture 8 13 Steve Marschner 1 Viewing, backward and forward So far have used the backward approach to viewing start from pixel ask what part of scene projects to pixel explicitly construct
More informationGame Architecture. 2/19/16: Rasterization
Game Architecture 2/19/16: Rasterization Viewing To render a scene, need to know Where am I and What am I looking at The view transform is the matrix that does this Maps a standard view space into world
More informationCOMP3421. Introduction to 3D Graphics
COMP3421 Introduction to 3D Graphics 3D coordinates Moving to 3D is simply a matter of adding an extra dimension to our points and vectors: 3D coordinates 3D coordinate systems can be left or right handed.
More informationViewing. Reading: Angel Ch.5
Viewing Reading: Angel Ch.5 What is Viewing? Viewing transform projects the 3D model to a 2D image plane 3D Objects (world frame) Model-view (camera frame) View transform (projection frame) 2D image View
More informationRendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker
Rendering Algorithms: Real-time indirect illumination Spring 2010 Matthias Zwicker Today Real-time indirect illumination Ray tracing vs. Rasterization Screen space techniques Visibility & shadows Instant
More informationViewing and Projection
CSCI 480 Computer Graphics Lecture 5 Viewing and Projection Shear Transformation Camera Positioning Simple Parallel Projections Simple Perspective Projections [Geri s Game, Pixar, 1997] January 26, 2011
More informationViewing and Projection
CSCI 480 Computer Graphics Lecture 5 Viewing and Projection January 25, 2012 Jernej Barbic University of Southern California Shear Transformation Camera Positioning Simple Parallel Projections Simple Perspective
More informationCS230 : Computer Graphics Lecture 6: Viewing Transformations. Tamar Shinar Computer Science & Engineering UC Riverside
CS230 : Computer Graphics Lecture 6: Viewing Transformations Tamar Shinar Computer Science & Engineering UC Riverside Rendering approaches 1. image-oriented foreach pixel... 2. object-oriented foreach
More informationVirtual Cameras & Their Matrices
Virtual Cameras & Their Matrices J.Tumblin-Modified, highly edited SLIDES from: Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 What is Projection? Any operation that reduces
More informationCSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015
CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015 Announcements Project 2 due tomorrow at 2pm Grading window
More informationCS451Real-time Rendering Pipeline
1 CS451Real-time Rendering Pipeline JYH-MING LIEN DEPARTMENT OF COMPUTER SCIENCE GEORGE MASON UNIVERSITY Based on Tomas Akenine-Möller s lecture note You say that you render a 3D 2 scene, but what does
More informationThe Graphics Pipeline and OpenGL I: Transformations!
! The Graphics Pipeline and OpenGL I: Transformations! Gordon Wetzstein! Stanford University! EE 267 Virtual Reality! Lecture 2! stanford.edu/class/ee267/!! Albrecht Dürer, Underweysung der Messung mit
More informationCOMP3421. Introduction to 3D Graphics
COMP3421 Introduction to 3D Graphics 3D coodinates Moving to 3D is simply a matter of adding an extra dimension to our points and vectors: 3D coordinates 3D coordinate systems can be left or right handed.
More information3D Graphics Pipeline II Clipping. Instructor Stephen J. Guy
3D Graphics Pipeline II Clipping Instructor Stephen J. Guy 3D Rendering Pipeline (for direct illumination) 3D Geometric Primitives 3D Model Primitives Modeling Transformation 3D World Coordinates Lighting
More informationViewing COMPSCI 464. Image Credits: Encarta and
Viewing COMPSCI 464 Image Credits: Encarta and http://www.sackville.ednet.ns.ca/art/grade/drawing/perspective4.html Graphics Pipeline Graphics hardware employs a sequence of coordinate systems The location
More information3.1 Viewing and Projection
Fall 2017 CSCI 420: Computer Graphics 3.1 Viewing and Projection Hao Li http://cs420.hao-li.com 1 Recall: Affine Transformations Given a point [xyz] > form homogeneous coordinates [xyz1] > The transformed
More informationComputer Graphics. Chapter 10 Three-Dimensional Viewing
Computer Graphics Chapter 10 Three-Dimensional Viewing Chapter 10 Three-Dimensional Viewing Part I. Overview of 3D Viewing Concept 3D Viewing Pipeline vs. OpenGL Pipeline 3D Viewing-Coordinate Parameters
More informationDrawing in 3D (viewing, projection, and the rest of the pipeline)
Drawing in 3D (viewing, projection, and the rest of the pipeline) CS559 Spring 2017 Lecture 6 February 2, 2017 The first 4 Key Ideas 1. Work in convenient coordinate systems. Use transformations to get
More informationAnnouncements. Submitting Programs Upload source and executable(s) (Windows or Mac) to digital dropbox on Blackboard
Now Playing: Vertex Processing: Viewing Coulibaly Amadou & Mariam from Dimanche a Bamako Released August 2, 2005 Rick Skarbez, Instructor COMP 575 September 27, 2007 Announcements Programming Assignment
More informationOpenGL Transformations
OpenGL Transformations R. J. Renka Department of Computer Science & Engineering University of North Texas 02/18/2014 Introduction The most essential aspect of OpenGL is the vertex pipeline described in
More informationTo Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing
Foundations of Computer Graphics (Fall 0) CS 84, Lecture 5: Viewing http://inst.eecs.berkele.edu/~cs84 To Do Questions/concerns about assignment? Remember it is due Sep. Ask me or TAs re problems Motivation
More informationComputer Graphics 7: Viewing in 3-D
Computer Graphics 7: Viewing in 3-D In today s lecture we are going to have a look at: Transformations in 3-D How do transformations in 3-D work? Contents 3-D homogeneous coordinates and matrix based transformations
More informationCOMP3421. Introduction to 3D Graphics
COMP3421 Introduction to 3D Graphics 3D coodinates Moving to 3D is simply a matter of adding an extra dimension to our points and vectors: 3D coordinates 3D coordinate systems can be left or right handed.
More information7. 3D Viewing. Projection: why is projection necessary? CS Dept, Univ of Kentucky
7. 3D Viewing Projection: why is projection necessary? 1 7. 3D Viewing Projection: why is projection necessary? Because the display surface is 2D 2 7.1 Projections Perspective projection 3 7.1 Projections
More informationDrawing in 3D (viewing, projection, and the rest of the pipeline)
Drawing in 3D (viewing, projection, and the rest of the pipeline) CS559 Spring 2016 Lecture 6 February 11, 2016 The first 4 Key Ideas 1. Work in convenient coordinate systems. Use transformations to get
More informationLecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009
Model s Lecture 3 Sections 2.2, 4.4 World s Eye s Clip s s s Window s Hampden-Sydney College Mon, Aug 31, 2009 Outline Model s World s Eye s Clip s s s Window s 1 2 3 Model s World s Eye s Clip s s s Window
More informationTo Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline
Computer Graphics CSE 67 [Win 9], Lecture 5: Viewing Ravi Ramamoorthi http://viscomp.ucsd.edu/classes/cse67/wi9 To Do Questions/concerns about assignment? Remember it is due tomorrow! (Jan 6). Ask me or
More informationCHAPTER 1 Graphics Systems and Models 3
?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........
More informationViewing with Computers (OpenGL)
We can now return to three-dimension?', graphics from a computer perspective. Because viewing in computer graphics is based on the synthetic-camera model, we should be able to construct any of the classical
More informationMotivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics
Foundations of Computer Graphics Online Lecture 5: Viewing Orthographic Projection Ravi Ramamoorthi Motivation We have seen transforms (between coord sstems) But all that is in 3D We still need to make
More informationLecture 4 of 41. Lab 1a: OpenGL Basics
Lab 1a: OpenGL Basics William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://snipurl.com/1y5gc Course web site: http://www.kddresearch.org/courses/cis636 Instructor
More informationClassical and Computer Viewing. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico
Classical and Computer Viewing Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico Planar Geometric Projections Standard projections project onto a plane Projectors
More informationGraphics Pipeline 2D Geometric Transformations
Graphics Pipeline 2D Geometric Transformations CS 4620 Lecture 8 1 Plane projection in drawing Albrecht Dürer 2 Plane projection in drawing source unknown 3 Rasterizing triangles Summary 1 evaluation of
More informationRendering Objects. Need to transform all geometry then
Intro to OpenGL Rendering Objects Object has internal geometry (Model) Object relative to other objects (World) Object relative to camera (View) Object relative to screen (Projection) Need to transform
More informationIntroduction to Computer Graphics 4. Viewing in 3D
Introduction to Computer Graphics 4. Viewing in 3D National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor Textbook: E.Angel, Interactive Computer Graphics, 5 th Ed., Addison Wesley Ref: Hearn
More information3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller
3D Viewing CMPT 361 Introduction to Computer Graphics Torsten Möller Reading Chapter 4 of Angel Chapter 6 of Foley, van Dam, 2 Objectives What kind of camera we use? (pinhole) What projections make sense
More informationFor each question, indicate whether the statement is true or false by circling T or F, respectively.
True/False For each question, indicate whether the statement is true or false by circling T or F, respectively. 1. (T/F) Rasterization occurs before vertex transformation in the graphics pipeline. 2. (T/F)
More informationOverview of Projections: From a 3D world to a 2D screen.
Overview of Projections: From a 3D world to a 2D screen. Lecturer: Dr Dan Cornford d.cornford@aston.ac.uk http://wiki.aston.ac.uk/dancornford CS2150, Computer Graphics, Aston University, Birmingham, UK
More informationOne or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface
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
More informationLast week. Machiraju/Zhang/Möller/Fuhrmann
Last week Machiraju/Zhang/Möller/Fuhrmann 1 Geometry basics Scalar, point, and vector Vector space and affine space Basic point and vector operations Sided-ness test Lines, planes, and triangles Linear
More informationToday. Today. Introduction. Matrices. Matrices. Computergrafik. Transformations & matrices Introduction Matrices
Computergrafik Matthias Zwicker Universität Bern Herbst 2008 Today Transformations & matrices Introduction Matrices Homogeneous Affine transformations Concatenating transformations Change of Common coordinate
More informationOrthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015
Orthogonal Projection Matrices 1 Objectives Derive the projection matrices used for standard orthogonal projections Introduce oblique projections Introduce projection normalization 2 Normalization Rather
More informationDrawing in 3D (viewing, projection, and the rest of the pipeline)
Drawing in 3D (viewing, projection, and the rest of the pipeline) CS559 Fall 2016 Lecture 6/7 September 26-28 2016 The first 4 Key Ideas 1. Work in convenient coordinate systems. Use transformations to
More informationComputergrafik. Matthias Zwicker. Herbst 2010
Computergrafik Matthias Zwicker Universität Bern Herbst 2010 Today Bump mapping Shadows Shadow mapping Shadow mapping in OpenGL Bump mapping Surface detail is often the result of small perturbations in
More informationModels and Architectures
Models and Architectures Objectives Learn the basic design of a graphics system Introduce graphics pipeline architecture Examine software components for an interactive graphics system 1 Image Formation
More informationEvening s Goals. Mathematical Transformations. Discuss the mathematical transformations that are utilized for computer graphics
Evening s Goals Discuss the mathematical transformations that are utilized for computer graphics projection viewing modeling Describe aspect ratio and its importance Provide a motivation for homogenous
More information2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into
2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into the viewport of the current application window. A pixel
More informationPerspective projection and Transformations
Perspective projection and Transformations The pinhole camera The pinhole camera P = (X,,) p = (x,y) O λ = 0 Q λ = O λ = 1 Q λ = P =-1 Q λ X = 0 + λ X 0, 0 + λ 0, 0 + λ 0 = (λx, λ, λ) The pinhole camera
More informationCS 4620 Program 3: Pipeline
CS 4620 Program 3: Pipeline out: Wednesday 14 October 2009 due: Friday 30 October 2009 1 Introduction In this assignment, you will implement several types of shading in a simple software graphics pipeline.
More informationIntroduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science Laboratory University of New Mexico Models and Architectures
More informationChapter 5. Projections and Rendering
Chapter 5 Projections and Rendering Topics: Perspective Projections The rendering pipeline In order to view manipulate and view a graphics object we must find ways of storing it a computer-compatible way.
More information3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination
Rendering Pipeline 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
More informationTransforms 3: Projection Christian Miller CS Fall 2011
Transforms 3: Projection Christian Miller CS 354 - Fall 2011 Eye coordinates Eye space is the coordinate system at the camera: x right, y up, z out (i.e. looking down -z) [RTR] The setup Once we ve applied
More informationSurface Graphics. 200 polys 1,000 polys 15,000 polys. an empty foot. - a mesh of spline patches:
Surface Graphics Objects are explicitely defined by a surface or boundary representation (explicit inside vs outside) This boundary representation can be given by: - a mesh of polygons: 200 polys 1,000
More informationThe Rendering Pipeline (1)
The Rendering Pipeline (1) Alessandro Martinelli alessandro.martinelli@unipv.it 30 settembre 2014 The Rendering Pipeline (1) Rendering Architecture First Rendering Pipeline Second Pipeline: Illumination
More informationViewing and Projection
15-462 Computer Graphics I Lecture 5 Viewing and Projection Shear Transformation Camera Positioning Simple Parallel Projections Simple Perspective Projections [Angel, Ch. 5.2-5.4] January 30, 2003 [Red
More information3D Graphics for Game Programming (J. Han) Chapter II Vertex Processing
Chapter II Vertex Processing Rendering Pipeline Main stages in the pipeline The vertex processing stage operates on every input vertex stored in the vertex buffer and performs various operations such as
More informationProjection: Mapping 3-D to 2-D. Orthographic Projection. The Canonical Camera Configuration. Perspective Projection
Projection: Mapping 3-D to 2-D Our scene models are in 3-D space and images are 2-D so we need some wa of projecting 3-D to 2-D The fundamental approach: planar projection first, we define a plane in 3-D
More informationCSE 690: GPGPU. Lecture 2: Understanding the Fabric - Intro to Graphics. Klaus Mueller Stony Brook University Computer Science Department
CSE 690: GPGPU Lecture 2: Understanding the Fabric - Intro to Graphics Klaus Mueller Stony Brook University Computer Science Department Klaus Mueller, Stony Brook 2005 1 Surface Graphics Objects are explicitely
More informationThe Graphics Pipeline and OpenGL I: Transformations!
! The Graphics Pipeline and OpenGL I: Transformations! Gordon Wetzstein! Stanford University! EE 267 Virtual Reality! Lecture 2! stanford.edu/class/ee267/!! Logistics Update! all homework submissions:
More informationOverview. Viewing and perspectives. Planar Geometric Projections. Classical Viewing. Classical views Computer viewing Perspective normalization
Overview Viewing and perspectives Classical views Computer viewing Perspective normalization Classical Viewing Viewing requires three basic elements One or more objects A viewer with a projection surface
More informationGraphics pipeline and transformations. Composition of transformations
Graphics pipeline and transformations Composition of transformations Order matters! ( rotation * translation translation * rotation) Composition of transformations = matrix multiplication: if T is a rotation
More informationThe Importance of Matrices in the DirectX API. by adding support in the programming language for frequently used calculations.
Hermann Chong Dr. King Linear Algebra Applications 28 November 2001 The Importance of Matrices in the DirectX API In the world of 3D gaming, there are two APIs (Application Program Interface) that reign
More informationC P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev
C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE UGRAD.CS.UBC.C A/~CS314 Mikhail Bessmeltsev 1 WHAT IS RENDERING? Generating image from a 3D scene 2 WHAT IS RENDERING? Generating image
More information3D Viewing. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller
3D Viewing Introduction to Computer Graphics Torsten Möller Machiraju/Zhang/Möller Reading Chapter 4 of Angel Chapter 13 of Hughes, van Dam, Chapter 7 of Shirley+Marschner Machiraju/Zhang/Möller 2 Objectives
More informationFondamenti di Grafica 3D The Rasterization Pipeline.
Fondamenti di Grafica 3D The Rasterization Pipeline paolo.cignoni@isti.cnr.it http://vcg.isti.cnr.it/~cignoni Ray Casting vs. GPUs for Triangles Ray Casting For each pixel (ray) For each triangle Does
More informationPipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11
Pipeline Operations CS 4620 Lecture 11 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION
More informationCS 591B Lecture 9: The OpenGL Rendering Pipeline
CS 591B Lecture 9: The OpenGL Rendering Pipeline 3D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination Spring 2007 Rui Wang 3D Polygon Rendering Many applications
More information- Rasterization. Geometry. Scan Conversion. Rasterization
Computer Graphics - The graphics pipeline - Geometry Modelview Geometry Processing Lighting Perspective Clipping Scan Conversion Texturing Fragment Tests Blending Framebuffer Fragment Processing - So far,
More informationCS 130 Final. Fall 2015
CS 130 Final Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying
More informationReminder: Affine Transformations. Viewing and Projection. Shear Transformations. Transformation Matrices in OpenGL. Specification via Ratios
CSCI 420 Computer Graphics Lecture 6 Viewing and Projection Jernej Barbic University o Southern Caliornia Shear Transormation Camera Positioning Simple Parallel Projections Simple Perspective Projections
More informationS U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T
S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T Copyright 2018 Sung-eui Yoon, KAIST freely available on the internet http://sglab.kaist.ac.kr/~sungeui/render
More informationCS 4204 Computer Graphics
CS 4204 Computer Graphics 3D Viewing and Projection Yong Cao Virginia Tech Objective We will develop methods to camera through scenes. We will develop mathematical tools to handle perspective projection.
More informationTransformation Pipeline
Transformation Pipeline Local (Object) Space Modeling World Space Clip Space Projection Eye Space Viewing Perspective divide NDC space Normalized l d Device Coordinatesd Viewport mapping Screen space Coordinate
More informationCITSTUDENTS.IN VIEWING. Computer Graphics and Visualization. Classical and computer viewing. Viewing with a computer. Positioning of the camera
UNIT - 6 7 hrs VIEWING Classical and computer viewing Viewing with a computer Positioning of the camera Simple projections Projections in OpenGL Hiddensurface removal Interactive mesh displays Parallelprojection
More informationModels and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico
Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Objectives Learn the basic design of a graphics system Introduce
More informationGRAFIKA KOMPUTER. ~ M. Ali Fauzi
GRAFIKA KOMPUTER ~ M. Ali Fauzi Drawing 2D Graphics VIEWPORT TRANSFORMATION Recall :Coordinate System glutreshapefunc(reshape); void reshape(int w, int h) { glviewport(0,0,(glsizei) w, (GLsizei) h); glmatrixmode(gl_projection);
More informationPipeline Operations. CS 4620 Lecture 14
Pipeline Operations CS 4620 Lecture 14 2014 Steve Marschner 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives
More information