Matrix Row-Column Sampling for the Many-Light Problem
This presentation is the property of its rightful owner.
Sponsored Links
1 / 46

Matrix Row-Column Sampling for the Many-Light Problem PowerPoint PPT Presentation


  • 36 Views
  • Uploaded on
  • Presentation posted in: General

Matrix Row-Column Sampling for the Many-Light Problem. Milo š Ha š an (Cornell University) Fabio Pellacini (Dartmouth College) Kavita Bala (Cornell University). Complex Illumination: A Challenge. Conversion to Many Lights. Area, indirect, sun/sky.

Download Presentation

Matrix Row-Column Sampling for the Many-Light Problem

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Matrix row column sampling for the many light problem

Matrix Row-Column Sampling for the Many-Light Problem

Miloš Hašan (Cornell University)

Fabio Pellacini (Dartmouth College)

Kavita Bala (Cornell University)


Complex illumination a challenge

Complex Illumination: A Challenge


Conversion to many lights

Conversion to Many Lights

  • Area, indirect, sun/sky

Courtesy Walter et al., Lightcuts, SIGGRAPH 05/06


A matrix interpretation

A Matrix Interpretation

Lights (100,000)

Pixels

(2,000,000)


Problem statement

Problem Statement

  • Compute sum of columns

  • Note: We don’t have the matrix data

Lights

= Σ (

)

Pixels


Indirect illumination many lights

Indirect Illumination  Many Lights

=

Σ (

)

100,000 point lights


Environment map many lights

Environment Map  Many Lights

=

Σ (

)

100,000 point lights


Sun sky indirect many lights

Sun, Sky, Indirect  Many Lights

=

Σ (

)

100,000 point lights


Brute force takes minutes

Brute Force Takes Minutes

  • Why not sum all columns?

    • With 100,000 lights, still several minutes

10 min

13 min

20 min


Our contribution

Our Contribution

  • Fast, accurate, GPU-based approximation

  • Application: Preview for lighting design

Brute force:

10 min

13 min

20 min

Our result:

3.8 sec

13.5 sec

16.9 sec


Related work

Related Work

Many lights (CPU-based):Walter et al 05/06, Ward 94, Paquette et al 98, Wald et al 03, …

Instant radiosity & related:Keller 97, Dachsbacher & Stamminger 05/06, Laine et al 07, …

Environment maps:Agarwal et al 03, Ostromoukhov et al 04, …

Precomputation-based:Sloan et al 02/03, Ng et al 03/04, Ben-Artzi et al 06, Hasan et al 06, Ritschel et al 07, …

Other global illumination:Ward et al 88, Jensen 96, Hanrahan et al 91, Christensen 97, Scheel 01/02, Gautron et al 05, Krivanek et al 06, Dachsbacher et al 07, …


Insight 1 matrix has structure

Insight #1: Matrix has structure

  • Compute small subset of elements

  • Reconstruct

643 lights

900 pixels

A simple scene

30 x 30 image

The matrix


Insight 2 sampling pattern matters

Insight #2: Sampling Pattern Matters

Lights

Pixels

Point-to-many-points visibility: Shadow-mapping

Point-to-point visibility: Ray-tracing


Row column duality

Row-Column Duality

  • Columns: Regular Shadow Mapping

Shadow map at light position

Surface samples


Row column duality1

Row-Column Duality

  • Rows: Also Shadow Mapping!

Shadow map at sample position


Image as a weighted column sum

Image as a Weighted Column Sum

  • The following is possible:

compute very small subset of columns

compute weighted sum

  • Use rows to choose a good set of columns!


Exploration and exploitation

Exploration and Exploitation

?

how to choose columns and weights?

compute rows (explore)

choose columns and weights

compute columns (exploit)

weighted sum


Reduced matrix

Reduced Matrix

Reduced columns


Clustering approach

Clustering Approach

Choose representative columns

Reduced columns

Choose k clusters


Reduced full

Reduced  Full

Use the same representatives for the full matrix

Representative columns

Weighted sum


Visualizing the reduced columns

radius = norm

Visualizing the Reduced Columns

Reduced columns: vectors in high-dimensional space

visualize as …


Clustering illustration

Clustering Illustration

Columns with various intensities can be clustered

Strong but similar columns

Weak columns can be clustered more easily


The clustering metric

The Clustering Metric

  • Minimize:

  • where:

total cost of all clusters

squared distance between normalized reduced columns

norms of the reduced columns

cost of a cluster

sum over all pairs in it


How to minimize

How to minimize?

  • Problem is NP-hard

  • Not much previous research

  • Should handle large input:

    • 100,000 points

    • 1000 clusters

  • We introduce 2 heuristics:

    • Random sampling

    • Divide & conquer


Clustering by random sampling

Clustering by Random Sampling

Very fast (use optimized BLAS)

Some clusters might be too small / large


Clustering by divide conquer

Clustering by Divide & Conquer

Splitting small clusters is fast

Splitting large clusters is slow


Combined clustering algorithm

Combined Clustering Algorithm


Combined clustering algorithm1

Combined Clustering Algorithm


Full algorithm

Full Algorithm

Assemble rows into reduced matrix

Cluster reduced columns

Compute rows (GPU)

Choose representatives

Weighted sum

Compute columns (GPU)


Results

Results

  • We show 5 scenes:

  • Show reference and 5x difference image

  • All scenes have 100,000+ lights

  • Timings

    • NVidia GeForce 8800 GTX

    • Light / surface sample creation not included

Kitchen

Temple

Trees

Bunny

Grand Central


Results kitchen

Results: Kitchen

5x diff

  • 388k polygons

  • Mostly indirect illumination

  • Glossy surfaces

  • Indirect shadows

Reference: 13 min (using all 100k lights)

Our result: 13.5 sec (432 rows + 864 columns)


Results temple

Results: Temple

5x diff

  • 2.1m polygons

  • Mostly indirect & sky illumination

  • Indirect shadows

Our result: 16.9 sec (300 rows + 900 columns)

Reference: 20 min (using all 100k lights)


Results trees

Results: Trees

5x diff

  • 328k polygons

  • Complex incoherent geometry

Reference: 14 min (using all 100k lights)

Our result: 2.9 sec (100 rows + 200 columns)


Results bunny

Results: Bunny

5x diff

  • 869k polygons

  • Incoherent geometry

  • High-frequency lighting

  • Kajiya-Kay hair shader

Our result: 3.8 sec (100 rows + 200 columns)

Reference: 10 min (using all 100k lights)


Results grand central

Results: Grand Central

5x diff

  • 1.5m polygons

  • Point lights between stone blocks

Our result: 24.2 sec (588 rows + 1176 columns)

Reference: 44 min (using all 100k lights)


The value of exploration

The Value of Exploration

Our result

(432 rows + 864 columns)

No exploration

(Using 1455 lights)

Equal time comparison


The value of exploration1

The Value of Exploration

Our result

No exploration

Equal time comparison: 5x difference from reference


Conclusion

Conclusion

  • Fast, high quality approximation for many lights

    • GPU-oriented

    • Sample rows to explore low-rank structure

    • Sample well-chosen columns

  • Application: Preview for lighting design

    • Indirect illumination

    • Environment maps

    • Arbitrary lights and shaders


Future work

Future Work

  • How many rows + columns?

    • Pick automatically

  • Row / column alternation

  • Progressive algorithm:

    • stop when user likes the image

  • Render multiple frames at once?


Acknowledgments

Acknowledgments

  • Veronica Sundstedt and Patrick Ledda

    • Temple scene

  • Bruce Walter, PCG @ Cornell

  • NSF CAREER 0644175

  • Affinito-Stewart Award


Thank you

Thank You


Discarded slides

Discarded slides


Indirect illumination many lights1

Indirect Illumination  Many Lights

  • shoot photons from light sources

  • deposit on every bounce

  • treat photons as point lights

  • cosine-weighted emission


Low rank assumption

Low Rank Assumption

Worst case: lights with very local contribution


The value of exploration2

The Value of Exploration

Our result

(432 rows + 864 columns)

No exploration

(Using 1992 lights)

Equal time comparison


The value of exploration3

The Value of Exploration

Our result

No exploration

Equal time comparison: 5x difference image


  • Login