40

A Fast Deferred Shading Algorithm for Approximate Indirect Illumination

Embed Size (px)

DESCRIPTION

Siggraph 2010 – "Split Second Screen Space". A Fast Deferred Shading Algorithm for Approximate Indirect Illumination. Olivier Hoël Cyril Soler. Frank Rochet. Motivations. Direct lighting only. With indirect lighting. Greatly enhance realism and immersion But expensive to compute. - PowerPoint PPT Presentation

Citation preview

Page 1: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination
Page 2: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

A Fast Deferred Shading Algorithm for Approximate

Indirect Illumination

Siggraph 2010 – "Split Second Screen Space"

Olivier HoëlCyril Soler

Frank Rochet

Page 3: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

3

Motivations• Greatly enhance realism and immersion• But expensive to compute

Direct lighting only With indirect lighting

Page 4: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

Video games constraints• 30fps => at most ~10ms for indirect lighting• Dynamic environment• Independent of geometry / lighting complexity• Any kind of illumination source• Artifact free result

4

Page 5: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

Video games constraints30fps => at most ~10ms for indirect lightingDynamic environmentIndependent of geometry / lighting complexityAny kind of illumination sourceArtifact free resultDeferred shading pipeline

5

Page 6: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

6

Deferred shading• Two steps– Render Geometry Buffer (G-Buffer)– Compute lighting as post-process

• Pros / Cons– Hidden objects => approximate

» Included solution to remove artifact – Screen Space => FAST

Page 7: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

Outline

I. Related WorkII. Screen Space samplingIII. PipelineIV. Results

7

Page 8: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

8

Related Work

Imperfect Shadow Map [RGK*08] Multi-resolution splatting of Indirect Illumination [NW09]

Hierarchical Image-space Radiosity [NSW09]Cascaded Light Propagation Volumes [KD10]

Page 9: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

9

Comparison[RGK*08] [NW09] [NSW09] [KD10] Ours

No pre-computation Constant cost w.r.t lighting

complexity

Any kind of light source

Multiple bounces

Visibility

Page 10: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

Outline

I. Related Work

II. Screen Space samplingIII. PipelineIV. Results

10

Page 11: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

11

Screen Space Indirect Illumination

• Monte-Carlo integration on G-Buffer• Hierarchical computation using mipmaps– Arbitrary distance– Save performances

Page 12: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

12

G-Buffer’

G-Buffer

Input structure

+Direct Lighting

Mipmaps Set Pixel Shader

Dept

hN

orm

alAl

bedo

Page 13: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

13

Sampling scheme (1/3)• Random screen space samples on disk• Efficient use of texture cache• Constant radius over all set of mipmap

Mipmap set at level l

Mipmap set at level l+1dd/2

Page 14: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

14

Sampling scheme (2/3)

Page 15: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

15

Importance sampling (3/3)

Level 0

Level k>0

Level 0

Level k>0

Page 16: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

16

Monte-Carlo reformulation

Using point to point form factor Using point to disc form factor

Page 17: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

17

Visibility• Fast scene voxelization from [ED08a]

• Trace rays to samples to resolve visibilitySingle-Pass GPU Solid Voxelization for Real-Time Applications [ED08a]

Page 18: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

18

G-Buffer’’

Visibility – New input

+

Mipmaps Set Pixel Shader

Page 19: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

19

Visibility - Results

Without visibility With visibility

Page 20: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

Outline

I. Related WorkII. Screen Space sampling

III. PipelineIV. Results

20

Page 21: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

21

Mipmapping (1/3)

• Interpolate normals / depth ?• “Nearest”: inconsistent over time

Source of variance => need a specific scheme• /!\ Voxel grid is binary

=> Bitwise operator

Page 22: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

22

Mipmapping (2/3)

• Voting scheme to favor large objectsComparing geometric similarity with neighbor pixelsÞ Discard small areasÞ Consistent over frames

Page 23: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

23

Mipmapping (3/3)

Full resolution normal buffer

4th mipmap using “Nearest” filtering 4th mipmap using “Largest” filtering

Page 24: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

24

Hierarchical upsampling (1/2)

• Different resolution to combine– No overlapping => ADD

• Coarse and noisy– Use cross bilateral filter hierarchically

+? +? +?+ + +

Page 25: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

25

Hierarchical upsampling (2/2)

lv3f

+

lv2

f

+

lv1

lv0

f

+

f(lv3)

f( lv2 + f(lv3) )

f

f( lv1 + f(lv2 + f(lv3)) )

Final indirect lighting

f = cross bilateral upsampling

Page 26: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

26

Temporal coherence

Reverse Reprojection Caching [Nehab et al 07]

Hit?

Average

Compute ReprojectUpdateno

yes

Page 27: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

27Reprojection & Compositing

Pipeline Summary

Indirect Lighting

G-Buffer’’

+

Mipmaps Set Filter & Blend

f

+

+

f

f

Previous frame

Albedo~ x

Direct Lighting

+

Input to bounce n+1

Direct Lighting / Bounce n-1

Page 28: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

Outline

I. Related WorkII. Screen Space samplingIII. Pipeline

IV.Results

28

Page 29: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

29

Page 30: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

30

Page 31: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

31

Real Time Video

GeForce GTX 260 @ 1280x720 – Using 256 samples

Page 32: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

32

Performances• Performance / Quality trade off – Quality: starting level & Number of samples– Range: sampling radius vs. number of levels

Page 33: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

33

Real time !Starting res. : 1/4

Levels: 4Samples: 64

Starting res. : 1/4Levels: 4

Samples: 256

Starting res. : 1/2 Levels: 4

Samples: 64

Starting res. : 1/2Levels: 5

Samples: 64

Visibility Without With Without With Without With Without With

Voxelization (ms) 4.5 4.5 4.5 4.5

Indirect lighting (ms) 2.3 50.2 8.9 188 7.8 125 7.85 129

Upsampling & Compositing (ms) 2.3 2.3 2.3 2.3 2.7 2.7 2.7 2.7

Total (ms) 4.6 57 11.2 195 10.5 132 10.55 136

GeForce GTX 260 @ 1280x720

Page 34: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

34

Visibility Starting res. : 1/4

Levels: 4Samples: 64

Starting res. : 1/4Levels: 4

Samples: 256

Starting res. : 1/2 Levels: 4

Samples: 64

Starting res. : 1/2Levels: 5

Samples: 64

Visibility Without With Without With Without With Without With

Voxelization (ms) 4.5 4.5 4.5 4.5

Indirect lighting (ms) 2.3 50.2 8.9 188 7.8 125 7.85 129

Upsampling & Compositing (ms) 2.3 2.3 2.3 2.3 2.7 2.7 2.7 2.7

Total (ms) 4.6 57 11.2 195 10.5 132 10.55 136

GeForce GTX 260 @ 1280x720

Page 35: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

35

Trade offStarting res. : 1/4

Levels: 4Samples: 64

Starting res. : 1/4Levels: 4

Samples: 256

Starting res. : 1/2 Levels: 4

Samples: 64

Starting res. : 1/2Levels: 5

Samples: 64

Visibility Without With Without With Without With Without With

Voxelization (ms) 4.5 4.5 4.5 4.5

Indirect lighting (ms) 2.3 50.2 8.9 188 7.8 125 7.85 129

Upsampling & Compositing (ms) 2.3 2.3 2.3 2.3 2.7 2.7 2.7 2.7

Total (ms) 4.6 57 11.2 195 10.5 132 10.55 136

GeForce GTX 260 @ 1280x720

Page 36: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

36

Trade offStarting res. : 1/4

Levels: 4Samples: 64

Starting res. : 1/4Levels: 4

Samples: 256

Starting res. : 1/2 Levels: 4

Samples: 64

Starting res. : 1/2Levels: 5

Samples: 64

Visibility Without With Without With Without With Without With

Voxelization (ms) 4.5 4.5 4.5 4.5

Indirect lighting (ms) 2.3 50.2 8.9 188 7.8 125 7.85 129

Upsampling & Compositing (ms) 2.3 2.3 2.3 2.3 2.7 2.7 2.7 2.7

Total (ms) 4.6 57 11.2 195 10.5 132 10.55 136

GeForce GTX 260 @ 1280x720

Page 37: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

37

Discussion

• Memory cost– But works fine on PC

• Indirect Visibility– Computationally expensive– Not visually relevant - [Perceptual Influence of Approximate

Visibility in Indirect Illumination - Yu et al 2009]

Page 38: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

38

Conclusion• Cool results at constant cost• Real time !

• Use frequency information

Page 39: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

39

References• Technical report

http://artis.imag.fr/Membres/Cyril.Soler/SSIL/ssil.techreport.2010.pdf

• Contact:[email protected]@[email protected]

Page 40: A Fast Deferred Shading Algorithm  for  Approximate  Indirect Illumination

Thanks !• Technical report

http://artis.imag.fr/Membres/Cyril.Soler/SSIL/ssil.techreport.2010.pdf• Contact:

[email protected] / [email protected] / [email protected]

• AcknowledgmentsK. Subr & N. Holzschuch (INRIA) for nice reviewsEngineers and artists from Eden Games for useful advices