Computer Graphics Hardware Pipeline Visual Imaging in the Electronic Age Prof. Donald P. Greenberg October 23, 2014 Lecture 16
Moore s Law Chip density doubles every 18 months. Processing Power (P) in 15 years: P = P today 2 15years 15 18 months = P t 2 1.5 = P t 2 10 = 1000P t
Ivan Sutherland - 1963
Program of Computer Graphics, Cornell University General Electric - 1967
Program of Computer Graphics, Cornell University DPG - 1967
Cornell in Perspective Film Program of Computer Graphics, Cornell University
Direct Model Illumination Camera Perspective Raster Operations Image Storage Display
Model Environment Geometry & topology Material properties Color, reflectance, textures (Cost, strength, thermal properties) Lighting Geometry & position Intensity, spectral distribution Direction, spatial distribution Model Camera Perspective Raster Operations Image Storage Display
Camera Model Viewer Position Viewer direction Field of view Wide angle Telephoto Depth of focus Near Far Camera Perspective Raster Operations Image Storage Display
Eye Coordinate System Z Y e X e Z e X Y
Perspective Model Transformation Perspective transformation Matrix multiplication Clipping Culling Camera Perspective Raster Operations Image Storage Display
Hidden Line Algorithm
Hidden Line Algorithm
Mapping a Viewing Frustum to a Standard Viewbox Z e Y e Y s Z s X s X e z e = D Frustum of vision z e = F 1 1 1 Screen coordinate system Donald P. Greenberg - Cornell Program of Computer Graphics
Perspective Projections in Computer Graphics Eye coordinate system Plan or elevation view
Object Space (One point perspective)
Image Space (One point perspective)
Raster Model Operations Conversion from polygons to pixels Hidden surface removal (z-buffer) Incremental shading Camera Perspective Raster Operations Image Storage Display
Visible Surface Algorithm Z-Buffer Algorithm 1. Set depth(x, y) = 1.0 intensity(x,y) = background color 2. For each polygon, find all pixels covered 3. Calculate z(x,y) of each pixel covered by the polygon 4. If z(x,y) < depth(x,y), polygon is closer set depth(x,y) = z(x,y) change color
Depth Buffer Algorithm
Depth Buffer Algorithm
Phong Reflection Model
Image Storage Model Typical frame buffer 1280 x 1024 pixels 3 channels (red, green, blue) 1 byte/channel Total memory 3 3/4 megabytes - single buffer 7 1/2 megabytes - double buffer Camera Perspective Raster Operations Image Storage Display
Model Display Digital to analog conversion 1920 x 1080 resolution 60 frames per second Total data rate 2 million pixels x 3 bytes/pixel x 60 frames/second = 360 megabytes/second Camera Perspective Raster Operations Image Storage Display
Refresh vs. Update Rate The refresh rate is the number of times per second the entire image is drawn The update rate is the number of times per second the image is changed
Direct Model Illumination User Input Camera Perspective Raster Operations Image Storage Display
Why a Pipeline? A pipeline allows multiple processes to occur in parallel. Example: An automobile assembly line. Assume 4 stations, each taking 2 minutes to do its task. It takes 8 minutes to make a car, but the rate at which cars are made is one every 2 minutes.
Automobile takes 8 minutes to make, but the assembly line makes a car every two minutes. Build frame Add engine Add windows Paint body 2 minutes 2 minutes 2 minutes 2 minutes Stage 1 Stage 2 Stage 3 Stage 4 A B C D E A B C D A B C A B 0 2 4 6 8 10 Time (minutes) Donald P. Greenberg - Cornell Program of Computer Graphics
Graphics Hardware circa 1970 Model P-xform Clipping Lighting Rasterize System Memory (16 scanlines) Film Recorder CPU System used to generate Phong goblet
Graphics Hardware circa 1975 Model P-xform Clipping Lighting Rasterize Frame Buffer Display CPU Graphics Hardware Cost of Memory Prohibitive 512x480x8 bit frame buffer cost $80,000! No z-buffer (at 24 or 32 bits/pixel, it requires even more memory than FB) Only single frame buffer all work done in CPU until frame buffer(slow!)
Graphics Hardware circa 1986 Model Lighting P-xform Clipping Rasterize Z-Buffer Frame Frame Buffer Buffer Display CPU Graphics Hardware Added Z-Buffer Added Double Frame Buffer Rasterization performed in hardware
Graphics Hardware 1999 Model Texture Frame Lighting P-xform Rasterize Z-Buffer Clipping Mapping Frame Buffer Display Buffer CPU Graphics Hardware Addition of texture mapping units With texturing, high resolution detail is possible with relatively simple geometry
Multitexturing Hardware architectures now support accessing more than one texture in a single pass
Multipass Example: Light Maps Two separate textures, one for the material s composition, one for the lighting X = J.L.Mitchell, M. Tatro, and I. Bullard
Castle s Geometry Agata & Andrzej Wojaczek, Advanced Graphics Applications Inc.
Reflection Example - Castle Agata & Andrzej Wojaczek, Advanced Graphics Applications Inc.
Putting it all together Gloss textures on pear, shadows on curved surfaces, reflections dropping off with depth from table. J.L. Mitchell & E. Hart, ATI Technologies, Inc.
Graphics Pipeline - 1980 s M L P S D V M Model L Lighting P Perspective/Clipping S Scan Conversion/Z-buffer D Display Storage V Video Donald P. Greenberg - Cornell Program of Computer Graphics
Graphics Pipeline - 2000 + M L P T S D V M Model L Lighting P Perspective/Clipping T Texturing S Scan Conversion/Z-buffer D Display Storage V Video Donald P. Greenberg - Cornell Program of Computer Graphics
Graphics Hardware 2003 Model Vertex Buffer Lighting Vertex Operations P-xform Clipping Texture Mapping CPU Rasterize Z-Buffer Pixel Operations Frame Frame Buffer Buffer Display Early GPU s performed lighting and clipping operations on locally stored model
Graphics Hardware 2003+ Model Graphics Processing Unit GPU Texture Mapping CPU Rasterize Z-Buffer Pixel Operations Frame Frame Buffer Buffer Display
Graphics Hardware 2009 CPU Model Graphics Processing Unit GPU Rasterize Z-Buffer CPU Model CPU Model Graphics Processing Unit GPU Graphics Processing Unit GPU Rasterize Rasterize Z-Buffer Z-Buffer Frame Buffer Display CPU Model Graphics Processing Unit GPU Rasterize Z-Buffer
Interesting Trends Moore s Law is approximately 1.7x increase in speed a year; graphics accelerators are improving at 2x to 4x a year Reducing energy (watts) is more important than increasing processing speed (flops)
Faster than Moore s Law 10 9 One-pixel polygons (~10M polygons @ 30Hz) nvidia G70 10 9 Peak Performance ( 's/sec) 10 8 10 7 10 6 10 5 UNC Pxpl4 HP CRX 10 4 Flat shading SGI Iris HP VRX SGI GT Slope ~2.4x/year (Moore's Law ~ 1.7x/year) UNC Pxpl5 SGI SkyWriter SGI VGX HP TVRX Stellar GS1000 Gouraud shading SGI RE1 E&S F300 86 88 90 92 94 96 98 00 Year SGI RE2 Antialiasing UNC/HP PixelFlow SGI IR ATI SGI Radeon 256 R-Monster E&S Nvidia TNT GeForce Division 3DLabs Harmony SGI Pxpl6 Glint Cobalt Accel/VSIS Voodoo Megatek E&S Freedom Textures Division VPX PC Graphics 10 8 10 7 10 6 10 5 10 4 Graph courtesy of Professor John Poulton (from Eric Haines)
Millions of transistors GeForce Transistor Count and Semiconductor Process 450 400 350 300 250 200 150 100 50 0 Riva ZX Riva TNT2 GeForce2 GTS GeForce3 GeForce4 Ti 4600 GeForce FX GeForce 6800 Ultra Process (µm) 0.35 0.22 0.18 0.18 0.15 0.13 0.13 0.11 GeForce 7800 GTX
NVIDIA s GK110 Kepler Chip 2012 7.1 billion transistors 2880 processor cores 28 nanometers PCI Express Gen3
Intel Integrated Graphics 2013
AMD Integrated Graphics 2014 Kaveri 28 nm 47% GPU 47% GPU
Nvidia s Maxwell Architecture
Nvidia s Maxwell Architecture Maxwell was designed in modular fashion so that components can be used in mobile applications
End...