IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU...

51
IMGD 4000: Hot Topics in Graphics Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI)

Transcript of IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU...

Page 1: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

IMGD 4000: Hot Topics in Graphics

Prof Emmanuel Agu

Computer Science Dept.Worcester Polytechnic Institute (WPI)

Page 2: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Graphics Processing Unit (GPU)

Entire graphics library (OpenGL, DirectX) in hardware => FAST!! Speed: GPUs renders graphics faster CPUs Programmable: in last 8 years (Shaders)

Located either on PC motherboard (Intel) or Separate graphics card (Nvidia or ATI)

On PC motherboard On separate PCI express card

Page 3: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

GPU Evolution

High throughput computation GeForce GTX 280: 933 GFLOP/s

High bandwidth memory GeForce GTX 280: 140 GB/s 

High availability to all 180+ million shader‐capable GPUs in the wild

Numbers doubling every 6 months (Moore’s law cubed)

1995 2000 2005 2010

RIVA 1283M xtors

GeForce® 25623M xtors

GeForce FX125M xtors

GeForce 8800681M xtors

GeForce 3 60M xtors

“Fermi”3B xtors

Slide from Stanford course 193G 2010

Page 4: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

DesignTradeoff makes GPU Fast Graphics has many calculations, few conditional (if/else, loops) Arithmetic Logic Unit (ALU) is part of GPU for calculations Tradeoff: Assign

More transistors for ALU: faster rendering calculations, math  Fewer transistors for control, branches, loops (graphics rarely uses them) ALU chip area:   CPU (7%)   vs   GPU ( > 50%)

Result: GPU runs graphics much faster than CPU

Page 5: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

GFLOP/sec growth

GPU!!

CPU!!

Page 6: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

GPU Memory Bandwidth

Graph from: CUDA Programming Guide 4.2

GPU!!

CPU!!

Page 7: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

146X

Medical Imaging

U of Utah

36X

Molecular Dynamics

U of Illinois, Urbana

18X

Video Transcoding

Elemental Tech

50X

Matlab Computing

AccelerEyes

100X

AstrophysicsRIKEN

149X

Financial simulation

Oxford

47X

Linear AlgebraUniversidad

Jaime

20X

3D UltrasoundTechniscan

130X

Quantum Chemistry

U of Illinois, Urbana

30X

Gene Sequencing

U of Maryland

Aside: GPGPU: GPUs to speedup  Non‐Graphics Applications

Page 8: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Trend 1: Mobile GPUs GPUs on Phones, tablets now powerful Mobile GPUs support OpenGL ES OpenGL ES: Subset of OpenGL, shader‐based

Page 9: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Trend 1: Mobile GPUs

Many game titles now ship only smartphones only, no consoles

Page 10: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Unity: Cross Platform Shader Support

Artist specifies high‐level shader on the Material ex: "Bumped Specular", "Tree Leaves", "Unlit“

Run‐time picks specific platform shaderdepending on supported feature set

Page 11: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Testing Mobile Apps: Challenging

Animoca, android mobile developer has to test each app on over 400 different smartphones and tablets Screens Aspect ratios Form factors Input controls OS versions CPU/GPU OpenGL/DirectX 

versions……. etc

Page 12: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Recap: What is Graphics?

Trend 2: Capture light, materials, geometry, for rendering data from real world

1. Light

2. Geometry3. Materials

4. Light/Material Interaction(Lighting model)

Next: capturing light

Page 13: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Photograph silver ball in environment High dynamic range

Capturing Light: Light Probes

Page 14: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Using Light Probes Example

Page 15: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Trend 2: Capture rendering data

1. Light

2. Geometry3. Materials

4. Light/Material Interaction(Lighting model)

Next: capturing geometry

Page 16: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Trend 2: Capture Geometry Digitize real object geometry, billions of faces High precision databases of models: shared by many Better realism than packages such as maya Important for sports games?

Mesh

Page 17: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Trend 2: Capture rendering data

1. Light

2. Geometry3. Materials

4. Light/Material Interaction(Lighting model)

Next: capturing materials

Page 18: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Measuring BRDFs: Gonioreflectometer

Murray‐Coleman and Smith Gonioreflectometer. ( Copied and Modified from [Ward92] ).

Page 19: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Measured BRDF Samples BRDF: How materials reflect light Examples: cloth, wood, velvet, etc Mitsubishi Electric Research Lab (MERL)http://www.merl.com/brdf/ Wojciech Matusik MIT PhD Thesis 100 Samples

Page 20: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Capture Time‐Varying BRDFs

Time varying?: surface reflectance changes over time Examples: weathering, ripening fruits, rust, etc

Page 21: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Exactly What Can We Capture?1. Appearance (volume, scattering, transparency, translucency, etc)

2. Geometry

3. Reflectance & Illumination4. Motion

Page 22: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Trend 3: Real‐Time LoD Geometry Management

Previously: Pre‐generate mesh versions offline Geometry shader unit added to GPU in DirectX 10 (2007)

generate new vertices, primitives from mesh

Mesh simplification/tesselation on GPU = Real time LoD Tesselation: Demo

tesselation

Simplification

Far = Less detailed mesh

Near = More detailed mesh

Page 23: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Textures in Games

Most games loaded with textures Computationally cheap way to look pretty

Page 24: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Trend 5: New Directions in Texture Synthesis

Texture = picture or algorithmically rendered Internet (e.g. Flickr) has billions of pictures Example‐Based Texture Synthesis: New images from samples Input: small (photographic) textures Output: produce arbitrarily large texture Approach: discover pattern, extrapolate algorithm, math

input

output

SynthesisAlgorithm

Page 25: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Pixel‐based Algorithm

Random Oriented

Regular Semi-regular

Page 26: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Texture Synthesis on Surfaces

Sample

Page 27: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Multi‐Level Texture Synthesis

Coarse1,000 vertices

Medium4,000 vertices

Fine16,000 vertices

Sample:

Page 28: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Example‐Based Model SynthesisPaul Merrell, I3D 2007

Input: Polygon modelsApproach: Partition models into pieces Place pieces in new arrangement subject to constraints

Partitions RandomPlacement

ConsistentPlacement

Page 29: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Example‐Based Model Synthesis

Page 30: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Example‐Based Model Synthesis

Input

Result

Page 31: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Texture Replacement

Lots of new work around algorithmically altering images (found on web?) 

Goal: Alter, remove or replace part of a image algorithmically

Page 32: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Artifact Removal

Page 33: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Detail Hallucination

Alcatraz

Page 34: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Scene Completion using Millions of Photographs

Page 35: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Seam Carving

Page 36: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Local Illumination Consider 1 bounce only OpenGL does this Looks fake E.g. Torque 3D game engine 

Page 37: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Global Illumination Global illumination: model interaction of light from all surfaces in scene (track multiple bounces)

translucent surface

shadow

multiple reflection

Page 38: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Trend 5: New Real time Global Illumination Algos

Dynamic scenes: Need real‐time GI, on‐the‐fly Real Time Global Illumination: state‐of‐the art

Calculate GI equations  on GPU at run‐time

Improves: Shadows Ambient Occlusion Reflections Transmittance Refractions Caustics

What does RT‐GI look like?

Page 39: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Real‐time Lightingin Games

Page 40: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Better Sky Model

[BrunetonNeyret2008] Single and multiple scattering Light shafts Participating media!!

Page 41: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Different Atmospheres

Page 42: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Time Of Day

Page 43: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Better Shadows

Courtesy Hellgate:London, flagship studios incVariance shadow mapping

Courtesy Nvidia SDK 10

Page 44: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Better Caustics and Refraction

Courtesy Chris Wyman, Univ Iowa

Page 45: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Sub‐Surface Scattering

Marble

Human Skin

Crysis skin demo

Page 46: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Sub‐Surface Scattering

Page 47: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Light Propagation Volumes (LPV) CryEngine: new physically‐based game engine by CryTek LPV: new real time Global Illumination algorithm in CryEngine Runs faster than ray tracing on GPU

Page 48: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Crytek Crisis Engine Screenshots

Page 49: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

Demo

Light Propagation Volumes Demo

Page 50: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

LPV IdeaMain idea: represent light propagation as Virtual Point Lights (VPL) Re‐project VPL into adjacent cells

Page 51: IMGD 4000: Hot in - WPI › ~rich › courses › imgd4000-b12 › lectures › graphics.pdfGPU Evolution High throughput computation GeForce GTX 280: 933 GFLOP/s High bandwidth memory

References Akenine Moller et al, Real‐Time Rendering, 3rd edition Advances in Real‐Time Rendering in 3D graphics and 

games, SIGGRAPH course notes 2009 Anton Kaplanyan and Carsten Dachbacher, Cascaded light 

propagation volumes for real‐time indirect illumination, in Proc. Si3D 2010 

Hao Chen and Natalya Tatarchuk, Lighting Research at Bungie, Advances in Real‐Time Rendering in 3D Graphics and Games SIGGRAPH 2009 Course notes

Advances in Real‐Time Rendering in 3D Graphics and Games, SIGGRAPH 2010 Course Notes

CS 543/563 slides