Guiding and Shadow Rays Alexander Keller, Ken Dahm, Nikolaus Binder, - - PowerPoint PPT Presentation

guiding and shadow rays
SMART_READER_LITE
LIVE PREVIEW

Guiding and Shadow Rays Alexander Keller, Ken Dahm, Nikolaus Binder, - - PowerPoint PPT Presentation

Guiding and Shadow Rays Alexander Keller, Ken Dahm, Nikolaus Binder, Thomas Mller Guiding and Shadow Rays Importance sampling of many light sources sampling proportional to integrand p f r cos Guiding and Shadow Rays Importance


slide-1
SLIDE 1

Guiding and Shadow Rays

Alexander Keller, Ken Dahm, Nikolaus Binder, Thomas Müller

slide-2
SLIDE 2

Guiding and Shadow Rays

Importance sampling of many light sources

sampling proportional to integrand

p ∼ fr cosθ

slide-3
SLIDE 3

Guiding and Shadow Rays

Importance sampling of many light sources

sampling proportional to integrand

p ∼ fr cosθ p ∼ Lefr cosθ

2

slide-4
SLIDE 4

Guiding and Shadow Rays

Importance sampling of many light sources

sampling proportional to integrand – requires to include visibility

p ∼ fr cosθ p ∼ Lefr cosθ

2

slide-5
SLIDE 5

Guiding and Shadow Rays

Importance sampling of many light sources

sampling proportional to integrand – requires to include visibility

p ∼ fr cosθ p ∼ Lefr cosθ

goals – massively parallel – linear in number of paths – constant time 2

slide-6
SLIDE 6

Guiding and Shadow Rays

Previous work

sorting lights by their unoccluded contribution, keeping record of their average visibility – Adaptive shadow testing for ray tracing [War91] 3

slide-7
SLIDE 7

Guiding and Shadow Rays

Previous work

sorting lights by their unoccluded contribution, keeping record of their average visibility – Adaptive shadow testing for ray tracing [War91] potentially visible sets – Visibility computations in densely occluded polyhedral environments [Tel92] 3

slide-8
SLIDE 8

Guiding and Shadow Rays

Previous work

sorting lights by their unoccluded contribution, keeping record of their average visibility – Adaptive shadow testing for ray tracing [War91] potentially visible sets – Visibility computations in densely occluded polyhedral environments [Tel92] spatial subdivision referencing important lights per stratum (besides many other useful things) – Monte Carlo techniques for direct lighting calculations [SWZ96] 3

slide-9
SLIDE 9

Guiding and Shadow Rays

Previous work

sorting lights by their unoccluded contribution, keeping record of their average visibility – Adaptive shadow testing for ray tracing [War91] potentially visible sets – Visibility computations in densely occluded polyhedral environments [Tel92] spatial subdivision referencing important lights per stratum (besides many other useful things) – Monte Carlo techniques for direct lighting calculations [SWZ96] contributing light sources determined by photons – Efficient importance sampling techniques for the photon map [KW00] 3

slide-10
SLIDE 10

Guiding and Shadow Rays

Previous work

sorting lights by their unoccluded contribution, keeping record of their average visibility – Adaptive shadow testing for ray tracing [War91] potentially visible sets – Visibility computations in densely occluded polyhedral environments [Tel92] spatial subdivision referencing important lights per stratum (besides many other useful things) – Monte Carlo techniques for direct lighting calculations [SWZ96] contributing light sources determined by photons – Efficient importance sampling techniques for the photon map [KW00] contribution of light sources estimated by sampling some paths across the image – Interactive global illumination in complex and highly occluded environments [WBS03] 3

slide-11
SLIDE 11

Guiding and Shadow Rays

Previous work

importance resampling – Importance resampling for global illumination [TCE05] 4

slide-12
SLIDE 12

Guiding and Shadow Rays

Previous work

importance resampling – Importance resampling for global illumination [TCE05] cache points referencing contributing lights – Importance caching for complex illumination [GKPS12] 4

slide-13
SLIDE 13

Guiding and Shadow Rays

Previous work

importance resampling – Importance resampling for global illumination [TCE05] cache points referencing contributing lights – Importance caching for complex illumination [GKPS12] probabilistic traversal of light hierarchy – Efficient sampling of many lights [Ces14], see https://ompf2.com/viewtopic.php?t=1938 4

slide-14
SLIDE 14

Guiding and Shadow Rays

Previous work

importance resampling – Importance resampling for global illumination [TCE05] cache points referencing contributing lights – Importance caching for complex illumination [GKPS12] probabilistic traversal of light hierarchy – Efficient sampling of many lights [Ces14], see https://ompf2.com/viewtopic.php?t=1938 caching importance records – Probabilistic connections for bidirectional path tracing [PRDD15] 4

slide-15
SLIDE 15

Guiding and Shadow Rays

Previous work

importance resampling – Importance resampling for global illumination [TCE05] cache points referencing contributing lights – Importance caching for complex illumination [GKPS12] probabilistic traversal of light hierarchy – Efficient sampling of many lights [Ces14], see https://ompf2.com/viewtopic.php?t=1938 caching importance records – Probabilistic connections for bidirectional path tracing [PRDD15] generalization to guiding by probability hierarchies – The Iray light transport simulation and rendering system [KWRSvAKK17] 4

slide-16
SLIDE 16

Guiding and Shadow Rays

Previous work

refined bounds and clustering – Importance sampling of many lights with adaptive tree splitting [CK18] 5

slide-17
SLIDE 17

Guiding and Shadow Rays

Previous work

refined bounds and clustering – Importance sampling of many lights with adaptive tree splitting [CK18] cache points referencing lights accounting 97% of the energy – The design and evolution of Disney’s Hyperion renderer [BACDHKKKT18] 5

slide-18
SLIDE 18

Guiding and Shadow Rays

Previous work

refined bounds and clustering – Importance sampling of many lights with adaptive tree splitting [CK18] cache points referencing lights accounting 97% of the energy – The design and evolution of Disney’s Hyperion renderer [BACDHKKKT18] learning importance of clusters in a hierarchy combined with separation of the main part – Bayesian online regression for adaptive direct illumination sampling [VKK18] 5

slide-19
SLIDE 19

Guiding and Shadow Rays

Previous work

refined bounds and clustering – Importance sampling of many lights with adaptive tree splitting [CK18] cache points referencing lights accounting 97% of the energy – The design and evolution of Disney’s Hyperion renderer [BACDHKKKT18] learning importance of clusters in a hierarchy combined with separation of the main part – Bayesian online regression for adaptive direct illumination sampling [VKK18] data structures – Efficient data structures and sampling of many light sources for next event estimation [Mik18] – see https://github.com/AndiMiko/masterthesis/releases 5

slide-20
SLIDE 20

Importance Sampling

Partial cumulative distribution function (CDF)

index set I := {i1,...,ik} ⊆ {1,...,n} of references ij to (point) light sources 6

slide-21
SLIDE 21

Importance Sampling

Partial cumulative distribution function (CDF)

index set I := {i1,...,ik} ⊆ {1,...,n} of references ij to (point) light sources probability density function storing only the qi for i ∈ I

pi :=      (1−b)·qi +b · 1

n

for i ∈ I b · 1

n

for i ∈ I

6

slide-22
SLIDE 22

Importance Sampling

Partial cumulative distribution function (CDF)

index set I := {i1,...,ik} ⊆ {1,...,n} of references ij to (point) light sources probability density function storing only the qi for i ∈ I

pi :=      (1−b)·qi +b · 1

n

for i ∈ I b · 1

n

for i ∈ I

sampling – proportional to qi with probability 1−b, using cumulative distribution Qk := ∑k

j=1 qij

– uniform with probability b 6

slide-23
SLIDE 23

Importance Sampling

Partial cumulative distribution function (CDF)

index set I := {i1,...,ik} ⊆ {1,...,n} of references ij to (point) light sources probability density function storing only the qi for i ∈ I

pi :=      (1−b)·qi +b · 1

n

for i ∈ I b · 1

n

for i ∈ I

sampling – proportional to qi with probability 1−b, using cumulative distribution Qk := ∑k

j=1 qij

– uniform with probability b 6

slide-24
SLIDE 24

Importance Sampling

Partial cumulative distribution function (CDF)

index set I := {i1,...,ik} ⊆ {1,...,n} of references ij to (point) light sources probability density function storing only the qi for i ∈ I

pi :=      (1−b)·qi +b · 1

n

for i ∈ I b · 1

n

for i ∈ I

sampling – proportional to qi with probability 1−b, using cumulative distribution Qk := ∑k

j=1 qij

– uniform with probability b 6

slide-25
SLIDE 25

Importance Sampling

Partial cumulative distribution function (CDF)

index set I := {i1,...,ik} ⊆ {1,...,n} of references ij to (point) light sources probability density function storing only the qi for i ∈ I

pi :=      (1−b)·qi +b · 1

n

for i ∈ I b · 1

n

for i ∈ I

multiple importance sampling – proportional to qi with probability 1−b, using cumulative distribution Qk := ∑k

j=1 qij

– light hierarchy with probability b 6

slide-26
SLIDE 26

Importance Sampling

Partial cumulative distribution function (CDF)

index set I := {i1,...,ik} ⊆ {1,...,n} of references ij to (point) light sources probability density function storing only the qi for i ∈ I

pi :=      (1−b)·qi +b · 1

n

for i ∈ I b · 1

n

for i ∈ I

multiple importance sampling – proportional to qi with probability 1−b, using cumulative distribution Qk := ∑k

j=1 qij

– light hierarchy with probability b discrete density simulation, see https://arxiv.org/abs/1901.05423 6

slide-27
SLIDE 27

Importance Sampling

Finding the probabilities qi

qi as normalized accumulated flux

Φ = max{cosω,0}·L(x,ω) p(x)·p(s,ω)

– probability p(x) of selecting location x (unless point light source) – probability p(s,ω) of selecting direction ω in shading point s 7

slide-28
SLIDE 28

Importance Sampling

Finding the probabilities qi

qi as normalized accumulated flux

Φ = max{cosω,0}·L(x,ω) p(x)·p(s,ω)

– probability p(x) of selecting location x (unless point light source) – probability p(s,ω) of selecting direction ω in shading point s learning probabilities qi during path tracing – simple inclusion of path guiding for scattering 7

slide-29
SLIDE 29

Importance Sampling

Finding the probabilities qi

qi as normalized accumulated flux

Φ = max{cosω,0}·L(x,ω) p(x)·p(s,ω)

– probability p(x) of selecting location x (unless point light source) – probability p(s,ω) of selecting direction ω in shading point s learning probabilities qi during path tracing – simple inclusion of path guiding for scattering photon-based next event estimation – origins of photons within search radius to determine set I of (point) light sources 7

slide-30
SLIDE 30

Efficient Implementation

Linear complexity

store one partial CDF per hashed cell stochastic interpolation accumulate probabilities similar to Massively Parallel Path Space Filtering – see https://arxiv.org/abs/1902.05942 8

slide-31
SLIDE 31

Efficient Implementation

Hashing instead of searching

descriptors for selected vertices include

world space location x

9

slide-32
SLIDE 32

Efficient Implementation

Hashing instead of searching

descriptors for selected vertices include

world space location x and optionally normal n,

9

slide-33
SLIDE 33

Efficient Implementation

Hashing instead of searching

descriptors for selected vertices include

world space location x and optionally normal n, incident angle ω,

9

slide-34
SLIDE 34

Efficient Implementation

Hashing instead of searching

descriptors for selected vertices include

world space location x and optionally normal n, incident angle ω, and BRDF layer

9

slide-35
SLIDE 35

Efficient Implementation

Hashing instead of searching

descriptors for selected vertices include

world space location x and optionally normal n, incident angle ω, and BRDF layer

storing and loading data using hashed quantized descriptors – trade a larger hash table size for faster access (proportional to number of paths) 9

slide-36
SLIDE 36

Efficient Implementation

Hashing instead of searching

descriptors for selected vertices include

world space location x and optionally normal n, incident angle ω, and BRDF layer

storing and loading data using hashed quantized descriptors – trade a larger hash table size for faster access (proportional to number of paths) – use a second hash of the descriptor instead of storing full keys 9

slide-37
SLIDE 37

Efficient Implementation

Hashing instead of searching

descriptors for selected vertices include

world space location x and optionally normal n, incident angle ω, and BRDF layer

storing and loading data using hashed quantized descriptors – trade a larger hash table size for faster access (proportional to number of paths) – use a second hash of the descriptor instead of storing full keys – linear probing for collision resolution 9

slide-38
SLIDE 38

Efficient Implementation

Stochastic interpolation to resolve quantization artifacts

input average per cell

10

slide-39
SLIDE 39

Efficient Implementation

Stochastic interpolation to resolve quantization artifacts

input average per cell with jittering

jitter descriptor (xi, ...) on store and load – resulting uniform noise amenable to (existing) post filtering 10

slide-40
SLIDE 40

Efficient Implementation

Linear instead of quadratic complexity

finding the hash table location i

i ← hash(˜ x,...) % table_size for both averaging and querying

11

slide-41
SLIDE 41

Efficient Implementation

Linear instead of quadratic complexity

finding the hash table location i

i ← hash(˜ x,...) % table_size v ← hash2(˜ x,n,...) for both averaging and querying

11

slide-42
SLIDE 42

Efficient Implementation

Linear instead of quadratic complexity

finding the hash table location i

l′ ← level_of_detail(|pcam −x′|) ˜ x ←

  • x′

scale·2l′

  • i ← hash(˜

x,...) % table_size v ← hash2(˜ x,n,...) for both averaging and querying

11

slide-43
SLIDE 43

Efficient Implementation

Linear instead of quadratic complexity

finding the hash table location i

l ← level_of_detail(|pcam −x|) x′ ← x+ jitter(n) · scale ·2l l′ ← level_of_detail(|pcam −x′|) ˜ x ←

  • x′

scale·2l′

  • i ← hash(˜

x,...) % table_size v ← hash2(˜ x,n,...) for both averaging and querying

11

slide-44
SLIDE 44

Efficient Implementation

Linear instead of quadratic complexity

finding the hash table location i

l ← level_of_detail(|pcam −x|) x′ ← x+ jitter(n) · scale ·2l l′ ← level_of_detail(|pcam −x′|) ˜ x ←

  • x′

scale·2l′

  • i ← hash(˜

x,...) % table_size v ← hash2(˜ x,n,...) for both averaging and querying

11

slide-45
SLIDE 45

Efficient Implementation

Linear instead of quadratic complexity

finding the hash table location i

l′ ← level_of_detail(|pcam −x′|) ˜ x ←

  • x′

scale·2l′

  • i ← hash(˜

x,...) % table_size v ← hash2(˜ x,n,...) for both averaging and querying

11

slide-46
SLIDE 46

Efficient Implementation

Linear instead of quadratic complexity

finding the hash table location i

l ← level_of_detail(|pcam −x|) x′ ← x+ jitter(n) · scale ·2l l′ ← level_of_detail(|pcam −x′|) ˜ x ←

  • x′

scale·2l′

  • i ← hash(˜

x,...) % table_size v ← hash2(˜ x,n,...) for both averaging and querying

jittering before quantization hides discretization artifacts in uniform noise 11

slide-47
SLIDE 47

Results

Comparison at 16 paths per pixel

uniform sampling 12

slide-48
SLIDE 48

Results

Comparison at 16 paths per pixel

light hierarchy 12

slide-49
SLIDE 49

Results

Comparison at 16 paths per pixel

multiple importance sampling combining partial CDF including visibility and light hierarchy 12

slide-50
SLIDE 50

Results

Comparison at 2 paths of length 3 per pixel with 4 shadow rays each bounce

uniform sampling vs. light hierarchy vs. new method 13

slide-51
SLIDE 51

Results

Comparison at 2 paths of length 3 per pixel with 4 shadow rays each bounce

uniform sampling vs. light hierarchy vs. new method 13

slide-52
SLIDE 52

Results

Comparison at 2 paths of length 3 per pixel with 4 shadow rays each bounce

uniform sampling vs. light hierarchy vs. new method 13

slide-53
SLIDE 53

Results

Comparison at 8 paths of length 4 per pixel

light hierarchy vs. partial CDF 14

slide-54
SLIDE 54

Results

Comparison at 8 paths of length 4 per pixel

light hierarchy vs. partial CDF 14

slide-55
SLIDE 55

Results

Comparison at 8 paths of length 4 per pixel

light hierarchy vs. partial CDF 14

slide-56
SLIDE 56

Results

Comparison at 8 paths of length 4 per pixel

light hierarchy vs. partial CDF with path space filtering 14

slide-57
SLIDE 57

Guiding and Shadow Rays

Sampling proportional to integrand including visibility

level-of-detail hash of partial CDFs – light hierarchy as fallback stochastic interpolation – for both accumulation and sampling probabilities determined by either path tracing or light paths (photons) 15

slide-58
SLIDE 58

Guiding and Shadow Rays

Sampling proportional to integrand including visibility

level-of-detail hash of partial CDFs – light hierarchy as fallback stochastic interpolation – for both accumulation and sampling probabilities determined by either path tracing or light paths (photons) up next – learn b by gradient descent – include bidirectional scattering distribution function 15