Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group computer graphics & visualization 3D Rendering Praktikum: Shader Gallery The.

Slides:



Advertisements
Similar presentations
Computer Graphics Lecture 4 Geometry & Transformations.
Advertisements

Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
Basics. OpenGL. “Hello world” George Georgiev Telerik Corporation
Camera Models A camera is a mapping between the 3D world and a 2D image The principal camera of interest is central projection.
Part I: Basics of Computer Graphics Viewing Transformation and Coordinate Systems Chapter
1 Jinxiang Chai CSCE 441 Computer Graphics. 2 Midterm Time: 10:10pm-11:20pm, 10/20 Location: HRBB 113.
Computer Graphics (Fall 2008) COMS 4160, Lecture 3: Transformations 1
Representation CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Basic graphics. ReviewReview Viewing Process, Window and viewport, World, normalized and device coordinates Input and output primitives and their attributes.
Basic Graphics Concepts Day One CSCI 440. Terminology object - the thing being modeled image - view of object(s) on the screen frame buffer - memory that.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Transformations Dr. Amy Zhang.
CS 445 / 645 Introduction to Computer Graphics Lecture 3 Mathematical Primitives Introduction to Transformations Lecture 3 Mathematical Primitives Introduction.
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Week 2 - Wednesday CS361.
2003CS Hons RW778 Graphics1 Chapter 5: Transforming Objects 5.2 Introduction to Transformations 5.2 Introduction to Transformations –Affine transformations.
Image Synthesis Rabie A. Ramadan, PhD 2. 2 Java OpenGL Using JOGL: Using JOGL: Wiki: You can download JOGL from.
Computer Graphics. Requirements Prerequisites Prerequisites CS 255 : Data Structures CS 255 : Data Structures Math 253 Math 253 Experience with C Programming.
Transformations Jehee Lee Seoul National University.
MIT EECS 6.837, Durand and Cutler Graphics Pipeline: Projective Transformations.
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS The Geometry Pipeline.
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
Geometric Camera Models
10/3/02 (c) 2002 University of Wisconsin, CS 559 Last Time 2D Coordinate systems and transformations.
The Rendering Pipeline CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Representation. Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames for.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
OpenGL: Introduction Yanci Zhang Game Programming Practice.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Mark Nelson 3d projections Fall 2013
CSE Real Time Rendering Week 5. Slides(Some) Courtesy – E. Angel and D. Shreiner.
1 Chapter 2: Geometric Camera Models Objective: Formulate the geometrical relationships between image and scene measurements Scene: a 3-D function, g(x,y,z)
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.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
Subject Name: Computer Graphics Subject Code: Textbook: “Computer Graphics”, C Version By Hearn and Baker Credits: 6 1.
2/19/04© University of Wisconsin, CS559 Spring 2004 Last Time Painterly rendering 2D Transformations –Transformations as coordinate system changes –Transformations.
©2005, Lee Iverson Lee Iverson UBC Dept. of ECE EECE 478 Viewing and Projection.
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group computer graphics & visualization GameFX C# / DirectX 2005 The Rendering Pipeline.
1 Representation. 2 Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames.
Coordinate Systems Lecture 1 Fri, Sep 2, The Coordinate Systems The points we create are transformed through a series of coordinate systems before.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Lecture 13: Raster Graphics and Scan Conversion
GL transformations-models. x' = x+t x y' = y+t y z' = z+t z t x t y s x =s y =s z t z uniform nonuniform?!!?? x' = x·s x y' =
Computer Graphics I, Fall 2010 Transformations.
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
3D GRAPHICS RENDERING PIPELINE CS / TECHNICAL BACKGROUND PAGE 11.
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
GLSL Review Monday, Nov OpenGL pipeline Command Stream Vertex Processing Geometry processing Rasterization Fragment processing Fragment Ops/Blending.
COMPUTER GRAPHICS AND LINEAR ALGEBRA AN INTRODUCTION.
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
Rendering Pipeline Fall, 2015.
- Introduction - Graphics Pipeline
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics
Graphics Fundamentals
CSCE 441 Computer Graphics 3-D Viewing
CS451Real-time Rendering Pipeline
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
Chapter VII Rasterizer
ICG 2018 Fall Homework1 Guidance
Geometrical Transformations
Presentation transcript:

Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group computer graphics & visualization 3D Rendering Praktikum: Shader Gallery The Rendering Pipeline

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group … what an „end user“ sees. The Rendering Pipeline …

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group The Rendering Pipeline … … in pictures

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Rendering pipeline Geometry subsystem Raster subsystem Objects in 3D world Color image 2D primitives

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Pixel Stage Vertex Stage User / DriverOverview Transform & Lighting Rasterizer Texturing Blending/Ops Texture 3 Texture 2 Texture 1 Texture 0

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Rendering pipeline Geometry subsystem Raster subsystem Objects in 3D world Color image 2D primitives 2D Object coordinates World coordinates Eye coordinates Modelling transform Viewing transform Normalizing transform Normalized (Clip-)coord. clipping affine Model-View-Transformation

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Transformations - - A transformation is like a function of a point - - Modeling: - - Define objects in „convenient“ coordinate systems - - Multiply-instantiated geometry - - Hierarchically defined linked figures - - Viewing: - - Window systems - - Virtual camera - - Perspective transformations

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Point representation - - Represent as row or column vector - - Affects the kind of matrices we can multiply with

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Transformation representation - - Represent 2D transformations by a 2x2 matrix - - If the point is a column vector - - If the point is a row vector

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Linear transformations - - Scaling - - Reflection s x = s y uniform scaling S

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Linear transformations - - Shearing - - Rotation around origin by a 1 R(90°)

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Affine transformations - - Affine transformations: parallelism is preserved, length & angles not - - All linear transformations can be written as matrix multiplication - - What about translation ? - - We want to write T Homogeneous coordinates!

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group General Camera Setup - - Look at: - - Position - - Orientation - - Frustum: - - Camera parameters - - Viewport: - - 2D coordinate system Look at FrustumFrustum ViewportViewport

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Camera look at - - Move camera C to origin Translate by –C - - Build orthonormal frame „right“R=DxU „zenith“U=RxD - - Adjust orientation Rotation [R,U,D]  [X,Y,-Z] Right View direction Up

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Frustum (Perspective Projection) T t B b -f -n -z y

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Last Transformations - - After all the projections we have: - - Perspective division: - - Viewport transformation:

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Pixel Stage Vertex Stage User / DriverOverview Transform & Lighting Rasterizer Texturing Blending/Ops Texture 3 Texture 2 Texture 1 Texture 0

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Bresenham (Line Drawing)

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Getting to Bresenham … /********************************* * Input: * xP: x-value of the startpoint * yP: y-value of the startpoint * xQ: x-value of the endpoint * yQ: y-value of the endpoint *********************************/ function drawLine(int xP, int yP, int xQ, int yQ) { x = xP; y = yP; d = 0; m = (yQ - yP) / (xQ - xP) while(true) { // put the pixel on the screen putPixel(x, y); if(x == xQ) break; x++; d += m; if(d > 0.5) { y++; d--; } /********************************* * Input: * xP: x-value of the startpoint * yP: y-value of the startpoint * xQ: x-value of the endpoint * yQ: y-value of the endpoint *********************************/ function drawLine(int xP, int yP, int xQ, int yQ) { x = xP; y = yP; d = 0; m = (yQ - yP) / (xQ - xP) while(true) { // put the pixel on the screen putPixel(x, y); if(x == xQ) break; x++; d += m; if(d > 0.5) { y++; d--; } Problem: still floating point arithmetic Obersvation: m is rational d is rational

computer graphics & visualization Kai Bürger & Polina Kondratieva – Computer Graphics and Visualization Group Bresenham … function drawLine(int xP, int yP, int xQ, int yQ) { x = xP; y = yP; D = 0; H = xQ - xP; c = 2 * H; M = 2 * (yQ - yP); while(true) { putPixel(x, y); if(x == xQ) break; x++; D += M; if(D > H) { y++; D -= c; } function drawLine(int xP, int yP, int xQ, int yQ) { x = xP; y = yP; D = 0; H = xQ - xP; c = 2 * H; M = 2 * (yQ - yP); while(true) { putPixel(x, y); if(x == xQ) break; x++; D += M; if(D > H) { y++; D -= c; } Introduce the following integer variables: