graphics hardware and graphics in video games

Post on 05-Jan-2016

63 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

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

Graphics Hardware andGraphics Hardware andGraphics in Video GamesGraphics in Video Games

COMP136: Introduction toComputer Graphics

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?

Graphics PipelineGraphics Pipeline

Transform Lighting Clipping

Perspective Divide Viewport Transform

Shading and Texturing

Rasterization Image

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

‘‘7272

‘‘7272

‘‘8181

‘‘8383

‘‘8855

‘‘9090

‘‘9292

‘‘9393

‘‘9494

‘‘9595

‘‘9696

‘‘9797

‘‘9898

‘‘9999

‘‘0000

‘‘0202

‘‘0303

‘‘0404

‘‘0505

20062006

‘‘0808

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

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

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

DirectX vs. OpenGLDirectX vs. OpenGL

Evolution timeEvolution time MultiplatformMultiplatform

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?)

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!

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)

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

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

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

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

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?

Graphics PipelineGraphics Pipeline

Transform Lighting Clipping

Perspective Divide Viewport Transform

Shading and Texturing

Rasterization Image

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)

Pixel ShadersPixel Shaders

Pixel ShadersPixel Shaders– Programs written Programs written

for pixel for pixel calculationcalculation

Vertex and Pixel ShadersVertex and Pixel Shaders

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

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?

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?

Cycle of developmentCycle of development

Single PurposeSingle Purpose

Multi-purposeMulti-purpose

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

Let’s Examine Some Let’s Examine Some GamesGames

ShadowShadowss

MirrorMirrorss

top related