Computer Graphics CS 543 Lecture 12 (Part 2) CS 543 Lecture 12 - - PowerPoint PPT Presentation

computer graphics cs 543 lecture 12 part 2 cs 543 lecture
SMART_READER_LITE
LIVE PREVIEW

Computer Graphics CS 543 Lecture 12 (Part 2) CS 543 Lecture 12 - - PowerPoint PPT Presentation

Computer Graphics CS 543 Lecture 12 (Part 2) CS 543 Lecture 12 (Part 2) Advances in Graphics Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Accelerating Ray Tracing A l ti R T i To accelerate ray


slide-1
SLIDE 1

Computer Graphics CS 543 – Lecture 12 (Part 2) CS 543 Lecture 12 (Part 2) Advances in Graphics Prof Emmanuel Agu

Computer Science Dept. Worcester Polytechnic Institute (WPI)

slide-2
SLIDE 2

A l ti R T i Accelerating Ray Tracing

 To accelerate ray tracing place grid over scene  To accelerate ray tracing, place grid over scene  Test cells recursively  Acceleration structures: BSP trees, kd trees, etc

slide-3
SLIDE 3

M ki R T i L k R l Making Ray Tracing Look Real

 Antialiasing

Cast multiple rays from eye through same point in each pixel through same point in each pixel

 Motion blur

Each of these rays intersects the scene at a different time

Reconstruction filter controls shutter speed, length

 Depth of Field

Simulate camera better

 f‐stop  focus

 Other effects (soft shadow, glossy, etc)

slide-4
SLIDE 4

R l Ti R T i Real Time Ray Tracing

 Multi pass rendering: Ray tracer using 4 shaders  Multi‐pass rendering: Ray tracer using 4 shaders

slide-5
SLIDE 5

R l Ti R T i Real Time Ray Tracing

 Nvidia Optix ray tracer

p y

 Needs high end Nvidia graphics card  SDK is available on their website  http://developer.nvidia.com/object/optix‐home.html

slide-6
SLIDE 6

Ph t i l Photon mapping examples

Caustics

Images: courtesy of Stanford rendering contest

Caustics

slide-7
SLIDE 7

Ph t M i Photon Mapping

Simulates the transport of individual photons (Jensen ’95‐’96) Simulates the transport of individual photons (Jensen 95 96)

Two pass algorithm

Pass 1 ‐ Photon tracing

Emit photons from lights p g

Trace photons through scene.

Store photons in kd‐tree (photon maps)

Pass 2 ‐ Rendering

Render scene using information in the photon maps to estimate:

Reflected radiance at surfaces

Scattered radiance from volumes and translucent materials.

Good for effects ray tracing can’t:

Caustics

Light through volumes (smoke, water, marble, clouds)

slide-8
SLIDE 8

Photon Tracing Photon Tracing

Photon scattering

 Emitted photons are probabilistically scattered through the

scene and are eventually absorbed. Ph t hit f b fl t d f t d b b d

 Photon hits surface: can be reflected, refracted, or absorbed  Photon hits volume: can be scattered or absorbed.

Illustration is based on figures from Jensen[1].

slide-9
SLIDE 9

Photon mapping: Pass 2 ‐ Rendering pp g g

 Indirect diffuse lighting: Use ray tracing  Indirect diffuse lighting: Use ray tracing  Indirect light, volumes, caustics: estimate illumination using

photon map

slide-10
SLIDE 10

Photon Tracing

Pass 2 ‐ Rendering

Imagine ray tracing a hitpoint x

Information from photon maps used to estimate radiance from x

Radius of circle required to encountering N photons gives radiance

Radius of circle required to encountering N photons gives radiance estimate at x

x

slide-11
SLIDE 11

R l Ti Ph t i Real Time Photon mapping

 Similar idea to real time ray tracing  Similar idea to real‐time ray tracing.  Photon mapping as multi‐pass shading

slide-12
SLIDE 12

R l Ti R d i T h i Real‐Time Rendering Techniques

Applications: game engines, virtual reality, simulators, etc

Algorithms must run at min 30 FPS

Polygonal techniques: OpenGL, DirectX

Shaders: Pixel/vertex shading / g

Level of detail management (simplification, tesselation)

Texturing to improve RT performance

Point based rendering

Point‐based rendering

BRDF factorization, SH lighting

Image‐based rendering: Spectrum of IBR techniques

slide-13
SLIDE 13

Billboards

IBR: pre‐render geometry onto images/textures

Rendering at runtime involves simple lookups, fast

Similar technique used for crowds in NFL madden football q

Real time cloud rendering, Mark J. Harris

slide-14
SLIDE 14

Billboard Clouds

 Billboard Clouds, Decoret, Durand et al [SIGGRAPH‘03]  Render complex mesh onto cloud of billboards

Billb d i li d t diff t i i t

 Billboard inclined at different viewpoints

slide-15
SLIDE 15

Imposters

  • Similar to billboards

N I t No Impostors

Impostors Made Easy – William Damon, Intel

With Impostors

slide-16
SLIDE 16

Depth Sprite aka Nailboard

 Give depth to image !  RGBΔ ‐ Δ (transparency) is depth parameter

S t Δ b d d th f t l t

 Set Δ based on depth of actual geometry  Accuracy varies with no. of bits to represent Δ 2 bit 4 bit 8 bit 2 bits 4 bits 8 bits

http://zeus.gup.uni-linz.ac.at/~ gs/research/nailbord/

slide-17
SLIDE 17

IBR P d C IBR: Pros and Cons

 Pros  Pros

 Simplifies computation of complex scenes  Rendering cost independent of scene complexity  Rendering cost independent of scene complexity

 Cons

S i

 Static scene geometry  Fixed lighting

Fi d l k f l k t i t

 Fixed look‐from or look‐at point

slide-18
SLIDE 18

R t T d i G Recent Trends in Games

1.

Real Time LoD Management

2

Capture rendering data

2.

Capture rendering data

3.

Pre‐computation to speed up run‐time S S GI t h i

4.

Screen Space GI techniques

5.

Real Time Global Illumination

6.

Hardware‐accelerated physics engines

slide-19
SLIDE 19

Trend 1: Real‐Time LoD Management

Geometry shader unit can generate new vertices primitives from original set

Geometry shader unit, can generate new vertices, primitives from original set

Tesselation and simplification algorithms on GPU

Real‐time change LoD in game

slide-20
SLIDE 20

T d 2 C t R d i D t Trend 2: Capture Rendering Data

 Old way: use equations to model:  Old way: use equations to model:

Object geometry, lighting (Phong), animation, etc

 New way: capture parameters from real world  Example: motion in most sports games (e.g. NBA 2K live) is

captured.

H ? P t t

How? Put sensors on actors

Actors play game

Capture their motion into database

Player motion plays back database entries Courtesy: Madden NFL game

slide-21
SLIDE 21

Geometry Capture: 3D Scanning

 Capturing geometry trend: Precise 3D scanning (Stanford,

IBM,etc) produce very large polygonal models

Model: David d Si 2 billi Largest dataset Size: 2 billion polygons, 7000 color images!! Courtesy: Stanford Michael Angelo 3D scanning project

slide-22
SLIDE 22

H i t d ? How is capture done?

 Capture:

p

Digitize real object geometry and materials

Use cameras, computer vision techniques to capture rendering data d i d b l

Put data in database, many people can re‐use

 Question: What is computer vision?

slide-23
SLIDE 23

Exactly What Can We Capture?

1 A ( l tt i t t l 1 A ( l tt i t t l t )

  • 1. Appearance (volume, scattering, transparency, translucency,
  • 1. Appearance (volume, scattering, transparency, translucency, etc

etc)

  • 2. Geometry
  • 2. Geometry
  • 3. Reflectance & Illumination
  • 3. Reflectance & Illumination
  • 4. Motion
  • 4. Motion
slide-24
SLIDE 24

Li ht P b C t i li ht Light Probes: Capturing light

Amazing graphics, High Dynamic Range?

slide-25
SLIDE 25

Capture Material Reflectance (BRDF) Capture Material Reflectance (BRDF)

 BRDF: How different materials reflect light  Examples: cloth, wood, velvet, etc  Time varying?: how reflectance changes over time

TV l th i i i f it t t

 TV examples: weathering, ripening fruits, rust, etc

slide-26
SLIDE 26

Wh ff t t t ? Why effort to capture?

 Big question: If we can capture real world

parameters, is this really computer graphics?

slide-27
SLIDE 27

Trend 3: Pre‐computation to speed up i run‐time

  • bject 2
  • bject 3
  • bject 4
  • bject 1

 Pre‐compute lighting

Lights objects mostly static U GPU i li h i l i

Use GPU to pre‐compute approximate lighting solutions

Speeds up run‐time

 Pre‐computed Occlusion  Pre‐computed Radiance Transfer (reflections)

 Use spherical harmonics

slide-28
SLIDE 28

Pre Pre‐computed Global Illumination computed Global Illumination

slide-29
SLIDE 29

P C t O l i Pre‐Compute Occlusion

 Ambient occlusion  Ambient occlusion

 Each rendered point receives hemisphere of light  Estimate fraction of hemisphere above point that is blocked  Estimate fraction of hemisphere above point that is blocked  Render ambient term as fraction of occlusion

Courtesy Nvidia SDK 10

slide-30
SLIDE 30

P t d R di T f Precomputed Radiance Transfer

Factorize and precompute light and material as Spherical Harmonics

Factorize and precompute light and material as Spherical Harmonics

Run‐time: Light reflection is dot product at run time (Fast) Sponza Atrium: Courtesy Marko Dabrovic

slide-31
SLIDE 31

Trend 4: Real time Global Ill i ti Illumination

 What’s the difference?  What s the difference?

 Pre‐compute means lookup at run‐time  Approximate representations (e g Spherical Harmonics)  Approximate representations (e.g Spherical Harmonics)  Fast, but not always accurate

 Real Time Global Illumination: state‐of‐the art

Real Time Global Illumination: state of the art

 Calculate complex GI equations at run‐time  Use GPU, hardware

slide-32
SLIDE 32

R l Ti Gl b l Ill i ti Real Time Global Illumination

Ray tracing enables global illumination

Ray tracing enables global illumination

Instead of billboards, imposters, images use physically‐based appearance models

Very cool effects:

Shadows S ado s

Ambient Occlusion

Reflections

Transmittance

Refractions

Caustics

Global subsurface scattering

What does it look like?

What does it look like?

slide-33
SLIDE 33

Real Real‐time Lighting time Lighting in Games in Games

slide-34
SLIDE 34

Sky and Atmosphere: Sky and Atmosphere: P i M d l P i M d l Previous Model Previous Model

Used in Halo 3

Used in Halo 3

[PSS99][PreethamHoffman03]

Offline pre‐computed sky texture

Real‐time scattering

Real time scattering

Single scattering only

Viewable from ground

  • nly
slide-35
SLIDE 35

Current Model Current Model

[BrunetonNeyret2008]

[BrunetonNeyret2008]

Single and multiple scattering

Pre‐computation on the GPU

Viewable from space

Viewable from space

Light shafts

slide-36
SLIDE 36

Different Atmospheres Different Atmospheres p

slide-37
SLIDE 37

Time Of Day Time Of Day

slide-38
SLIDE 38

Sh d Shadows

Courtesy Hellgate:London, flagship studios inc Variance shadow mapping Courtesy Nvidia SDK 10

slide-39
SLIDE 39

C ti d R f ti Caustics and Refraction

Courtesy Chris Wyman, Univ Iowa

slide-40
SLIDE 40

CryEngine 3:GI with Light Propagation y g g p g Volumes

 State of the art game engine  State‐of‐the‐art game engine  Real‐time simulation of massive,indirect physically‐based lighting

slide-41
SLIDE 41

C t k C i i E i S h t Crytek Crisis Engine Screenshots

slide-42
SLIDE 42

Demo

 Light Propagation Volumes Demo  Light Propagation Volumes Demo

slide-43
SLIDE 43

LPV Id LPV Idea

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

slide-44
SLIDE 44

Trend 5: Screen‐Space GI Techniques

 Toy Story 3: Screen space Ambient Occlusion  Toy Story 3: Screen space Ambient Occlusion

slide-45
SLIDE 45

SSAO i T t 3 SSAO in Toy story 3

 Viewing just the ambient term of shading  Viewing just the ambient term of shading

slide-46
SLIDE 46

T d 6 Ph i E i GPU Trend 6: Physics Engines on GPU

 Nvidia Physx engine

y g

 SDK: developer.nvidia.com/object/physx_features.html

 Complex rigid body object physics system  Advanced character control  Ray‐cast and articulated vehicle dynamics  Multi‐threaded/Multi‐platform/PPU Enabled  Volumetric fluid creation and simulation  Cloth and clothing authoring and playback  Soft Bodies  Volumetric Force Field Simulation  Vegetation

slide-47
SLIDE 47

R f References

Pat Hanrahan, CS 348B, Spring 2005 class slides Pat Hanrahan, CS 348B, Spring 2005 class slides

Yung‐Yu Chuang, Image Synthesis, class slides, National Taiwan University, Fall 2005

Kutulakos K CSC 2530H: Visual Modeling course slides

Kutulakos K, CSC 2530H: Visual Modeling, course slides

UIUC CS 319, Advanced Computer Graphics Course slides

http://www.siggraph.org/education/materials/HyperGraph/raytrace/rtrace0.ht m

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