CS5500 Computer Graphics April 17, 2006 CS5500 Computer Graphics

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS SOFTWARE.
Advertisements

Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
3D Graphics Rendering and Terrain Modeling
CS-378: Game Technology Lecture #9: More Mapping Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
The Programmable Graphics Hardware Pipeline Doug James Asst. Professor CS & Robotics.
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics April 19, 2007.
GPU Simulator Victor Moya. Summary Rendering pipeline for 3D graphics. Rendering pipeline for 3D graphics. Graphic Processors. Graphic Processors. GPU.
Game Engine Design ITCS 4010/5010 Spring 2006 Kalpathi Subramanian Department of Computer Science UNC Charlotte.
The programmable pipeline Lecture 10 Slide Courtesy to Dr. Suresh Venkatasubramanian.
3D computer graphic Basis for real-time rendering and GPU architecture 劉哲宇,Liou Jhe-Yu.
Programmable Shading May 21, Motivation Recall what are done in the graphics pipeline: –Front End: Transformations (Modeling, Viewing, and Projection)
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Under the Hood: 3D Pipeline. Motherboard & Chipset PCI Express x16.
REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume.
Under the Hood: 3D Pipeline. Motherboard & Chipset PCI Express x16.
GPU Programming Robert Hero Quick Overview (The Old Way) Graphics cards process Triangles Graphics cards process Triangles Quads.
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.
Geometric Objects and Transformations. Coordinate systems rial.html.
Advanced Computer Graphics March 06, Grading Programming assignments Paper study and reports (flipped classroom) Final project No written exams.
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Sebastian Enrique Columbia University Real-Time Rendering Using CUReT BRDF Materials with Zernike Polynomials CS Topics.
Chris Kerkhoff Matthew Sullivan 10/16/2009.  Shaders are simple programs that describe the traits of either a vertex or a pixel.  Shaders replace a.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
1 Dr. Scott Schaefer Programmable Shaders. 2/30 Graphics Cards Performance Nvidia Geforce 6800 GTX 1  6.4 billion pixels/sec Nvidia Geforce 7900 GTX.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Stream Processing Main References: “Comparing Reyes and OpenGL on a Stream Architecture”, 2002 “Polygon Rendering on a Stream Architecture”, 2000 Department.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
GRAPHICS PIPELINE & SHADERS SET09115 Intro to Graphics Programming.
CS662 Computer Graphics Game Technologies Jim X. Chen, Ph.D. Computer Science Department George Mason University.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
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.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
David Luebke 1 1/25/2016 Programmable Graphics Hardware.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 Programming Massively Parallel Processors Lecture.
From Turing Machine to Global Illumination Chun-Fa Chang National Taiwan Normal University.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
GLSL I.  Fixed vs. Programmable  HW fixed function pipeline ▪ Faster ▪ Limited  New programmable hardware ▪ Many effects become possible. ▪ Global.
An Introduction to the Cg Shading Language Marco Leon Brandeis University Computer Science Department.
GLSL Review Monday, Nov OpenGL pipeline Command Stream Vertex Processing Geometry processing Rasterization Fragment processing Fragment Ops/Blending.
How to use a Pixel Shader CMT3317. Pixel shaders There is NO requirement to use a pixel shader for the coursework though you can if you want to You should.
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
Chapter 1 An overview on Computer Graphics
Programmable Shaders Dr. Scott Schaefer.
Programmable Pipelines
A Crash Course on Programmable Graphics Hardware
Chapter 1 An overview on Computer Graphics
Graphics Processing Unit
3D Graphics Rendering PPT By Ricardo Veguilla.
Chapter 6 GPU, Shaders, and Shading Languages
From Turing Machine to Global Illumination
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Real-time Computer Graphics Overview
Chapter 14 Shading Models.
Introduction to Computer Graphics with WebGL
Graphics Processing Unit
ICG 2018 Fall Homework1 Guidance
Programmable Shading May 15, 2006.
Ray Tracing on Programmable Graphics Hardware
Computer Graphics Introduction to Shaders
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
CS5500 Computer Graphics April 24, 2006.
OpenGL-Rendering Pipeline
CS 480/680 Fall 2011 Dr. Frederick C Harris, Jr. Computer Graphics
CIS 6930: Chip Multiprocessor: GPU Architecture and Programming
Presentation transcript:

CS5500 Computer Graphics April 17, 2006 CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Today’s Topic Overview of 3D pipelines. Scope of the course project. CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Many Views of Graphics Pipeline Simple “Front-End/Back-End” view. Textbook version in [Foley/van Dam]. David Kirk’s (nVidia CTO) version presented in EG Hardware Workshop 1998: (slide 05) http://www.merl.com/hwws98/presentations/kirk/index.htm CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Simplified View The Data Flow: 3D Polygons (+Colors, Lights, Normals, Texture Coordinates…etc.) 2D Polygons 2D Pixels (I.e., Output Images) Transform (& Lighting) Rasterization CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

A Quick Review By default, graphic pipeline will do the following: Take as input various per-vertex quantities (color, light source, eye point, texture coordinates, etc.) Calculate a final color for each vertex using a basic lighting model (OpenGL uses Phong lighting) For each pixel, linearly interpolate the three surrounding vertex colors to shade the pixel (OpenGL uses Gouraud shading) Write the pixel color value to the frame buffer CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

The View of DirectX 8 (Note: This figure is overly crowded, so don’t worry about it if you can’t understand it at the first look. The next slide might give you a better idea of the pipeline.) CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

And a really scary one… CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

The next 6 slides are borrowed from UNC-CH COMP236 Course Slides (Spring 2003) http://www.unc.edu/courses/2003spring/comp/236/001/handouts.html CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Implementing a 3D Pipeline A case study -- MESA. Mesa 3D Graphics Library A famous open source effort to implement OpenGL. Pure software implementation, meaning all computation is done on CPU, not on GPU. Used to call MesaGL, but SGI complained about it due to customer support issues. CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Two Different Approaches Consider how you expect the users to create the contents to your 3D pipeline. Method 1: by providing 3D model files (e.g., in the OBJ or VRML format) Our approach since it’s easier to implement. Method 2: by writing an OpenGL program. MESA’s approach. CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

3D Models 3D Renderer MESA OpenGL commands OpenGLDrivers CPU & GPU CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Input File Format Very similar to an OpenGL “command stream,” for example: Rotate angle, x, y, z Translate x, y, z Color R, G, B, A Begin Triangle Vertex x, y, z ... End CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Major Components Data structures for: Transformation Lighting Points, vectors, matrices Lines and polygons (or just triangles) Frame buffer and textures Transformation Lighting Clipping & Projection Rasterization & texture mapping CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Don’t Reinvent the Wheel A few useful 3D vector and matrix code: http://www.cs.nthu.edu.tw/~chunfa/code/algebra3.zip Or borrow one from your friends, or find a good one from the Internet. CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Graphics Hardware Why do we study the graphics pipeline in such depth? Why not teaching more Cg or shader programming? You’ve got to know some hardware! They are all built upon the traditional 3D pipeline. CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Why Need Hardware All parts of graphics pipeline can be done in software. But very slowly. Example: mesaGL For some applications, speed is beauty Games Walkthrough Visualization CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Evolutions of Graphics Hardware Gouraud-shaded polygons. Then came antialiasing. Then came texture mapping. Now comes programmable shading. CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

John Poulton’s Chart CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Fixed vs. Programmable Starting in 1999 some graphics cards used the standard lighting model and Gouraud shading to draw polygon fragments entirely in hardware Implementing the pipeline in hardware made processing polygons much faster, but the developer could not modify the pipeline (hence “fixed function pipeline”) New programmable hardware allows programmers to write vertex and pixel programs to change the pipeline 1. Fixed function pipeline: some control through use of special flags, extensions, 2. Use pixel shader do Phong shading CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

OpenGL Fixed Function Vertex Vertex (object) Vertex (clip) Transform [MVP],[MV],[MV]-T Normal Vertex (eye) Color SecondaryColor Front&Back Color [0,1] Lighting Front&Back SecondaryColor [0,1] Texgen Texture Matrixn TexCoordn TexCoordn EdgeFlag EdgeFlag CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

GL2 Vertex Processor Uniform Vertex Shader Temporaries Vertex (object) Vertex (clip) Uniform Normal Vertex (eye) Color SecondaryColor Vertex Shader Front&Back Color Front&Back SecondaryColor TexCoordn Temporaries TexCoordn EdgeFlag EdgeFlag CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Programmable Shaders A concept made popular by Pixar’s RenderMan. First appeared in hardware: UNC PixelFlow See SIGGRAPH papers by Molnar 1995 and Olano 1997. Made affordable by nVidia GeForce3 and XBox. CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Faked Global Illumination Shadow, Reflection, BRDF…etc. In theory, real global illumination is not possible in current graphics pipeline: Conceptually a loop of individual polygons. No interaction between polygons. Can this be changed by multi-pass rendering? CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Future Trends Vertex/Pixel shaders will become more and more flexible Less limits on program size Able to execute branch instructions Capable of moving complicated effects (like those in Renderman) onto the GPU More and more operations executed per-pixel rather than per-vertex As people get more creative with the hardware we will see more techniques for non-photorealistic rendering CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Future Trends Real-time fur CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

Future Trends More realistic skin Subsurface scattering approximation CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006

References Brown U. CS123 programmable hardware lecture developer.nvidia.com www.cgshaders.org CS5500 Computer Graphics © Chun-Fa Chang, Spring 2006