Lecture 4: 3D Rendering Pipeline (I) Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology.

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
Elementary 3D Transformations - a "Graphics Engine" Transformation procedures Transformations of coordinate systems Translation Scaling Rotation.
Part I: Basics of Computer Graphics Viewing Transformation and Coordinate Systems Chapter
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Representation Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Graphics Systems I-Chen Lin’s CG slides, Doug James’s CG slides Angel, Interactive Computer Graphics, Chap 1 Introduction to Graphics Pipeline.
Representation CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
CHAPTER 7 Viewing and Transformations © 2008 Cengage Learning EMEA.
April Geometric Transformations for Computer Graphics Shmuel Wimer Bar Ilan Univ., School of Engineering.
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
Lecture 5: 3D Rendering Pipeline (II) Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology.
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.
Rujchai Ung-arunyawee Department of Computer Engineering Khon Kaen University.
Week 2 - Wednesday CS361.
Image Synthesis Rabie A. Ramadan, PhD 2. 2 Java OpenGL Using JOGL: Using JOGL: Wiki: You can download JOGL from.
MIT EECS 6.837, Durand and Cutler Graphics Pipeline: Projective Transformations.
Geometric Transformations
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS The Geometry Pipeline.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
Algebraic Representations of Transformations Day 2
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
Geometric Objects and Transformation
Representation. Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames for.
1 Visiblity: Culling and Clipping Computer Graphics COMP 770 (236) Spring 2009 January 21 & 26: 2009.
CS559: Computer Graphics Lecture 8: 3D Transforms Li Zhang Spring 2008 Most Slides from Stephen Chenney.
CGDD 4003 THE MATH LECTURE (BOILED DOWN, YET LIGHTLY SALTED)
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.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Transformations on the Coordinate Plane: Translations and Rotations.
Viewpoints and Transformations CSIS 5838: Graphics and Animation for Gaming.
David Luebke1/10/2016 CS 551 / 645: Introductory Computer Graphics David Luebke
Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group computer graphics & visualization GameFX C# / DirectX 2005 The Rendering Pipeline.
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.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Viewing and Projection. The topics Interior parameters Projection type Field of view Clipping Frustum… Exterior parameters Camera position Camera orientation.
Mobile & Casual Gaming OpenGL ES Intro. /red/chapter03.html.
Chapter 1 Graphics Systems and Models Models and Architectures.
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
1 Topics: Rendering Systems Basic 3D Concept Rendering System 3D Graphic Effect.
Graphics Programming. Graphics Functions We can think of the graphics system as a black box whose inputs are function calls from an application program;
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
Geometric Transformations for Computer Graphics
Geometric Transformations for Computer Graphics
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
- Introduction - Graphics Pipeline
Graphics Fundamentals
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
3D Graphics Rendering PPT By Ricardo Veguilla.
CS451Real-time Rendering Pipeline
Models and Architectures
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
Unit 1 Transformations in the Coordinate Plane
Geometric Transformations for Computer Graphics
Chapter V Vertex Processing
Chapter VII Rasterizer
Algebraic Representations of Transformations
Models and Architectures
Models and Architectures
Presentation transcript:

Lecture 4: 3D Rendering Pipeline (I) Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology

Interactive Game Loop Game Input (Keyboard, Mouse) Physics Strategy, AI Render Triangles (one frame) Exit? Cleanup States 30 to 60 frames per second

3D Graphics Rendering Pipeline Geometry Pipeline –Processing Vertices –Mainly floating-point operations Rasterization Pipeline –Processing Pixels –Mainly dealing with Integer operations Geometry Processing x y z x y z x y z x y z x y z x y Rasterization Processing x y

3D Graphics Rendering Pipeline Geometry Pipeline –Processing Vertices –Mainly floating-point operations Rasterization Pipeline –Processing Pixels –Mainly dealing with Integer operations –MMX was originally designed to accelerate this functionality Geometry Processing x y z x y z x y z x y z x y z x y Rasterization Processing x y MMX ISA

3D Graphics Rendering Pipeline Geometry Pipeline –Processing Vertices –Mainly floating-point operations –SSE/SSE2 were designed for this part Rasterization Pipeline –Processing Pixels –Mainly dealing with Integer operations –MMX was originally designed to accelerate this functionality Geometry Processing x y z x y z x y z x y z x y z x y Rasterization Processing x y MMX ISA SSE/SSE2 ISA

Fixed Function 3D Graphics Pipeline Geometry Pipeline –Processing Vertices –Mainly floating-point operations –SSE/SSE2 were designed for this part Rasterization Pipeline –Processing Pixels –Mainly dealing with Integer operations –MMX was originally designed to accelerate this functionality Geometry Processing x y z x y z x y z x y z x y z x y Rasterization Processing x y Performed by (GP)GPU

3D Coordinates Left-handed system is more common for graphics viewing space Camera or viewer position can be set up using 3D API +z +x +y Right-Handed System +z +x +y Left-Handed System

Geometry Format ─ Vertex Coordinates (X1, Y1, Z1) (X2, Y2, Z2) (X3, Y3, Z3) +Z +X +Y X1 Z1 Y1

Geometry Format ─ Vertex Normals (NX1, NY1, NZ1) (NX2, NY2, NZ2) (NX3, NY3, NZ3) +Z +X +Y

Geometry Format ─ Vertex Colors (R1, G1, B1, A1) (R2, G2, B2, A2) (R3, B3, B3, G3) +Z +X +Y

Triangle-based Geometry Representation V5 V4 V3 V2 V1 V2 V3V4 V5 V6 V7 V8 V9 V5 V4 V1 V3 V2 Triangle List (note the vertex order) Triangle StripTriangle Fan

Specifying a 3D object Vertex ordering is critical V1 V2V3 V4 V5 V6V7 Triangle list {v1, v3, v2}, {v1, v5, v3}, {v5, v6, v3}, {v4, v3, v6}, {v1, v7, v6}, {v1, v6, v5} Triangle strip {v5, v3, v1, v2}, {v5, v6, v3, v4}, {v7, v6, v1, v5}

V8 Specifying a 3D object Vertex ordering is critical We will discuss normal computation later in this lecture V1 V2V3 V4 V6V7 Triangle list {v1, v2, v7}, {v2, v8, v7}, {v2, v3, v4}, {v2, v4, v8}, {v4, v7, v8}, {v4, v6, v7} Triangle strip {v1, v2, v7, v8}, {v3, v4, v2, v8}, {v6, v7, v4, v8}

3D Rendering Pipeline ClippingPerspective DivideViewport Transform Rasterization Projection TransformWorld TransformView TransformLightingBackface Culling

Transformation Pipeline World Transformation –Model coordinates  World coordinates View Transformation –World coordinates  Camera space Projection Transformation –Camera space  View Plane These are a series of matrix multiplications

World Transformation Translation Rotation Scaling +x +z +y World origin World Coordinates Local model coordinates

View Transformation +x +z +y World origin World Coordinates +y +x +z Camera position Look vector

Projection Transformation Set up camera internals Set up –Field of View (FOV) –View frustum –View planes Will discuss later

Homogeneous Coordinates Enable all transformations to be done by “multiplication” –Primarily for translation (See next few slides) Add one coordinate (w) to a 3D vector Each vertex has [x, y, z, w] –W will be useful for perspective projection –W should be 1 in a Cartesian Coordinate System

Transformation 1: Translation (Offset) +x +z +y +x +z +y (x, y, z) (x t, y t, z t )

Translation Matrix

Transformation 2: Scaling +x +z +y +x +z +y

Scaling Matrix

Transformation 3: Rotation +x +z +y +x +z

2D Rotation +x +y +x +y  (x, y) (x’, y’) +x +y (x, y)   Rotate along which axis?

3D Rotation Matrix Rotation along Z axis Rotation along Y axis Rotation along X axis

Non-Commutative Property (1) 1.Counter-clockwise 90 o along y 2.Clockwise 90 o along x +x +z +y   +x +z+y 1.Clockwise 90 o along x 2.Counter-clockwise 90 o along y  

Non-Commutative Property (1) +x +z +y   +x +z +y     (x’’, y’’, z’’) = (-z, -x, y) (x’’, y’’, z’’) = (-y, -z, x)

Non-Commutative Property (2) 1.Translation by (x, y, z) 2.Scale by 2 times +x +z +y 1.Scale by 2 times 2.Translation by (x, y, z)   +x +z +y 

Non-Commutative Property (2) +x +z +y   +x +z +y    (x’’, y’’, z’’) = (x*Rx+Rx*Tx, y*Ry+Ry*Ty, z*Rz+Rz*Tz)  (x’’, y’’, z’’) = (x*Rx+Tx, y*Ry+Ty, z*Rz+Tz) Offsets were scaled as well

Non-Commutative Property Ordering matters ! Be careful when performing matrix multiplication