1 / 15

Indire c t Diffuse and Glossy Illumination on the GPU

Indire c t Diffuse and Glossy Illumination on the GPU. István Lazányi László Szirmay-Kalos TU Budapest. Environment mapping. for ideal reflections. [Blinn & Newel, 1976]. Environment map = Fast approximation of environmental effects. Environment mapping. for ideal reflections. (original).

breck
Download Presentation

Indire c t Diffuse and Glossy Illumination on the GPU

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. Indirect Diffuse and Glossy Illumination on the GPU István LazányiLászló Szirmay-KalosTU Budapest

  2. Environment mapping for ideal reflections [Blinn & Newel, 1976] Environment map = Fast approximation of environmental effects

  3. Environment mapping for ideal reflections (original) If the environment is very (or infinitely) far…  skybox (enlarged)

  4. Environment mapping for ideal reflections If the environment is "close"… re-render environment map from the new reference point performance ?!

  5. Environment mapping for ideal reflections Note: (classic) environment mapping cannot deal with "large" objects  storing depth information in the environment map ray-traced [Approximate Ray-Tracing…, Eurographics 2005]

  6. Offline convolution:  preconvolved diffuse/specular map Environment mapping for diffuse & glossy reflections - classical Ideal reflection vs. indirect illumination: many sampling raysare necessary! Adding cosine-weighted contributions: = convolution

  7. Environment mapping for diffuse & glossy reflections – our proposal • Take an environment map • (with depth info. in the alpha channel) 2. Evaluate the convolution integral on the fly where Δωi (i=1..N) corresponds to the texels of the environment mapωi = ? from a point x

  8. Environment mapping for diffuse & glossy reflections – our proposal For the reference point: solid angles Δωican easily be calculated (no information is necessary about the environment! )

  9. Environment mapping for diffuse & glossy reflections – our proposal For an arbitrary point x: to calculate solid angle Δωi  distance r’ is known  but cosθ’ is unknown Instead of storing orientation information about the environment, assume that the movement is small  cosine value is approx. the same as in the reference point

  10. How about the bunny …? ? Environment mapping for diffuse & glossy reflections – our proposal Thus, localization means multiplying solid angle with a factor for each texel  precalculation of the convolution integral is not possible

  11. Environment mapping for diffuse & glossy reflections – our proposal To allow real-time calculation the environment map is downsampled by averaging neighboring texels. (e.g. 128 x 128  4 x 4) ≈ clustering the texels of the environment into larger area lights

  12. Results(Diffuse bunny) classical our proposal (75FPS @ 2x2, 20FPS @ 4x4)

  13. Results(Glossy bunny, s=10) classical our proposal

  14. Implementation //Illumination formula for N,V,L L = L / |L|; float a = kd * max(dot(N,L),0) (or texture lookup) float4 Lin = texCUBE(LREnvMap, I); float r = texCUBE(LREnvMap, I).a; float3 L = r * I – pos ; float r’ = length(L); float dw = dw_texel * r2 / r’2 return Lin * a * dw;

  15. Question time!

More Related