The Graphics Pipeline and OpenGL I: Transformations!
|
|
- Derrick Atkinson
- 6 years ago
- Views:
Transcription
1 ! The Graphics Pipeline and OpenGL I: Transformations! Gordon Wetzstein! Stanford University! EE 267 Virtual Reality! Lecture 2! stanford.edu/class/ee267/!!
2 Albrecht Dürer, Underweysung der Messung mit dem Zirckel und Richtscheyt, 1525!
3 Lecture Overview! what is computer graphics?! the graphics pipeline! primitives: vertices, edges, triangles!! model transforms: translations, rotations, scaling! view transform! perspective transform! window transform!
4 blender.org!
5 Modeling 3D Geometry! Courtesy of H.G. Animations!
6 blender.org!
7 What is Computer Graphics?! at the most basic level: conversion from 3D scene description to 2D image! what do you need to describe a static scene?! 3D geometry and transformations! lights! material properties! most common geometry primitives in graphics:! vertices (3D points) and normals (unit-length vector associated with vertex)! triangles (set of 3 vertices, high-resolution 3D models have M or B of triangles)!
8 ! The Graphics Pipeline! blender.org! geometry + transformations! cameras and viewing! lighting and shading! rasterization! texturing!
9 Some History! Stanford startup in 1981! computer graphics goes hardware! based on Jim Clark s geometry engine!
10 Some History!
11 The Graphics Pipeline! monolithic graphics workstations of the 80s have been replaced by modular GPUs (graphics processing units); major companies: NVIDIA, AMD, Intel! early versions of these GPUs implemented fixed-function rendering pipeline in hardware! GPUs have become programmable starting in the late 90s! e.g. in 2001 Nvidia GeForce 3 = first programmable shaders! now: GPUs = programmable (e.g. OpenGL, CUDA, OpenCL) processors!
12 The Graphics Pipeline! GPU = massively! parallel processor!
13 OpenGL is our interface to the GPU! The Graphics Pipeline! right: old-school OpenGL state machine! today s lecture: vertex transforms! I had this poster hanging on my dorm wall during undergrad!
14 WebGL! JavaScript application programmer interface (API) for 2D and 3D graphics! OpenGL ES 2.0 running in the browser, implemented by all modern browsers! overview, tutorials, documentation: see lab 1!!
15 three.js! cross-browser JavaScript library/api! higher-level library that provides a lot of useful helper functions, tools, and abstractions around WebGL easy and convenient to use! simple examples: great introduction (in WebGL):!
16 The Graphics Pipeline!
17 The Graphics Pipeline! 1. Vertex Processing: Process and transform individual vertices & normals. 2. Rasterization: Convert each primitive (connected vertices) into a set of fragments. A fragment can be treated as a pixel in 3D spaces, which is aligned with the pixel grid, with attributes such as position, color, normal and texture.! 3.! Fragment Processing: Process individual fragments.! 4.! Output Merging: Combine the fragments of all primitives (in 3D space) into 2D color-pixel for the display.!
18 The Graphics Pipeline! 1. Vertex Processing: Process and transform individual vertices & normals. 2. Rasterization: Convert each primitive (connected vertices) into a set of fragments. A fragment can be treated as a pixel in 3D spaces, which is aligned with the pixel grid, with attributes such as position, color, normal and texture.! 3.! Fragment Processing: Process individual fragments.! 4.! Output Merging: Combine the fragments of all primitives (in 3D space) into 2D color-pixel for the display.!
19 The Graphics Pipeline! vertex shader! fragment shader! transforms & (pervertex) lighting! texturing! (per-fragment) lighting!
20 Coordinate Systems! right hand coordinate system! a few different coordinate systems:! object coordinates! world coordinates! viewing coordinates! also clip, normalized device, and window coordinates! wikipedia!
21 Primitives! vertex = 3D point v(x,y,z)! triangle = 3 vertices! normal = 3D vector per vertex describing surface orientation n=(n x,n y,n z )! n 2 n 3 v 3 v 2 n 1 v 1
22 Pixels v Fragments! fragments have rasterized 2D coordinates on screen but a lot of other attributes too (texture coordinates, depth value, alpha value, )! pixels appear on screen! won t discuss in more detail today!
23 Vertex Transforms!
24 Vertex Transforms! vertex/normal! transforms!
25
26 Vertex Transforms! 1. Arrange the objects (or models, or avatar) in the world (Model Transform).
27 Vertex Transforms! 1. Arrange the objects (or models, or avatar) in the world (Model Transform).
28 Vertex Transforms! 1. Arrange the objects (or models, or avatar) in the world (Model Transform).
29 Vertex Transforms! 1. Arrange the objects (or models, or avatar) in the world (Model Transform).
30 Vertex Transforms! 1. Arrange the objects (or models, or avatar) in the world (Model Transform).
31 Vertex Transforms! 1. Arrange the objects (or models, or avatar) in the world (Model Transform). 2. Position and orientation the camera (View transform).
32 Vertex Transforms! 1. Arrange the objects (or models, or avatar) in the world (Model Transform). 2. Position and orientation the camera (View transform).
33 Vertex Transforms! 1. Arrange the objects (or models, or avatar) in the world (Model Transform). 2. Position and orientation the camera (View transform).
34 Vertex Transforms! 1. Arrange the objects (or models, or avatar) in the world (Model Transform). 2. Position and orientation the camera (View transform). 3. Select a camera lens (wide angle, normal or telescopic), adjust the focus length and zoom factor to set the camera's field of view (Projection transform).
35 Vertex Transforms! 1. Arrange the objects (or models, or avatar) in the world (Model Transform). 2. Position and orientation the camera (View transform). 3. Select a camera lens (wide angle, normal or telescopic), adjust the focus length and zoom factor to set the camera's field of view (Projection transform).
36 Vertex Transforms! 1. Arrange the objects (or models, or avatar) in the world (Model Transform). 2. Position and orientation the camera (View transform). 3. Select a camera lens (wide angle, normal or telescopic), adjust the focus length and zoom factor to set the camera's field of view (Projection transform).
37 Vertex Transforms! 1. Arrange the objects (or models, or avatar) in the world (Model Transform). 2. Position and orientation the camera (View transform). 3. Select a camera lens (wide angle, normal or telescopic), adjust the focus length and zoom factor to set the camera's field of view (Projection transform).
38 Model Transform!! x $ transform each vertex v = # y & from object coordinates to world coordinates! " # z % &
39 Model Transform - Scaling! x transform each vertex v = y from object coordinates to world coordinates! z 1. scaling as 3x3 matrix! S(s x,s y,s z ) = s x s y s z scaled vertex = matrix-vector product:! Sv = s x s y s z x y z = s x x s y y s z z
40 Model Transform - Rotation! x transform each vertex v = y from object coordinates to world coordinates! z 2. rotation as 3x3 matrix! R z (θ) = cosθ sinθ 0 sinθ cosθ R x (θ) = cosθ sinθ 0 sinθ cosθ R y (θ) = cosθ 0 sinθ sinθ 0 cosθ rotated vertex = matrix-vector product, e.g.! R z v = cosθ sinθ 0 sinθ cosθ x y z = x cosθ ysinθ xsinθ + ycosθ z
41 Model Transform - Translation! transform each vertex from object coordinates to world coordinates! v = x y z 3. translation cannot be represented as 3x3 matrix!! x y z + d x d y d z = x + d x y + d y z + d z that s unfortunate L!
42 Model Transform - Translation! solution: use homogeneous coordinates, vertex is! v = x y z 1 3. translation is 4x4 matrix! T (d) = d x d y d z better J! Tv = d x d y d z x y z 1 = x + d x y + d y z + d z 1
43 Summary of Homogeneous Matrix Transforms!!!! translation! scale! T (d) = S(s) = d x d y d z s x s y s z rotation! R z (θ) = cosθ sinθ 0 0 sinθ cosθ R x = cosθ sinθ 0 0 sinθ cosθ R y = cosθ 0 sinθ sinθ 0 cosθ Read more:
44 Summary of Homogeneous Matrix Transforms!!!! d x d y translation T (d) = inverse translation! d z s x s y 0 0 scale S(s) = inverse scale! 0 0 s z T 1 (d) = T ( d) = d x d y d z / s x S 1 (s) = S 1 s 0 1/ s = y / s z cosθ sinθ 0 0 sinθ cosθ rotation R z (θ) = inverse rotation! R 1 z (θ) = R z ( θ ) = cos θ sin θ 0 0 sin θ cos θ Read more:
45 Summary of Homogeneous Matrix Transforms!!! successive transforms:! inverse successive transforms:! v' = T S R z R x T v v = ( T S R z R x T ) 1 v' = T 1 R x 1 R z 1 S 1 T 1 v' Read more:
46 ! Vector and Normal Transforms! homogeneous representation of a vector t, i.e. pointing from v 1 to v 2 :! " $ t = $ $ # $ (v 2! v 1 ) x (v 2! v 1 ) y (v 2! v 1 ) z (1!1) % " ' $ ' $ ' $ & ' # $ t x t y t z 0 % ' ' ' & ' successive transforms:! this works! t ' = M!t = M!( v 2 " v 1 ) = M!v 2 " M!v 1 v' 2 v 2 t M t ' v 1 v' 1
47 ! Vector and Normal Transforms! homogeneous representation of a normal (unit length, perpendicular to surface)!! # n = # # " # n x n y n z 0 $ & & & % & successive transforms???! this does NOT work! (non-uniform scaling is a problem)! v 2 n' = M!n n t M v' 2 n' t ' v 1 v' 1
48 ! Vector and Normal Transforms! homogeneous representation of a normal (unit length, perpendicular to surface)!! # n = # # " # n x n y n z 0 $ & & & % & need to use transpose of inverse for transformation! v 2 n t M n' = ( M!1 ) T "n v' 2 n' t ' v 1 v' 1
49 Attention!! rotations and translations (or transforms in general) are not commutative!! make sure you get the correct order!!
50 View Transform! so far we discussed model transforms, e.g. going from object or model space to world space!
51 View Transform! so far we discussed model transforms, e.g. going from object or model space to world space! one simple 4x4 transform matrix is sufficient to go from world space to camera or view space!
52 !!!! View Transform! specify camera by!! eye x $ # & eye position! eye = # eye y & # eye & " z %! # reference position! center = # # "! up x $ # & up vector! up = # up y & # " up & z % center x center y center z $ & & & %
53 !!!! View Transform! specify camera by! eye x eye position! eye = eye y eye z reference position! center = up x up vector! up = up y up z center x center y center z compute 3 vectors:! z c = x c = eye center eye center up zc up z c y c = z c x c
54 !! View Transform! view transform M is translation into eye position,! followed by rotation! compute 3 vectors:! z c = x c = eye center eye center up zc up z c y c = z c x c
55 !! View Transform! view transform M is translation into eye position,! followed by rotation! M = R T ( e) = x x c y x c z x c x y c y y c z y c x z c y z c z z c eye x eye y eye z compute 3 vectors:! z c = x c = eye center eye center up zc up z c y c = z c x c
56 !! View Transform! view transform M is translation into eye position,! followed by rotation! M = R T ( e) = c x x c x y c x z c y x c y y c y z c z x c z y c z z ( ) ( ) ( ) x x c eye x + x y c eye y + x z c eye z y x c eye x + y y c eye y + y z c eye z z x c eye x + z y c eye y + z z c eye z
57 View Transform! in camera/view space, the camera is at the origin, looking into negative z! modelview matrix is combined model (rotations, translations, scaling) and view matrix!
58 View Transform! in camera/view space, the camera is at the origin, looking into negative z! up e z x z x vodacek.zvb.cz!
59 Projection Transform! similar to choosing lens and sensor of camera specify field of view and aspect!
60 Projection Transform - Perspective Projection! have symmetric view frustum! fovy: vertical angle in degrees! aspect: ratio of width/height! znear: near clipping plane (relative from cam)! zfar: far clipping plane (relative from cam)! f = cot( fovy / 2) # % % % M proj = % % % $ % f aspect f 0 0 zfar + znear 2 " zfar " znear 0 0!! zfar! znear zfar! znear 0 0!1 0 & ( ( ( ( ( ( ' ( projection matrix! (symmetric frustum)!
61 Projection Transform - Perspective Projection! more general: a perspective frustum (truncated, possibly sheared pyramid)! left (l), right (r), bottom (b), top (t): corner coordinates on near clipping plane (at znear)! perspective frustum! # % % % M proj = % % % % $ % 2! znear r + l 0 0 r " l r " l 2! znear t + b 0 0 t " b t " b zfar + znear 2! zfar! znear 0 0 " " zfar " znear zfar " znear 0 0 "1 0 & ( ( ( ( ( ( ( ' ( projection matrix! (asymmetric frustum)!
62 Projection Transform - Orthographic Projection! more general: a box frustum (no perspective, objects don t get smaller when farther away)! left (l), right (r), bottom (b), top (t): corner coordinates on near clipping plane! " $ $ $ M proj = $ $ $ $ $ # 2 r! l ! r + l r! l 2 0! t + b t! b t! b!2! f + n f! n f! n % ' ' ' ' ' ' ' ' & projection matrix! (orthographic)!
63 Perspective! Orthographic! [Song Ho Ahn]!
64 ! Projection Transform! possible source of confusion for znear and zfar:! Marschner & Shirley define it as absolute z coordinates, thus znear>zfar and both values are always negative! OpenGL and we define it as positive values, i.e. the distances of the near and far clipping plane from the camera (zfar > znear)!
65 Modelview Projection Matrix! put it all together with 4x4 matrix multiplications!! v clip = M proj! M view! M model!v = M proj! M mv!v vertex in clip space! projection matrix! modelview matrix!
66 Clip Space!
67 Normalized Device Coordinates (NDC)! not shown in previous illustration! get to NDC by perspective division! from: OpenGL Programming Guide!! # # v clip = # # # " x clip y clip z clip w clip $ & & & & & %! # v NDC = # # " # x clip / w clip y clip / w clip z clip / w clip 1 $ & & & % & ( ) ( ) ( )! "1,1! "1,1! "1,1 vertex in clip space! vertex in NDC!
68 ! Viewport Transform! define (sub)window as viewport(x,y,width,height),! x,y lower left corner of viewport rectangle (default is (0,0))! width, height size of viewport rectangle in pixels! from: OpenGL Programming Guide! x window = width ( x NDC +1) + x 2 y window = height y NDC +1 2 z window = 1 2 z NDC ( ) + y! # v NDC = # # " # x clip / w clip y clip / w clip z clip / w clip 1 $ & & & % &! # v window = # # # " x window y window z window 1 $ & & & & % ( ) ( ) '( 0,1) ' 0,width (1 ' 0,height (1 vertex in NDC! vertex in window coords!
69 The Graphics Pipeline Another Illustration!
70 The Graphics Pipeline! all vertex transforms from today!
71 ! The Graphics Pipeline! assign fixed color (e.g. red) to each vertex in window coordinates (fragment)! interpolate (i.e. rasterize) lines between vertices (as defined by user)!
72 and we can almost do this! Nintendo Virtual Boy Game Red Alarm!
73 Summary! graphics pipeline is a series of operations that takes 3D vertices/normals/ triangles as input and generates fragments and pixels! today, we only discussed a part of it: vertex and normal transforms! transforms include: rotation, scale, translation, perspective projection, perspective division, and viewport transform! most transforms are represented as 4x4 matrices in homogeneous coordinates à know your matrices & be able to create, manipulate, invert them!!
74 Next Lecture: Lighting and Shading, Fragment Processing! vertex shader! fragment shader! transforms & (pervertex) lighting! texturing! (per-fragment) lighting!
75 !! Further Reading! good overview of OpenGL (deprecated version) and graphics pipeline (missing a few things) :! textbook: Shirley and Marschner Fundamentals of Computer Graphics, AK Peters, 2009! definite reference: OpenGL Programming Guide aka OpenGL Red Book! WebGL / three.js tutorials:
The 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 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 informationCOMS 4160: Problems on Transformations and OpenGL
COMS 410: Problems on Transformations and OpenGL Ravi Ramamoorthi 1. Write the homogeneous 4x4 matrices for the following transforms: Translate by +5 units in the X direction Rotate by 30 degrees about
More informationCSE 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 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 informationToday. Rendering pipeline. Rendering pipeline. Object vs. Image order. Rendering engine Rendering engine (jtrt) Computergrafik. Rendering pipeline
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
More informationThe Graphics Pipeline and OpenGL IV: Stereo Rendering, Depth of Field Rendering, Multi-pass Rendering!
! The Graphics Pipeline and OpenGL IV: Stereo Rendering, Depth of Field Rendering, Multi-pass Rendering! Gordon Wetzstein! Stanford University! EE 267 Virtual Reality! Lecture 6! stanford.edu/class/ee267/!!
More informationLecture 2. Shaders, GLSL and GPGPU
Lecture 2 Shaders, GLSL and GPGPU Is it interesting to do GPU computing with graphics APIs today? Lecture overview Why care about shaders for computing? Shaders for graphics GLSL Computing with shaders
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 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 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 informationVirtual Cameras and The Transformation Pipeline
Virtual Cameras and The Transformation Pipeline Anton Gerdelan gerdela@scss.tcd.ie with content from Rachel McDonnell 13 Oct 2014 Virtual Camera We want to navigate through our scene in 3d Solution = create
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 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 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 informationComputer Viewing. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science
Computer Viewing CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce the mathematics of projection Introduce OpenGL viewing functions Look at
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 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 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 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 informationComputer graphics 2: Graduate seminar in computational aesthetics
Computer graphics 2: Graduate seminar in computational aesthetics Angus Forbes evl.uic.edu/creativecoding/cs526 Homework 2 RJ ongoing... - Follow the suggestions in the Research Journal handout and find
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 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 informationThe Graphics Pipeline and OpenGL III: OpenGL Shading Language (GLSL 1.10)!
! The Graphics Pipeline and OpenGL III: OpenGL Shading Language (GLSL 1.10)! Gordon Wetzstein! Stanford University! EE 267 Virtual Reality! Lecture 4! stanford.edu/class/ee267/! Updates! for 24h lab access:
More informationThe Graphics Pipeline and OpenGL III: OpenGL Shading Language (GLSL 1.10)!
! The Graphics Pipeline and OpenGL III: OpenGL Shading Language (GLSL 1.10)! Gordon Wetzstein! Stanford University! EE 267 Virtual Reality! Lecture 4! stanford.edu/class/ee267/! Lecture Overview! Review
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 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 informationShaders. Slide credit to Prof. Zwicker
Shaders Slide credit to Prof. Zwicker 2 Today Shader programming 3 Complete model Blinn model with several light sources i diffuse specular ambient How is this implemented on the graphics processor (GPU)?
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 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 informationGEOMETRIC TRANSFORMATIONS AND VIEWING
GEOMETRIC TRANSFORMATIONS AND VIEWING 2D and 3D 1/44 2D TRANSFORMATIONS HOMOGENIZED Transformation Scaling Rotation Translation Matrix s x s y cosθ sinθ sinθ cosθ 1 dx 1 dy These 3 transformations are
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 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 informationComputer Graphics with OpenGL ES (J. Han) Chapter VII Rasterizer
Chapter VII Rasterizer Rasterizer The vertex shader passes the clip-space vertices to the rasterizer, which performs the following: Clipping Perspective division Back-face culling Viewport transform Scan
More informationOPENGL RENDERING PIPELINE
CPSC 314 03 SHADERS, OPENGL, & JS UGRAD.CS.UBC.CA/~CS314 Textbook: Appendix A* (helpful, but different version of OpenGL) Alla Sheffer Sep 2016 OPENGL RENDERING PIPELINE 1 OPENGL RENDERING PIPELINE Javascript
More informationCS 112 The Rendering Pipeline. Slide 1
CS 112 The Rendering Pipeline Slide 1 Rendering Pipeline n Input 3D Object/Scene Representation n Output An image of the input object/scene n Stages (for POLYGON pipeline) n Model view Transformation n
More informationCSC 305 The Graphics Pipeline-1
C. O. P. d y! "#"" (-1, -1) (1, 1) x z CSC 305 The Graphics Pipeline-1 by Brian Wyvill The University of Victoria Graphics Group Perspective Viewing Transformation l l l Tools for creating and manipulating
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 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 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 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 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 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 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 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 informationSpring 2011 Prof. Hyesoon Kim
Spring 2011 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on
More informationPerspective transformations
Perspective transformations Transformation pipeline Modelview: model (position objects) + view (position the camera) Projection: map viewing volume to a standard cube Perspective division: project D to
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 informationCS4620/5620: Lecture 14 Pipeline
CS4620/5620: Lecture 14 Pipeline 1 Rasterizing triangles Summary 1! evaluation of linear functions on pixel grid 2! functions defined by parameter values at vertices 3! using extra parameters to determine
More informationTSBK03 Screen-Space Ambient Occlusion
TSBK03 Screen-Space Ambient Occlusion Joakim Gebart, Jimmy Liikala December 15, 2013 Contents 1 Abstract 1 2 History 2 2.1 Crysis method..................................... 2 3 Chosen method 2 3.1 Algorithm
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 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 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 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 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 informationHead Mounted Display Optics I!
! Head Mounted Display Optics I! Gordon Wetzstein! Stanford University! EE 267 Virtual Reality! Lecture 7! stanford.edu/class/ee267/!! ! Logistics! HW3 is probably the longest homework, so get started
More informationDrawing Fast The Graphics Pipeline
Drawing Fast The Graphics Pipeline CS559 Fall 2015 Lecture 9 October 1, 2015 What I was going to say last time How are the ideas we ve learned about implemented in hardware so they are fast. Important:
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 informationSpring 2009 Prof. Hyesoon Kim
Spring 2009 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on
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 informationWire-Frame 3D Graphics Accelerator IP Core. C Library Specification
Wire-Frame 3D Graphics Accelerator IP Core C Library Specification Kenji Ishimaru 1 / 29 Revision History Rev. Date Author Description 1.0 2015/09/30 Kenji Ishimaru First release
More informationCS 354R: Computer Game Technology
CS 354R: Computer Game Technology Texture and Environment Maps Fall 2018 Texture Mapping Problem: colors, normals, etc. are only specified at vertices How do we add detail between vertices without incurring
More informationCSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012
CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Homework project #2 due this Friday, October
More information1 OpenGL - column vectors (column-major ordering)
OpenGL - column vectors (column-major ordering) OpenGL uses column vectors and matrices are written in a column-major order. As a result, matrices are concatenated in right-to-left order, with the first
More informationSUMMARY. CS380: Introduction to Computer Graphics Projection Chapter 10. Min H. Kim KAIST School of Computing 18/04/12. Smooth Interpolation
CS38: Introduction to Computer Graphics Projection Chapter Min H. Kim KAIST School of Computing Smooth Interpolation SUMMARY 2 Cubic Bezier Spline To evaluate the function c(t) at any value of t, we perform
More informationReal-Time Rendering (Echtzeitgraphik) Michael Wimmer
Real-Time Rendering (Echtzeitgraphik) Michael Wimmer wimmer@cg.tuwien.ac.at Walking down the graphics pipeline Application Geometry Rasterizer What for? Understanding the rendering pipeline is the key
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 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 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 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 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 informationgraphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1
graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time
More informationgraphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1
graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time
More informationReal - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský
Real - Time Rendering Graphics pipeline Michal Červeňanský Juraj Starinský Overview History of Graphics HW Rendering pipeline Shaders Debugging 2 History of Graphics HW First generation Second generation
More informationThe Rasterization Pipeline
Lecture 5: The Rasterization Pipeline (and its implementation on GPUs) Computer Graphics CMU 15-462/15-662, Fall 2015 What you know how to do (at this point in the course) y y z x (w, h) z x Position objects
More informationCS452/552; EE465/505. Intro to Lighting
CS452/552; EE465/505 Intro to Lighting 2-10 15 Outline! Projection Normalization! Introduction to Lighting (and Shading) Read: Angel Chapter 5., sections 5.4-5.7 Parallel Projections Chapter 6, sections
More informationCS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside
CS230 : Computer Graphics Lecture 4 Tamar Shinar Computer Science & Engineering UC Riverside Shadows Shadows for each pixel do compute viewing ray if ( ray hits an object with t in [0, inf] ) then compute
More informationCOMP Preliminaries Jan. 6, 2015
Lecture 1 Computer graphics, broadly defined, is a set of methods for using computers to create and manipulate images. There are many applications of computer graphics including entertainment (games, cinema,
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 informationComputer Graphics Seminar
Computer Graphics Seminar MTAT.03.305 Spring 2018 Raimond Tunnel Computer Graphics Graphical illusion via the computer Displaying something meaningful (incl art) Math Computers are good at... computing.
More informationCS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST
CS 380 - GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1 Markus Hadwiger, KAUST Reading Assignment #2 (until Feb. 17) Read (required): GLSL book, chapter 4 (The OpenGL Programmable
More informationINTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52
cs337 It looks like a matrix Sort of Viewing III Projection in Practice / 52 cs337 Arbitrary 3D views Now that we have familiarity with terms we can say that these view volumes/frusta can be specified
More informationAdvanced Rendering Techniques
Advanced Rendering Techniques Lecture Rendering Pipeline (Part I) Professor Leandro Augusto Frata Fernandes laffernandes@ic.uff.br Lecture notes available in http://www.ic.uff.br/~laffernandes/teaching/0./topicos_rendering
More informationLecturer Athanasios Nikolaidis
Lecturer Athanasios Nikolaidis Computer Graphics: Graphics primitives 2D viewing and clipping 2D and 3D transformations Curves and surfaces Rendering and ray tracing Illumination models Shading models
More informationCSE452 Computer Graphics
CSE45 Computer Graphics Lecture 8: Computer Projection CSE45 Lecture 8: Computer Projection 1 Review In the last lecture We set up a Virtual Camera Position Orientation Clipping planes Viewing angles Orthographic/Perspective
More informationScanline Rendering 2 1/42
Scanline Rendering 2 1/42 Review 1. Set up a Camera the viewing frustum has near and far clipping planes 2. Create some Geometry made out of triangles 3. Place the geometry in the scene using Transforms
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 informationTutorial on GPU Programming #2. Joong-Youn Lee Supercomputing Center, KISTI
Tutorial on GPU Programming #2 Joong-Youn Lee Supercomputing Center, KISTI Contents Graphics Pipeline Vertex Programming Fragment Programming Introduction to Cg Language Graphics Pipeline The process to
More informationINTRODUCTION TO COMPUTER GRAPHICS. cs123. It looks like a matrix Sort of. Viewing III. Projection in Practice 1 / 52
It looks like a matrix Sort of Viewing III Projection in Practice 1 / 52 Arbitrary 3D views } view volumes/frusta spec d by placement and shape } Placement: } Position (a point) } look and up vectors }
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 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 informationCiril Bohak. - INTRODUCTION TO WEBGL
2016 Ciril Bohak ciril.bohak@fri.uni-lj.si - INTRODUCTION TO WEBGL What is WebGL? WebGL (Web Graphics Library) is an implementation of OpenGL interface for cmmunication with graphical hardware, intended
More informationLecture 5: Transforms II. Computer Graphics and Imaging UC Berkeley CS184/284A
Lecture 5: Transforms II Computer Graphics and Imaging UC Berkeley 3D Transforms 3D Transformations Use homogeneous coordinates again: 3D point = (x, y, z, 1) T 3D vector = (x, y, z, 0) T Use 4 4 matrices
More informationWe will use WebGL 1.0. WebGL 2.0 is now being supported by most browsers but requires a better GPU so may not run on older computers or on most cell
We will use WebGL 1.0. WebGL 2.0 is now being supported by most browsers but requires a better GPU so may not run on older computers or on most cell phones and tablets. See http://webglstats.com/. We will
More informationLecture 4: 3D viewing and projections
Lecture 4: 3D viewing and projections Today s lecture Rotations around an arbitrary axis (Continuation from the last lecture) The view coordinate system Change of coordinate system (same origin) Change
More informationRendering If we have a precise computer representation of the 3D world, how realistic are the 2D images we can generate? What are the best way to mode
Graphic Pipeline 1 Rendering If we have a precise computer representation of the 3D world, how realistic are the 2D images we can generate? What are the best way to model 3D world? How to render them?
More informationE.Order of Operations
Appendix E E.Order of Operations This book describes all the performed between initial specification of vertices and final writing of fragments into the framebuffer. The chapters of this book are arranged
More information