graphics hardware and graphics in video games

55
Graphics Hardware and Graphics Hardware and Graphics in Video Graphics in Video Games Games COMP136: Introduction to Computer Graphics

Upload: winona

Post on 05-Jan-2016

63 views

Category:

Documents


0 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Graphics Hardware and Graphics in Video Games

Graphics Hardware andGraphics Hardware andGraphics in Video GamesGraphics in Video Games

COMP136: Introduction toComputer Graphics

Page 2: Graphics Hardware and Graphics in Video Games

OutlineOutline

History of PC graphics cardsHistory of PC graphics cards Current PC graphics cardsCurrent PC graphics cards Where things are goingWhere things are going Games, how do they do that? Games, how do they do that?

Page 3: Graphics Hardware and Graphics in Video Games

Graphics PipelineGraphics Pipeline

Transform Lighting Clipping

Perspective Divide Viewport Transform

Shading and Texturing

Rasterization Image

Page 4: Graphics Hardware and Graphics in Video Games

2005 – Madden 062005 – Madden 06 2004 – Doom 32004 – Doom 3 2003 – SimCity 42003 – SimCity 4 2002 – Madden 20032002 – Madden 2003 2000 – Madden 20012000 – Madden 2001 1999 – Quake 31999 – Quake 3 1998 – Soul Calibur 1998 – Soul Calibur 1997 – Wing Commander 1997 – Wing Commander

ProphecyProphecy 1996 – Quake1996 – Quake 1995 – Wing Commander 1995 – Wing Commander

IVIV 1994 – Doom 21994 – Doom 2 1993 – Doom1993 – Doom 1992 – Wolfenstein 3D1992 – Wolfenstein 3D 1991 – Wing Commander 1991 – Wing Commander

22 1985 – Super Mario Bros1985 – Super Mario Bros 1983 – Star Wars arcade1983 – Star Wars arcade 1981 – Pac man1981 – Pac man 1978 – Space Invaders1978 – Space Invaders 1972 – Pong 1972 – Pong

Page 5: Graphics Hardware and Graphics in Video Games

‘‘7272

Page 6: Graphics Hardware and Graphics in Video Games

‘‘7272

Page 7: Graphics Hardware and Graphics in Video Games

‘‘8181

Page 8: Graphics Hardware and Graphics in Video Games

‘‘8383

Page 9: Graphics Hardware and Graphics in Video Games

‘‘8855

Page 10: Graphics Hardware and Graphics in Video Games

‘‘9090

Page 11: Graphics Hardware and Graphics in Video Games

‘‘9292

Page 12: Graphics Hardware and Graphics in Video Games

‘‘9393

Page 13: Graphics Hardware and Graphics in Video Games

‘‘9494

Page 14: Graphics Hardware and Graphics in Video Games

‘‘9595

Page 15: Graphics Hardware and Graphics in Video Games

‘‘9696

Page 16: Graphics Hardware and Graphics in Video Games

‘‘9797

Page 17: Graphics Hardware and Graphics in Video Games

‘‘9898

Page 18: Graphics Hardware and Graphics in Video Games

‘‘9999

Page 19: Graphics Hardware and Graphics in Video Games

‘‘0000

Page 20: Graphics Hardware and Graphics in Video Games

‘‘0202

Page 21: Graphics Hardware and Graphics in Video Games

‘‘0303

Page 22: Graphics Hardware and Graphics in Video Games

‘‘0404

Page 23: Graphics Hardware and Graphics in Video Games

‘‘0505

Page 24: Graphics Hardware and Graphics in Video Games

20062006

Page 25: Graphics Hardware and Graphics in Video Games

‘‘0808

Page 26: Graphics Hardware and Graphics in Video Games

2005 – Madden 062005 – Madden 06 2004 – Doom 32004 – Doom 3 2003 – SimCity 42003 – SimCity 4 2002 – Madden 20032002 – Madden 2003 2000 – Madden 20012000 – Madden 2001 1999 – Quake 31999 – Quake 3 1998 – Soul Calibur 1998 – Soul Calibur 1997 – Wing Commander 1997 – Wing Commander

ProphecyProphecy 1996 – Quake1996 – Quake 1995 – Wing Commander 1995 – Wing Commander

IVIV 1994 – Doom 21994 – Doom 2 1993 – Doom1993 – Doom 1992 – Wolfenstein 3D1992 – Wolfenstein 3D 1991 – Wing Commander 1991 – Wing Commander

22 1985 – Super Mario Bros1985 – Super Mario Bros 1983 – Star Wars arcade1983 – Star Wars arcade 1981 – Pac man1981 – Pac man 1978 – Space Invaders1978 – Space Invaders 1972 – Pong 1972 – Pong

Page 27: Graphics Hardware and Graphics in Video Games

Graphics Graphics HistoryHistory

Utah – Texturing, Utah – Texturing, BSP trees, lightingBSP trees, lighting

Mainly non-Mainly non-interactive graphics interactive graphics

Interactive graphicsInteractive graphics– Initially done all in Initially done all in

softwaresoftware– Dedicated hardwareDedicated hardware

Framebuffer – 1 MB, Framebuffer – 1 MB, $500k$500k

SGISGI Pixel Planes – 1982 Pixel Planes – 1982

(4 x 64 processors)(4 x 64 processors) Pixel Planes 4 – 512 x Pixel Planes 4 – 512 x

512 processors512 processors Pixel Planes 5 – Pixel Planes 5 –

1280x1024 1280x1024 processorsprocessors

Page 28: Graphics Hardware and Graphics in Video Games

PC HistoryPC History Software RendererSoftware Renderer Graphics APIsGraphics APIs

– DOSDOS– Windows - DirectXWindows - DirectX

v1-3 were pretty unused for 3Dv1-3 were pretty unused for 3D v5 - people started using it for 3Dv5 - people started using it for 3D currently v10currently v10

– OpenGLOpenGL Currently 2.0Currently 2.0 UNIX workstationUNIX workstation Migrated to the PC, mainly because of Migrated to the PC, mainly because of

QuakeGLQuakeGL

Page 29: Graphics Hardware and Graphics in Video Games

DirectX vs. OpenGLDirectX vs. OpenGL

Evolution timeEvolution time MultiplatformMultiplatform

Page 30: Graphics Hardware and Graphics in Video Games

PC Graphics HistoryPC Graphics History till 1994 (ATI, Matrox, etc)till 1994 (ATI, Matrox, etc)

– accelerated 2Daccelerated 2D– some 3D acceleration, though non-standardsome 3D acceleration, though non-standard

19951995– 3dfx released the Voodoo chip (~1 million triangles per 3dfx released the Voodoo chip (~1 million triangles per

second).second).– Graphics “co-processor” (you still had a 2d card)Graphics “co-processor” (you still had a 2d card)– Hardware accelerated Hardware accelerated rasterizationrasterization– Textures, shading, etc.Textures, shading, etc.– Increased texture filtering, resolution, textures, modelsIncreased texture filtering, resolution, textures, models– GLIDE APIGLIDE API– 16 bit color and framebuffer (how does this affect things?)16 bit color and framebuffer (how does this affect things?)

Page 31: Graphics Hardware and Graphics in Video Games

PC Graphics HistoryPC Graphics History 19961996

– Quake was releasedQuake was released– Brought OpenGL to the Brought OpenGL to the

masses! (How?)masses! (How?)– nVidia, ATI, 3DLabs, 3dfx, nVidia, ATI, 3DLabs, 3dfx,

IntelIntel– How could each one of How could each one of

these companies these companies compete?compete?

– DirectX 5.0!DirectX 5.0!

Page 32: Graphics Hardware and Graphics in Video Games

PC Graphics HistoryPC Graphics History 19981998

– 3dfx releases Voodoo 2 (3 million 3dfx releases Voodoo 2 (3 million triangles per second)triangles per second)

– Two texture units. Why? Single Two texture units. Why? Single pass multitextures!pass multitextures!

– Three major APIs: OpenGL, DirectX, Three major APIs: OpenGL, DirectX, GLIDEGLIDE

– All games now are hardware All games now are hardware acceleratedaccelerated

– Quake2 releasedQuake2 released– nVidia releases TNT, ATI focuses on nVidia releases TNT, ATI focuses on

retail, Matroxretail, Matrox– single card solutionssingle card solutions– 32 bit color for everything (except 32 bit color for everything (except

voodoo2)voodoo2)

Page 33: Graphics Hardware and Graphics in Video Games

PC Graphics HistoryPC Graphics History 1999:1999:

– 3dfx Voodoo 3000 (they 3dfx Voodoo 3000 (they buy out STB)buy out STB)

– nVidia TNT2 (300 Mpixels, nVidia TNT2 (300 Mpixels, 5? Million triangles)5? Million triangles)

– Matrox G400 (bump Matrox G400 (bump mapping, etc).mapping, etc).

– How do you add features How do you add features to a standard?to a standard?

– Late 1999: Quake 3 is Late 1999: Quake 3 is releasedreleased

– APIs standardize: OpenGL APIs standardize: OpenGL and DirectXand DirectX

– Pros and Cons of eachPros and Cons of each

Page 34: Graphics Hardware and Graphics in Video Games

20002000 2000:2000:

– nVidia releases GeForce and GeForce2 cards nVidia releases GeForce and GeForce2 cards (25 million triangles per second)(25 million triangles per second)

4 texture units4 texture units Hardware Transform, Clipping, and Lighting!Hardware Transform, Clipping, and Lighting! Per vertex shadingPer vertex shading

– ATI releases RadeonATI releases Radeon adds additional features like bump mapping, vertex adds additional features like bump mapping, vertex

skinning, 3 texture unitsskinning, 3 texture units

– 3dfx releases Voodoo 55003dfx releases Voodoo 5500 Full Screen AntialiasingFull Screen Antialiasing

Page 35: Graphics Hardware and Graphics in Video Games

20062006 Remaining Companies:Remaining Companies:

– ATIATI– nVidianVidia

Scientific Viz (High-end)Scientific Viz (High-end)– 3dLabs3dLabs– SGISGI

Consumer Market: Consumer Market: – Billion $$$ industryBillion $$$ industry– $500-600 top end card$500-600 top end card

ATI Radeon X1900 XTATI Radeon X1900 XT GeForce 7900 GTX, SLIGeForce 7900 GTX, SLI

– $200-300 highest $200-300 highest marginsmargins

– DirectX 9.0DirectX 9.0

Page 36: Graphics Hardware and Graphics in Video Games

What happens on a What happens on a glVertex?glVertex?

Your code calls a glVertexYour code calls a glVertex opengl32.dll (vendor specific) takes the command and opengl32.dll (vendor specific) takes the command and

communicates it to the card via the graphics buscommunicates it to the card via the graphics bus Is there hardware T,L, and C?Is there hardware T,L, and C?

– Yes: the vertex data is sent across the bus and the Yes: the vertex data is sent across the bus and the hardware pushes the vertex through the graphics pipelinehardware pushes the vertex through the graphics pipeline

– No: the CPU transforms, lights, and clips the data and No: the CPU transforms, lights, and clips the data and THEN sends it to the card via the bus.THEN sends it to the card via the bus.

Why only now do we have hardware T&L&C?Why only now do we have hardware T&L&C? What are the bottlenecks for an application?What are the bottlenecks for an application?

– How can we alleviate some of the bandwidth concerns?How can we alleviate some of the bandwidth concerns?– Store vertices ON the card (or in compiled form)Store vertices ON the card (or in compiled form)– Different data types like triangle fans and stripsDifferent data types like triangle fans and strips

Page 37: Graphics Hardware and Graphics in Video Games

Vertex and Pixel ShadersVertex and Pixel Shaders What is limitation What is limitation

how the quality of how the quality of CG?CG?– SpeedSpeed

What’s the fix?What’s the fix?– RealismRealism

What do we mean by What do we mean by that?that?

Solution?Solution? What if we could What if we could

change the functions change the functions being executed in the being executed in the graphics pipeline?graphics pipeline?

Page 38: Graphics Hardware and Graphics in Video Games

Graphics PipelineGraphics Pipeline

Transform Lighting Clipping

Perspective Divide Viewport Transform

Shading and Texturing

Rasterization Image

Page 39: Graphics Hardware and Graphics in Video Games

Vertex ShaderVertex Shader– A graphics processing A graphics processing

function, which function, which manipulates vertex data manipulates vertex data values on an X (length), values on an X (length), Y (height) and Z (depth) Y (height) and Z (depth) 3D plane through 3D plane through mathematical mathematical operations on an object.operations on an object.

Written in assembly-Written in assembly-like language (ex. Cg)like language (ex. Cg)

Page 40: Graphics Hardware and Graphics in Video Games

Pixel ShadersPixel Shaders

Pixel ShadersPixel Shaders– Programs written Programs written

for pixel for pixel calculationcalculation

Page 41: Graphics Hardware and Graphics in Video Games

Vertex and Pixel ShadersVertex and Pixel Shaders

Page 42: Graphics Hardware and Graphics in Video Games

Things to considerThings to consider

Memory bandwidth and speedMemory bandwidth and speed Framebuffer memory typeFramebuffer memory type AGP, PCI-Express busAGP, PCI-Express bus mobile 3d graphicsmobile 3d graphics Loading models and texturesLoading models and textures Designing “family” of cardsDesigning “family” of cards How can we get more out of a current design?How can we get more out of a current design?

– Increase memory speedIncrease memory speed– Increase core clock speedIncrease core clock speed– Driver improvementsDriver improvements

Page 43: Graphics Hardware and Graphics in Video Games

Looking ForwardLooking Forward Per Pixel ShadersPer Pixel Shaders Full screen antialiasingFull screen antialiasing Parallel ProcessingParallel Processing Animation assistanceAnimation assistance

– SkinningSkinning– InterpolationInterpolation

Curved SurfacesCurved Surfaces Collision DetectionCollision Detection Level of DetailLevel of Detail CullingCulling More texture unitsMore texture units Higher bit depths! Why would we want this?Higher bit depths! Why would we want this?

Page 44: Graphics Hardware and Graphics in Video Games

BenchmarksBenchmarks Triangles Triangles Fill RateFill Rate Refresh rateRefresh rate color depthscolor depths buffer bit depthbuffer bit depth

– framebufferframebuffer– z bufferz buffer– stencil bufferstencil buffer

Resolution capabilitiesResolution capabilities– How does high refresh rate and resolutions affect How does high refresh rate and resolutions affect

the chip and memory design?the chip and memory design?

Page 45: Graphics Hardware and Graphics in Video Games

Cycle of developmentCycle of development

Single PurposeSingle Purpose

Multi-purposeMulti-purpose

Page 46: Graphics Hardware and Graphics in Video Games

Tricks! How would you do:Tricks! How would you do:

Shafts of lightShafts of light BloodBlood SparksSparks Many lightsMany lights TreesTrees ForestForest FlashlightsFlashlights Movie projectorsMovie projectors Bullet holesBullet holes Rain/SnowRain/Snow

Motion BlurMotion Blur Depth of focusDepth of focus Cue Ball reflectionsCue Ball reflections Airplane damageAirplane damage Lens flaresLens flares WaterWater SkinSkin ClothesClothes FacesFaces ShadowsShadows

Page 47: Graphics Hardware and Graphics in Video Games

Let’s Examine Some Let’s Examine Some GamesGames

Page 48: Graphics Hardware and Graphics in Video Games
Page 49: Graphics Hardware and Graphics in Video Games
Page 50: Graphics Hardware and Graphics in Video Games
Page 51: Graphics Hardware and Graphics in Video Games
Page 52: Graphics Hardware and Graphics in Video Games
Page 53: Graphics Hardware and Graphics in Video Games
Page 54: Graphics Hardware and Graphics in Video Games

ShadowShadowss

Page 55: Graphics Hardware and Graphics in Video Games

MirrorMirrorss