1 / 21

Photon Tracing with Arbitrary Materials

Photon Tracing with Arbitrary Materials. Patrick Yau. Overview. Changes in Photon Map Changes in Photon Tracing Changes in Rendering. Caustic Photon Maps. Used only to store photons corresponding to caustics.

millicent
Download Presentation

Photon Tracing with Arbitrary Materials

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 Tracing with Arbitrary Materials Patrick Yau

  2. Overview • Changes in Photon Map • Changes in Photon Tracing • Changes in Rendering

  3. Caustic Photon Maps • Used only to store photons corresponding to caustics. • Created by emitting photons towards the specular objects in the scene and storing these as they hit diffuse surfaces. • Photons are highly focused into a small area.

  4. Caustic Photon Maps (cont’d) • Separate into two photon maps because: • Render caustics is faster because it contains only photons related to caustics • Locating photons in global photon map is faster • Fewer photons • Improves accuracy of radiance estimate • Photons have energy levels that are more similar. • Caustics photons have high density and low energy • Normal photons have low density and high energy.

  5. Photon Scattering • Specular reflection • Photons that hit specular surfaces are reflected in the mirror direction. • Calculated the same as specularly reflected rays in raytracing. • The power of the photon should be scaled by the reflectivity or the mirror. Unless using Russian Roulette.

  6. Photon Scattering Diffuse reflection • Pick random direction in the hemisphere above the intersection point with a probability proportional to the cosine of the angle with the normal. • Photon map can be used as a heuristic for shadows.

  7. Photon Scattering • Arbitrary BRDF Reflection • New photon direction is computed by importance sampling the BRDF. • If importance-sampling function is not available then pick a random direction. • e.g. Ward’s anisotropic model, Lafortune’s reflection model (previous lecture)

  8. Photon Scattering • Russian Roulette: • Reflection or Absorption:

  9. Photon Scattering • Russian Roulette: • Specular or Diffuse Reflection:

  10. Photon Mapping – Rendering

  11. Photon Mapping: Rendering • The Direct Illumination term: • Computed by sending shadow rays towards all light sources to check for visibility • Two ways: approximate or accurate evaluation • Accurate: Use the global photon map to identify the fully illuminated or shadow areas in the scene avoiding the trace of shadow rays. • Approximate: evaluate the radiance directly from the photon maps. No need for tracing other rays.

  12. Photon Mapping: Rendering • Classification of photons in Photon Map

  13. Photon Mapping: Rendering • The specular term • Is computed using standard Monte Carlo ray tracing by using importance sampling based on the BRDF.

  14. Photon Mapping: Rendering • The caustics term: • The radiance is estimated based on the caustics photon map. • It is visualized directly and this is the reason why the number of photons in the caustics photon map must be high.

  15. Photon Mapping: Rendering • The soft indirect illumination term • The approximate evaluation of this integral is the radiance estimate based on the global photon map. • In the accurate evaluation we use importance sampling to compute the indirect illumination (combined with the diffuse BRDF part)

  16. Photon Mapping: Rendering • Estimating Radiance using the Photon Map (for caustics and soft indirect illumination) • The information in the photon map can be used to compute the radiance leaving a surface in a given direction. Since the incoming direction is stored with each photon we can integrate the information with any BRDF. • To compute the radiance, Lr, leaving an intersection point x at a surface BRDF fr we locate the N photons with the shortest distance to x. • Based on the assumption that each photon p represented by ∆ΦpX arriving at X from direction Ψi,p we get:

  17. Photon Mapping: Rendering • *Code taken from Taylor’s lecture. • Estimating Radiance • 1. radiance_estimate(x,v,n) { • 2. locate k nearest photons • 3. r = distance to kth nearest photon • 4. flux = 0 • 5. for each photon p { • 6. pd = direction of p • 7. phi = power of p • 8. flux += brdf(x, v, pd)*phi; • 9. } • 10. return flux/(2*pi*r^2) • 11. }

  18. Final Result:

  19. Another example = + Direct Illumination Indirect Illumination + = Specular Part

  20. Another example (cont’d) + Caustics =

  21. References • Henrik Wann Jensen: “Realistic Image Synthesis using Photon Maps”. • Henrik Wann Jensen: “Global Illumination using Photon Maps”. • Henrik Wann Jensen: “Rendering Caustics on Non Lambertian Surfaces”. • Michael Kaiser and Christian Finger: “Caustics Generation by using Photon Mapping” http://www.mpi-sb.mpg.de/units/nwg3/ws0304/lcn/projects/Michael/

More Related