1 / 18

Introduction | Crepuscular rays and Caustics

Introduction | Crepuscular rays and Caustics. Caustics are high intensity highlights due to convergence of light via different paths Crepuscular rays (godrays) are formed by the in-scattering of light in dense participating media, like water Why are godrays and caustics important?

may-ratliff
Download Presentation

Introduction | Crepuscular rays and Caustics

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. Introduction |Crepuscular rays and Caustics • Caustics are high intensity highlights due to convergence of light via different paths • Crepuscular rays (godrays) are formed by the in-scattering of light in dense participating media, like water • Why are godrays and caustics important? • Both phenomena present in shallow water environments • They convey the presence of a dense volume • Define the proximity and direction of surface and lighting

  2. Introduction | Offline rendering • Caustics: • Bidirectional ray tracing • Particle tracing from light source (sun) • Local contribution to shading (no gathering step) • Godrays: • Ray marching - Integration of in/out-scattering functions over the line of sight in view direction. • Monte Carlo integration • Stratified sampling with constant jittering

  3. Moving to Real Time | Early Approaches • Caustics • Render the caustics as an animated texture • Projective texturing • Inverse tracing of rays to a light map above water using surface vertex data • Intersect geometric light shafts (polyhedra) with receiving geometry • Godrays • Render godrays as geometry “shafts” (polyhedra) • Sample a variable density function on planes parallel to the view plane.

  4. Moving to Real Time | Particle Tracing? • Generic GPU-based particle tracing: • Fully captures the effects • Unsuitable for real-time rendering (too slow) • Point-based particle tracing (splatting) • Can effectively model caustics • Replaces near-sample search (particle tracing) by point accumulation • The approach: • Considers light-space line segments • Intersects segments with Z-buffer • Accumulates point samples in frame buffer • Does not account for godrays

  5. Our Method | Introduction • Specialized particle tracing • Traces particles from the light through the water surface to the underwater part of the scene • Handles both caustics and godrays • Compatible with both direct and deferred rendering schemes

  6. Our Method | Overview • Render the scene (camera view)  depth buffer • Render the scene (light view)  shadow map • Create photon mask • Cast photons: • Generate coarse light-space point grid • Tesselate the grid • Cast photons and create refracted trajectories • Intersect trajectories with depth buffer  photon positions • Produce underwater godray line segments • Draw (image space splatted) photons  caustics • Draw (image space weighted) godrays • Filter caustics and godrays • Combine results Mask

  7. Frame Preparation • Rendering: • The scene is normally rendered • We record the frame buffer (in FBO) • The shadow map of the “sun” light source is captured • The above steps are standard to any rendering engine • Photon (shadow) mask: • The shadow map is compared with the water level • No photons will be cast for lit points above water level (outside the water volume) • Saves on calculations • Ensures proper shadowing for floating props Depth buffer Shadow map Mask

  8. Photon Tracing | Photon generation (in light space) • Render a coarse grid of points • In a geometry shader: • Tesselate grid • Generate primary ray • Produce refracted ray • Calculate intersection point between refracted ray and shadow map

  9. Photon Tracing | Intersection estimation • Uses an Newton-Rhapson-like image space (shadow map) estimator • Approximates the intersection point in two iterations: Water surface intersection A B Water surface intersection Initial estimate d second estimate Water surface intersection Initial estimate projection projection d final point

  10. Rendering the Caustics | Splatting • Splatting replaces the photon storage and search stage of conventional photon mapping • Photons are transformed to screen space and rendered as points • We splat the photons by perspectively varying the point primitive size: • Account for perspective foreshortening • Ensure adequate blending for photons near view plane • Avoid excessive overlap for distant photons • Points are attenuated according to distance from water surface (absorption) γ=9.2W/sr

  11. Rendering the Caustics | Splatting

  12. Rendering the Godrays • Godrays are rendered as line primitives in screen space • They are attenuated per fragment accounting for: • Fragment-to-eye absorption (out-scattering) • Surface-to-fragment absorption (out-scattering) • Light-to-viewing direction contribution (in-scattering) • Mie scattering is modeled by the Henyey-Greenstein phase function dfromViewer Line frags

  13. Post-Filtering • In low-intensity areas (poor photon concentration), aliasing may occur • The same goes for the godrays • Both buffers are post-filtered to spread the intensity • We use a rotating-kernel joint bilateral gaussian filter • Kernel size is modulated by depth

  14. Post-Filtering | Caustics Unfiltered Filtered

  15. Post-Filtering | Godrays Unfiltered Filtered

  16. Putting it All Together • Godrays + caustics + filtering + SSAO + shadows: 1440X850 @ 60+ fps • 800X600 @ 110+ fps

  17. Thank you! The work presented in this paper is funded by the Athens University of Economics and Business Special Account for Research Grants (EP-1600-10/00-1)

More Related