The Graphics Rendering Pipeline

Slides:



Advertisements
Similar presentations
Real-Time Rendering 靜宜大學資工研究所 蔡奇偉副教授 2010©.
Advertisements

COMPUTER GRAPHICS SOFTWARE.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Graphics Pipeline.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
3D Graphics Rendering and Terrain Modeling
(conventional Cartesian reference system)
Status – Week 277 Victor Moya.
The Graphics Pipeline CS2150 Anthony Jones. Introduction What is this lecture about? – The graphics pipeline as a whole – With examples from the video.
Game Engine Design ITCS 4010/5010 Spring 2006 Kalpathi Subramanian Department of Computer Science UNC Charlotte.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
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.
CSE 381 – Advanced Game Programming Basic 3D Graphics
Week 2 - Wednesday CS361.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
1 Introduction to Computer Graphics SEN Introduction to OpenGL Graphics Applications.
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.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
1 Angel: Interactive Computer Graphics5E © Addison- Wesley 2009 Image Formation Fundamental imaging notions Fundamental imaging notions Physical basis.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
1 Perception and VR MONT 104S, Fall 2008 Lecture 20 Computer Graphics and VR.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Chapter 1 Graphics Systems and Models Models and Architectures.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
GLSL Review Monday, Nov OpenGL pipeline Command Stream Vertex Processing Geometry processing Rasterization Fragment processing Fragment Ops/Blending.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Applications and Rendering pipeline
Graphics Pipeline Bringing it all together. Implementation The goal of computer graphics is to take the data out of computer memory and put it up on the.
- Introduction - Graphics Pipeline
Ying Zhu Georgia State University
Week 2 - Friday CS361.
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.
Graphics Processing Unit
Deferred Lighting.
Lecture 18 Fasih ur Rehman
3D Graphics Rendering PPT By Ricardo Veguilla.
CS451Real-time Rendering Pipeline
Understanding Theory and application of 3D
Real-time Computer Graphics Overview
Models and Architectures
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
Advanced Graphics Algorithms Ying Zhu Georgia State University
Understanding Theory and application of 3D
Graphics Processing Unit
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.
Introduction to Computer Graphics with WebGL
The Graphics Pipeline Lecture 5 Mon, Sep 3, 2007.
Chapter V Vertex Processing
Lecture 13 Clipping & Scan Conversion
Introduction to Computer Graphics
Models and Architectures
Models and Architectures
Computer Graphics Introduction to Shaders
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
OpenGL-Rendering Pipeline
Presentation transcript:

The Graphics Rendering Pipeline CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University The Graphics Rendering Pipeline

What is graphics rendering pipeline? A process of generating a 2D image, given a virtual camera (eye), 3D objects, light sources, textures, etc. The 2D image is a frame of animation. A process for converting coordinates from its local 3D coordinate system to the final 2D window coordinate system. Both OpenGL and Direct3D implement part of the rendering pipeline.

Graphics Rendering Pipeline Stages The rendering pipeline is normally divided into 3 conceptual stages Application Geometry Rasterizer The output of one stage is the input of next stage, thus the name “pipeline” Each stage also contains sub- stages Application Geometry Rasterizer

OpenGL pipeline (overview)

OpenGL pipeline (overview) Application Rasterizer Geometry

OpenGL pipeline (detailed view)

Why use pipeline architecture? It’s more efficient Think automobile assembly line Explore data parallelism Data parallelism vs. instruction parallelism The pipeline architecture is the fundamental architecture for both 3D graphics software and hardware Think GPU as an image assembly line

Application Stage Overview 3D objects are created using modeling tools 3D Studio Max, Maya, etc. 3D objects are positioned in 3D world and organized in a scene graph 3D objects can be moved by transformation Transformation are performed on vertices using different types of transformation matrices 3D transformations are specified in this stage but carried out in the Geometry stage

Application Stage Overview Other tasks in the application stage: Handling user input level of details occlusion culling The result: the 3D geometry objects to be fed to the next stage Points, lines, polygons, etc. 3D geometry objects are eventually broken down to vertices, represented by (x, y, z) coordinates

Geometry Stage Overview Responsible for the majority of per-polygon or per vertex operations Contains several sub-stages Model Transformation View Transformation (often combined with model transformation) Lighting Projection Clipping Screen Mapping

Coordinate Systems Multiple Cartesian coordinate systems are used at different stages of the pipeline 3D Model Coordinates (model space) Each model is in its own coordinate system with origin in some point on the model 3D World Coordinates (world space) Unified world coordinate system, with only one origin 3D Eye Coordinates (view space) Camera (eye) is the origin and look straight down Z-axis 2D Screen Coordinates (screen space) 3D coordinates are converted to 2D screen coordinates for display

3D Graphics Pipeline Data Flow Objects in the 3D scene are sequentially transformed through different coordinate systems when proceeding the 3D pipeline.

Model Transform Transform the vertices and normals of 3D objects from model space to world space After the transform, all objects exit in the same coordinate system The camera (eye) has a location in world coordinate system and a direction

View Transform The camera and all the 3D objects are transformed with the view transform The purpose is to place the camera at the origin and make it look in the direction of Z-axis. Often combined with model transform – model-view transform

Projection Transform the view volume into a unit cube with its extreme points at (-1, -1, -1) and (1, 1, 1). The purpose is to simplify clipping. Two projection methods: Orthographic projection When realism is not a concern. Perspective projection When realism counts.

Lighting A lighting equation is used to calculate a color at each vertex of the 3D object that is to be affected by lighting. The lighting equations often have little to do with how lights behave in the real world. Per-vertex lighting vs. per-pixel lighting

Shading Each 3D object surface is divided into many triangles. The colors at the vertices of a triangle are interpolated over the triangle. Three shading methods: Flat shading (operate per triangle) Gouraud Shading (operate per vertex) Phong Shading (operate per pixel) Programmable Shaders

Clipping Only the primitives wholly or partially inside the view volume need to be passed on to the rasterizer stage. Primitives (line or polygon) that are partially inside the view volume require clipping.

Screen Mapping Primitives that survive the clipping are passed on to screen mapping stage. X and Y coordinates of each primitive are transformed to screen coordinates. Z coordinates are not affected and are kept for depth buffer checking.

Rasterizer Stage Overview In this stage, all primitives are converted into pixels in the window. The goal of this stage is to assign correct colors to the pixels. It contains one or all of the following sub-stages: Texture mapping Fog Translucency Test Depth buffering Antialiasing

Rasterization

Texturing Texture mapping means “attaching” an image onto a 3D object. Textures are important to bringing realism to a 3D scene. Provide surface details Add scene depth Advance texture mapping Multi-texturing Bump mapping Environment mapping Pixel shader

Fog An optional stage but help set the mood Also helps give a scene an addition sense of depth of field Added realism E.g. allow distant objects to gracefully "fade away" rather than just pop out of the scene

Translucency Tests Also called Alpha Test Used to create effects such as glass, water, see-through views in CAD modeling, and translucent or transparent materials.

Depth Buffering Also called Z-buffer algorithm Used for visibility check When multiple primitives are rendered to a certain pixel, the color of the pixel is the color of the primitive that is closest to the point of view of camera. The only exception is when primitives are transparent. This algorithm allows the primitives to be rendered in any order.

Anti-aliasing Alias effect: the jagged or stair-stepped look of diagonal or curved lines in computer graphics. Anti-aliasing algorithms sample, or examine and evaluate, the colors and shades of pixels adjoining curved or diagonal lines to present smoother looking line.

Display Finally, the final 2D image is generated and rendered to frame buffer and displayed on screen. Double-buffer technique may be used to reduce flashing Front buffer for display, back buffer for rendering next frame. A long trip down the graphics rendering pipeline If application runs at 60 frame/second, this whole process will repeat every 17 ms.

Summary The 3D graphics pipeline is the underlying tool for graphics rendering. Three major stages: Application Geometry Rasterizer