Stochastic Transparency Eric Enderton Erik Sintorn Pete Shirley - - PowerPoint PPT Presentation

stochastic transparency
SMART_READER_LITE
LIVE PREVIEW

Stochastic Transparency Eric Enderton Erik Sintorn Pete Shirley - - PowerPoint PPT Presentation

Stochastic Transparency Eric Enderton Erik Sintorn Pete Shirley David Luebke I3D 2010 Order Independent Transparency hair foliage particles windows shadows thereof Standard OIT algorithms Sort primitives Fails for overlaps Disrupts


slide-1
SLIDE 1

Stochastic Transparency

Eric Enderton Erik Sintorn Pete Shirley David Luebke I3D 2010

slide-2
SLIDE 2

Order Independent Transparency

hair foliage particles windows shadows thereof

slide-3
SLIDE 3

Standard OIT algorithms

Sort primitives

Fails for overlaps Disrupts engine code (not OIT)

Depth peeling [Everitt 2001, Bavoil et al 2007, ...]

Unpredictably large # of passes

A-Buffer [Carpenter 1984]

slide-4
SLIDE 4

Standard OIT algorithms

Depth complexity from 1 (scarf) to 10’s (grass) to 100’s (hair)

slide-5
SLIDE 5

Standard OIT algorithms

Depth peeling: in the same time as our algorithm, 5 passes

slide-6
SLIDE 6

Standard OIT algorithms

Sort primitives

Fails for overlaps Disrupts engine code (not OIT)

Depth peeling [Everitt 2001, Bavoil et al 2007, ...]

Unpredictably large # of passes

A-Buffer [Carpenter 1984]

Unpredictably large amount of memory

slide-7
SLIDE 7

Transparency Without Sorting

For each pixel sample, collect statistics about the transparent fragments along that ray

min z, max z, count, total opacity, stranger things Estimating the parameters of a model

Fast: Fixed passes, fixed memory Approximate

slide-8
SLIDE 8

Transparency Without Sorting

Variance Shadow Maps [Donnelly + Lauritzen I3D 2005]

collect mean, variance of z

Occupancy Maps [Sintorn + Assarsson I3D 2009]

collect counts, occupancy bit mask assumes equal alphas; trouble with multiple clumps

Fourier Opacity Maps [Jansen + Bavoil I3D 2010 – next!]

slide-9
SLIDE 9

Stochastic Transparency: Basic Method

slide-10
SLIDE 10

Screen Door Transparency

  • cf. [Fuchs et al 1995]
slide-11
SLIDE 11

Alpha-to-Coverage [Akeley 1993]

MSAA with S samples per pixel (S=8)

slide-12
SLIDE 12

Alpha-to-Coverage [Akeley 1993]

Kill all but *S samples “coverage mask” 3/8

slide-13
SLIDE 13

Alpha-to-Coverage

Two fragments with similar alpha cover the same samples -- oops 3/8 3/8 3/8

slide-14
SLIDE 14

Idea

Choose sample masks randomly [OpenGL 1993] Correct on average, in all cases

slide-15
SLIDE 15

Correct on average

“over”

slide-16
SLIDE 16

Stochastic Transparency

Screen-door + multi-sampling + random masks. Correct on average, in all cases

Foliage, Smoke, Hair, Glass Mixed together

Fast

One order-independent pass One MSAA z-buffer

But noisy

  • More samples
  • More algorithms
slide-17
SLIDE 17

Stochastic Transparency

(Reference)

slide-18
SLIDE 18

Stochastic Transparency

Alg 1. Basic 8 spp

slide-19
SLIDE 19

Stochastic Transparency

Alg 1. Basic 16 spp

slide-20
SLIDE 20

Stochastic Transparency

Alg 1. Basic 32 spp

slide-21
SLIDE 21

Stochastic Transparency

Alg 1. Basic 64 spp

slide-22
SLIDE 22

Stochastic Transparency

Alg 1. Basic 512 spp

slide-23
SLIDE 23

Motion

(video #1)

slide-24
SLIDE 24

Quantization noise

Example: 4x MSAA = 0.6 = 0.5 = 0.5 = 0.5 = 0.75 = 0.75 average = 0.6

slide-25
SLIDE 25

Alpha correction

One extra pass to render correct total

  • Correction factor

One layer

  • exact

More layers

  • still noisy

0.5 * 0.6/0.5 = 0.6 0.5 * 0.6/0.5 = 0.6 0.5 * 0.6/0.5 = 0.6 0.75 * 0.6/0.75 = 0.6 0.75 * 0.6/0.75 = 0.6

slide-26
SLIDE 26

Stochastic Transparency

(Reference)

slide-27
SLIDE 27

Stochastic Transparency

Alg 1. Basic 8 spp

slide-28
SLIDE 28

Stochastic Transparency

Alg 2. Alpha correction 8 spp

slide-29
SLIDE 29

Stochastic Transparency

Alg 3. Depth-based 8 spp

slide-30
SLIDE 30

Stochastic Transparency

(Reference)

slide-31
SLIDE 31

Stochastic Shadows

slide-32
SLIDE 32

Stochastic Shadow Map

A shadow map, with screen-door transparency Noise

  • higher-res map

Look-up is just PCF

slide-33
SLIDE 33

Stochastic Shadow Map

slide-34
SLIDE 34

Stochastic Shadow Map

Optional: Render with MSAA hardware

  • Each map pixel contains S depth values

Models vis(z) = How much light gets from camera to depth z

  • Cf. Deep Shadows [Lokovic and Veach 2000]
slide-35
SLIDE 35

Stochastic Shadow Map

1 z

slide-36
SLIDE 36

Stochastic Shadow Map

Crude, but compact, regular, and parallel: Every pixel looks the same

S z-values z’s not sorted

Look-up is just PCF

S comparisons per shadow-map pixel

slide-37
SLIDE 37

Depth-Based Stochastic Transparency

slide-38
SLIDE 38

Transparent Shadow Map

How much light gets from camera to depth z = How much light gets from depth z to camera = Contribution of fragment at depth z

  • Compute c as a weighted sum of fragment colors
  • Any transparent shadow method

is also an OIT method.

slide-39
SLIDE 39

Stochastic Transparency Algorithms

“Depth based” stochastic transparency

Render stochastic shadow map from the camera Accumulation pass Alpha correction pass

Basic: 1 pass Alpha Corrected: 2 passes Depth Based: 3 passes

(Per 8 spp. Add 2 passes per 8 additional spp.)

slide-40
SLIDE 40

Motion

(video #2)

slide-41
SLIDE 41

Discussion (1 of 2)

Stochastic Transparency is Fast: Fixed passes, fixed memory Unified Simple Parallel No sorting!

slide-42
SLIDE 42

Discussion (2 of 2)

64 spp? “The elegance of brute force” Connections to Deep Shadow Maps Connections to Monte Carlo Ray Tracing Turns transparent stuff into opaque stuff

slide-43
SLIDE 43

Thanks also to James Reilley, Lars Nordskog, John Tran and Steve Parker at NVIDIA. Contact: www.nvidia.com/research

Thank you!