Real-Time Rendering & Game Technology CS 446/651 David Luebke

advertisement
Real-Time Rendering &
Game Technology
CS 446/651
David Luebke
David Luebke
1
7/27/2016
Demo Time
● We will open classes with 5 minute ‘demo time’
■ Students pick something (e.g., a game) to demo
○ Main focus should be real-time graphics, not game play
○ In-engine cut scenes, graphics-related game play okay
■ Students responsible for setting up demo platform!
○ Need to get here 10 minutes early to work with A/V guy
○ I can provide PC (NV, ATI) with warning
■ Demo duty rotates each class
○ Send around a sign-up sheet
David Luebke
2
7/27/2016
Comparison:
SGI InfiniteReality (1998) vs. NVIDIA GeForce4 (2002)
Metric
SGI IR
Triangles/demosec
Pixels/demosec
Texture memory
Bump mapping
Programmable
vertex engine?
Programmable
pixel engine?
Form factor
Cost
13 million
NVIDIA NV25
64 MB
Nope
75 million
1.2 billion
128 MB
No sweat
You kidding?
Yup
Get real
Mini-fridge
$100,000
Yup
videocassette
$400
The real news!!!
David Luebke
3
7/27/2016
Comparison:
SGI InfiniteReality (1998) vs. NVIDIA GeForce 7800 GTX (2005)
Metric
SGI IR
Triangles/demosec
Pixels/demosec
Texture memory
Bump mapping
Programmable
vertex engine?
Programmable
pixel engine?
Form factor
Cost
13 million
NVIDIA G70
64 MB
Nope
860 million
6.9 billion
128 MB
Trivial
You kidding?
Yup
Get real
Mini-fridge
$100,000
Yup
videocassette
$500
The real news!!!
David Luebke
4
7/27/2016
David Luebke
5
7/27/2016
GPU history
NVIDIA historicals
Product
Process
Trans
Fill
Rate
MHz MF/sec
Geom
Rate
Mtri/sec
GFLOPS
(MUL)
May-99
GeForce 256
0.22
23M
120
480
15
Dec-99
GeForce 2 GTS
0.18
25M
166
664
21
Sep-00
GeForce 3
0.18
57M
200
800
25
Sep-01
GeForce 4 Ti
0.15
63M
300
1200
75
Aug-02
GeForce
FX5800
0.13
121M
500
2000
187
8
Jan-03
GeForce
FX5900
0.13
130M
475
1900
178
20
Dec-03
GeForce 6800
0.13
222M
400
6400
600
53
Tables & data courtesy Ian Buck, Stanford, and Nick Triantos, NVIDIA
David Luebke
6
7/27/2016
GPU history
NVIDIA historicals
Process
Trans
MHz
GFLOPS
(MUL)
Aug-02
GeForce
FX5800
0.13
121M
500
8
Jan-03
GeForce
FX5900
0.13
130M
475
20
Dec-03
GeForce 6800
0.13
222M
400
53
Product
translating transistors into performance
■ 1.8x increase of transistors
■ 20% decrease in clock rate
■ 6.6x GFLOP speedup
David Luebke
7
7/27/2016
Graphics Performance:
GPU vs CPU Growth Trends
Graph courtesy John Owens
Data courtesy Nick Triantos, NVIDIA
David Luebke
8
7/27/2016
Summary
● These are interesting times for real-time rendering:
■ Commodity graphics cards are fantastically capable
■ The rate of ongoing improvement is dizzying
○ Raw performance
○ Feature set
■ New algorithms, long-offline algorithms becoming possible
■ Hard to keep up, even for “experts”
● What’s pushing the technology curve?
David Luebke
9
7/27/2016
Video Games
● Undoubtedly the driving force behind this
revolution
■ In 2002 the video game industry surpassed the film
industry (sort of)
■ Commodity parts: Workstations vs PCs vs
consoles (vs cell phones?)
David Luebke
10
7/27/2016
The Course: General Topics
● This class will study real-time rendering, with
a particular focus on the hardware and
algorithms underlying 3D game engines
■ Generally PC hardware rather than consoles
■ Bit more emphasis on NVIDIA hardware
■ Generally OpenGL (DX more apropos, but…)
● We won’t study much or any:
■ Gameplay, storylines, AI, game art, production
process, artist tools, network layers, OO game
design, audio, physics, animation
David Luebke
11
7/27/2016
The Course: Workload
● This is a project course, all grades from
programming assignments:
■ One or two completely individual assignments
○ Game design, “Building blocks” of a game engine
■ Big team project: a 3D video game/graphical experience
■ Individual assignments in context of team project
○ Add features to your team’s game engine
● Think graduate-level course
■ A game engine is a big program
■ Will likely be more work (but also more rewarding) than
any course you’ve ever had
David Luebke
12
7/27/2016
The Course: Syllabus
● The web page is the syllabus…
David Luebke
13
7/27/2016
Review: The Graphics Pipeline
● The next lecture will go over the traditional
graphics pipeline
● The big picture:
Application
David Luebke
Geometry
14
Rasterizer
7/27/2016
Programmable Pipelines
● Recent hardware offers the option of replacing
portions of the pipeline with user-programmed
stages
■ Vertex shader: replaces fixed-function transform
and lighting
■ Pixel shader: replaces texturing stages
David Luebke
15
7/27/2016
Programmable Pipelines
● The amount of programmability is increasing
by leaps and bounds
■ Vertex shaders: more instructions, variable
indexing, fully MIMD branching, subroutines
■ Pixel shaders: still SIMD, but with more
instructions, unlimited texture accesses, pixel kill
■ Coming soon: unified shaders, memory scatter
● The data precision is also improving
■ IEEE floating point throughout the pipeline!
■ Various versions
David Luebke
16
7/27/2016
To think about:
● What are some possible bottlenecks in system performance of
a graphics/game engine?
● Does it make any difference to sort your geometry front-to-
back or back-to-front when using a depth-buffer?
● Will your textured polygons render faster if MIP-mapping is
enabled or disabled?
● Does the order that you traverse polygons (i.e., issue vertices
using glVertex() or something like it) matter?
David Luebke
17
7/27/2016
Download