Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group computer graphics & visualization GameFX C# / DirectX 2005 The Rendering Pipeline.

Slides:



Advertisements
Similar presentations
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1 Emmanuel Agu.
Advertisements

Graphics Pipeline.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
3D Graphics Rendering and Terrain Modeling
Basics. OpenGL. “Hello world” George Georgiev Telerik Corporation
Lecture 4: 3D Rendering Pipeline (I) Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology.
2/7/2001Hofstra University – CSC290B1 Review: Math (Ch 4)
Part I: Basics of Computer Graphics Viewing Transformation and Coordinate Systems Chapter
Gopi -ICS186AW03 - Slide1 Graphics Pipeline: First Pass.
1 Jinxiang Chai CSCE 441 Computer Graphics. 2 Midterm Time: 10:10pm-11:20pm, 10/20 Location: HRBB 113.
Representation CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
CHAPTER 7 Viewing and Transformations © 2008 Cengage Learning EMEA.
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
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.
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.
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.
MIT EECS 6.837, Durand and Cutler Graphics Pipeline: Projective Transformations.
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.
CSE Real Time Rendering Week 2. Graphics Processing 2.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.
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
Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group computer graphics & visualization 3D Rendering Praktikum: Shader Gallery The.
Direct3D Workshop November 17, 2005 Workshop by Geoff Cagle Presented by Players 2 Professionals.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
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.
©2005, Lee Iverson Lee Iverson UBC Dept. of ECE EECE 478 Viewing and Projection.
MIT EECS 6.837, Durand and Cutler The Graphics Pipeline: Projective Transformations.
CS COMPUTER GRAPHICS LABORATORY. LIST OF EXPERIMENTS 1.Implementation of Bresenhams Algorithm – Line, Circle, Ellipse. 2.Implementation of Line,
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
Honours Graphics 2008 Session 2. Today’s focus Vectors, matrices and associated math Transformations and concatenation 3D space.
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.
Rendering Pipeline Fall, 2015.
- Introduction - Graphics Pipeline
Graphics Fundamentals
CSCE 441 Computer Graphics 3-D Viewing
3D Graphics Rendering PPT By Ricardo Veguilla.
CS451Real-time Rendering Pipeline
Real-time Computer Graphics Overview
Viewing and Perspective 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.
ICG 2018 Fall Homework1 Guidance
Presentation transcript:

Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group computer graphics & visualization GameFX C# / DirectX 2005 The Rendering Pipeline

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

computer graphics & visualization Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group The Rendering Pipeline … … in pictures

computer graphics & visualization Jens Krüger & 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 Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group Rendering pipeline Geometry subsystem Raster subsystem Objects in 3D world Color image 2D primitives

computer graphics & visualization Jens Krüger & 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 affin Model-View-Transformation

computer graphics & visualization Jens Krüger & 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 Jens Krüger & 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 Jens Krüger & 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 Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group Linear transformations - Scaling - Reflection s x = s y uniform scaling S

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

computer graphics & visualization Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group Affine transformations - All linear transformations can be written as matrix multiplication - What about translation ? - We want to write T homogeneouscoordinates

computer graphics & visualization Jens Krüger & 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 Jens Krüger & 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]

computer graphics & visualization Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group Frustum T t B b -f -n -z y

computer graphics & visualization Jens Krüger & 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 Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group Bresenham (Line Drawing)

computer graphics & visualization Jens Krüger & 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 arithmeticstill floating point arithmeticObersavtion: m is rationalm is rational d is rationald is rational

computer graphics & visualization Jens Krüger & 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: