600 likes | 899 Views
COMP136: Introduction to Computer Graphics. Graphics Hardware and Graphics in Video Games. Outline. History of PC graphics cards Current PC graphics cards Where things are going Games, how do they do that?. Graphics Pipeline. Transform. Lighting. Clipping. Perspective Divide.
E N D
COMP136: Introduction toComputer Graphics Graphics Hardware andGraphics in Video Games
Outline • History of PC graphics cards • Current PC graphics cards • Where things are going • Games, how do they do that?
Graphics Pipeline Transform Lighting Clipping Perspective Divide Viewport Transform Rasterization Image Shading and Texturing
2005 – Madden 06 • 2004 – Doom 3 • 2003 – SimCity 4 • 2002 – Madden 2003 • 2000 – Madden 2001 • 1999 – Quake 3 • 1998 – Soul Calibur • 1997 – Wing Commander Prophecy • 1996 – Quake • 1995 – Wing Commander IV • 1994 – Doom 2 • 1993 – Doom • 1992 – Wolfenstein 3D • 1991 – Wing Commander 2 • 1985 – Super Mario Bros • 1983 – Star Wars arcade • 1981 – Pac man • 1978 – Space Invaders • 1972 – Pong
2005 – Madden 06 • 2004 – Doom 3 • 2003 – SimCity 4 • 2002 – Madden 2003 • 2000 – Madden 2001 • 1999 – Quake 3 • 1998 – Soul Calibur • 1997 – Wing Commander Prophecy • 1996 – Quake • 1995 – Wing Commander IV • 1994 – Doom 2 • 1993 – Doom • 1992 – Wolfenstein 3D • 1991 – Wing Commander 2 • 1985 – Super Mario Bros • 1983 – Star Wars arcade • 1981 – Pac man • 1978 – Space Invaders • 1972 – Pong
Graphics History • Utah – Texturing, BSP trees, lighting • Mainly non-interactive graphics • Interactive graphics • Initially done all in software • Dedicated hardware • Framebuffer – 1 MB, $500k • SGI • Pixel Planes – 1982 (4 x 64 processors) • Pixel Planes 4 – 512 x 512 processors • Pixel Planes 5 – 1280x1024 processors
PC History • Software Renderer • Graphics APIs • DOS • Windows - DirectX • v1-3 were pretty unused for 3D • v5 - people started using it for 3D • currently v10 • OpenGL • Currently 2.0 • UNIX workstation • Migrated to the PC, mainly because of QuakeGL
DirectX vs. OpenGL • Evolution time • Multiplatform
PC Graphics History • till 1994 (ATI, Matrox, etc) • accelerated 2D • some 3D acceleration, though non-standard • 1995 • 3dfx released the Voodoo chip (~1 million triangles per second). • Graphics “co-processor” (you still had a 2d card) • Hardware accelerated rasterization • Textures, shading, etc. • Increased texture filtering, resolution, textures, models • GLIDE API • 16 bit color and framebuffer (how does this affect things?)
PC Graphics History • 1996 • Quake was released • Brought OpenGL to the masses! (How?) • nVidia, ATI, 3DLabs, 3dfx, Intel • How could each one of these companies compete? • DirectX 5.0!
PC Graphics History • 1998 • 3dfx releases Voodoo 2 (3 million triangles per second) • Two texture units. Why? Single pass multitextures! • Three major APIs: OpenGL, DirectX, GLIDE • All games now are hardware accelerated • Quake2 released • nVidia releases TNT, ATI focuses on retail, Matrox • single card solutions • 32 bit color for everything (except voodoo2)
PC Graphics History • 1999: • 3dfx Voodoo 3000 (they buy out STB) • nVidia TNT2 (300 Mpixels, 5? Million triangles) • Matrox G400 (bump mapping, etc). • How do you add features to a standard? • Late 1999: Quake 3 is released • APIs standardize: OpenGL and DirectX • Pros and Cons of each
2000 • 2000: • nVidia releases GeForce and GeForce2 cards (25 million triangles per second) • 4 texture units • Hardware Transform, Clipping, and Lighting! • Per vertex shading • ATI releases Radeon • adds additional features like bump mapping, vertex skinning, 3 texture units • 3dfx releases Voodoo 5500 • Full Screen Antialiasing
2006 • Remaining Companies: • ATI • nVidia • Scientific Viz (High-end) • 3dLabs • SGI • Consumer Market: • Billion $$$ industry • $500-600 top end card • ATI Radeon X1900 XT • GeForce 7900 GTX, SLI • $200-300 highest margins • DirectX 9.0
What happens on a glVertex? • Your code calls a glVertex • opengl32.dll (vendor specific) takes the command and communicates it to the card via the graphics bus • Is there hardware T,L, and C? • Yes: the vertex data is sent across the bus and the hardware pushes the vertex through the graphics pipeline • No: the CPU transforms, lights, and clips the data and THEN sends it to the card via the bus. • Why only now do we have hardware T&L&C? • What are the bottlenecks for an application? • How can we alleviate some of the bandwidth concerns? • Store vertices ON the card (or in compiled form) • Different data types like triangle fans and strips
Vertex and Pixel Shaders • What is limitation how the quality of CG? • Speed • What’s the fix? • Realism • What do we mean by that? • Solution? • What if we could change the functions being executed in the graphics pipeline?
Graphics Pipeline Transform Lighting Clipping Perspective Divide Viewport Transform Rasterization Image Shading and Texturing
Vertex Shader • A graphics processing function, which manipulates vertex data values on an X (length), Y (height) and Z (depth) 3D plane through mathematical operations on an object. • Written in assembly-like language (ex. Cg)
Pixel Shaders • Pixel Shaders • Programs written for pixel calculation
Things to consider • Memory bandwidth and speed • Framebuffer memory type • AGP, PCI-Express bus • mobile 3d graphics • Loading models and textures • Designing “family” of cards • How can we get more out of a current design? • Increase memory speed • Increase core clock speed • Driver improvements
Looking Forward • Per Pixel Shaders • Full screen antialiasing • Parallel Processing • Animation assistance • Skinning • Interpolation • Curved Surfaces • Collision Detection • Level of Detail • Culling • More texture units • Higher bit depths! Why would we want this?
Benchmarks • Triangles • Fill Rate • Refresh rate • color depths • buffer bit depth • framebuffer • z buffer • stencil buffer • Resolution capabilities • How does high refresh rate and resolutions affect the chip and memory design?
Cycle of development • Single Purpose • Multi-purpose
Shafts of light Blood Sparks Many lights Trees Forest Flashlights Movie projectors Bullet holes Rain/Snow Motion Blur Depth of focus Cue Ball reflections Airplane damage Lens flares Water Skin Clothes Faces Shadows Tricks! How would you do: