1 / 27

Photon Mapping

Photon Mapping. Not to scale. Photon Mapping. How did I use it 10 years ago? Why might you want to use it tomorrow?. Ever increasing complexity (For an approximation!). Warning: Contains Math. Photon map creation.

sarila
Download Presentation

Photon Mapping

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Photon Mapping Not to scale

  2. Photon Mapping How did I use it 10 years ago? Why might you want to use it tomorrow?

  3. Ever increasing complexity(For an approximation!) Warning: Contains Math

  4. Photon map creation • Emit photon from light sources in turn based on relative energy output, until ‘n’ emitted. • Photons all emit at same power but power and color may vary after reflectance. • Stored AND / OR reflected at each hit surface. • Adjust photon energy based on number of actual emitted photons. • Heavy use of random probability based on surface material (drand48)

  5. Photon Map – Raw samples

  6. Sampling photons • Incorrect density estimates = dark corners & edges • Problem: Photon map does not store geometry • Impractical… for direct visualization

  7. Kd-tree From efficient storage to critical tool. Can be dynamized for generic use

  8. Why do indirect lights work? • Photon Map stores energy to emit ‘The Final Bounce’ • Ray tracers use photon map to accelerate ‘Final Gathering’ • Light Energy is conserved

  9. Indirect Lights Sampled from top levels of kd-tree

  10. Direct lights close to surfaces

  11. Spatial structuresfor visibility testing • Hybrid BSP • Top levels are octree • Lower levels arbitrary planes • Stored as binary tree • Not balanced • Polys in leaves as edges

  12. Packing texturesGood enough • Many ways to generate texture atlas • Can be part of seam reduction • I used simple, largest first box packing with empty space reclamation

  13. There seems to be a problem • The map makers problem… how to map a round surface to a flat plane, and hide the evidence. • Biliner filtering works against you. • There is no perfect solution.

  14. (Feature) Size Matters • Texel size vs Geometry wall thickness means choosing sample points wisely. • Shift sample points within texel. • Use multiple sample point locations.

  15. Direct Lights can look coarse • Not enough of them to look like indirect light

  16. Direct lights can look soft • When considered a surface instead of a point.

  17. Why can’t I see the stars during the day time? • Exposure control to the rescue… map infinite floating point light range to 8 bits. • Pics show 0.5, 1.0, 2.0 K values for equation

  18. Area lights • Pretend it’s Radiosity • Light polys sampled as jittered grid, texelreceivers • How much energy from one area to another

  19. Final Results (1 of 3)

  20. Final Results (2 of 3)

  21. Final Results (3 of 3)

  22. How fast is it?

  23. Real-time? • Deferred lighting / shading for many direct light sources. • May not need shadows / occlusion per light. • Photon map creation (sample scene energy) and prepare virtual lights takes ‘seconds’. • As background process, get results with latency. • Energy changes when lights OR geometry move. • Represent geometry with LOD mesh or voxels.

  24. Screens fromMy Virtual Home (1 of 3)

  25. What if we changed the kitchen? (2 of 3)

  26. MVH Looking good (3 of 3)

  27. Questions? From self published paper: Diffuse Global Illumination via Direct and Virtual Indirect Light Sources (2003) Download from citeseeror gmscript.com http://www.gmscript.com/gamemonkey/downloads/misc/LightingTechnique1.pdf • Some images used without permission… Thanks Google. Thank you for staying awake and not texting.

More Related