1 / 36

Computer Graphics

Computer Graphics. Lecture Notes #15 Illumination III View Independent Rendering. We’ll look at two methods. Bidirectional ray tracing In addition to backward ray tracing (last lecture) we perform forward ray tracing, from light sources – often identical code for each direction.

kasen
Download Presentation

Computer Graphics

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. Computer Graphics Lecture Notes #15 Illumination III View Independent Rendering

  2. We’ll look at two methods • Bidirectional ray tracing • In addition to backward ray tracing (last lecture) we perform forward ray tracing, from light sources – often identical code for each direction. • Problem is to match up rays for full transport of light. • Radiosity • Models diffuse interactions between surfaces. • Considers whole scene at once, each polygon a source. • Both do not require the ambient intensity hack. Lecture Notes #15

  3. A * E L B * * - these transports would be missed by conventional RT. C 1. Bidirectional Ray Tracing Lecture Notes #15

  4. Bidirectional Ray Tracing Forward ray tracing – source to surfaces, illuminates surfaces. Backward (conventional) ray tracing – eye to surfaces, sees lit surfaces. Accumulate photon hits for surface intensity – render from eye pt. Lecture Notes #15

  5. Bidirectional Ray Tracing • Computationally expensive. • Much more accurate model though. • Real problem is number of photons to trace. • Can use refinement methods: • Trace so many photons, render and check… • and so on until rendering acceptable. • Area sampling techniques can be used. Lecture Notes #15

  6. Bidirectional example Single Pass (Conventional RT) Two Pass (Bidirectional) Note : caustic due to red transparent ball Lecture Notes #15

  7. Bidirectional example 200 rays used in lighting pass 400 rays used in lighting pass Lecture Notes #15

  8. Bidirectional example • 800 rays used in lighting pass. • Note: • - improved caustic definition, • - lighting effect of mirror, • reflection of caustic, • shadowing due to mirror • lighting. Lecture Notes #15

  9. Summary of bidirectional RT • Trace rays from light source to surfaces. • Gives secondary lighting and caustics that conventional ray tracing misses. • Accumulate surface hits – may require large number of hits for adequate intensity. • Code for both ray trace directions can be identical. Lecture Notes #15

  10. 2. Radiosity method. • Calculates diffuse terms by considering scene as a whole and accounting for inter-object reflections. • View independent method. • Ray tracing represents light as rays shot from one point to another. • Radiosity considers how the total light energy in the scene is distributed among the surfaces. • Light sources are not treated differently in radiosity – every surface is a light source. Lecture Notes #15

  11. Lecture Notes #15

  12. Lecture Notes #15

  13. Lecture Notes #15

  14. Radiosity method. Radiosity = amount of energy leaving a surface per unit area, per unit time ( W / m2 ). Form factorij = ratio of energy leaving surface j that arrives at surface i. The Radiosity problem : - Estimate the form factors - Solve for the entire scene. Lecture Notes #15

  15. Lecture Notes #15

  16. Lecture Notes #15

  17. Example form factors. Lecture Notes #15

  18. Lecture Notes #15

  19. Estimation of form factor by projection of the object onto a hemicube Lecture Notes #15

  20. Lecture Notes #15

  21. Lecture Notes #15

  22. Lecture Notes #15

  23. Lecture Notes #15

  24. Lecture Notes #15

  25. Lecture Notes #15

  26. Comparison of Illumination techniques • Using a grammar to define the path of light (due to Heckbert): • L (source); D (diffuse refl.); S (specular refl.); E (eye/view point). • Ray tracing handles: • LE; LS*E; LDS*E • Radiosity handles: • LE; LD*E • Polygon renderers handle: • LE; LDE • Bidirectional ray tracing handles: • LE; LS*E; LDS*E; LD*E; and LS*DS*E • and, in general, L(S|D)*E, but D* not so interesting. Lecture Notes #15

  27. Summary of Global illumination. • Simulate interactions between objects. • Shadows. • Reflections. • Refraction. • Diffuse inter-reflections. • Need good object material information. • Non real-time, non interactive…but, as ever in computer graphics, we can cheat! Lecture Notes #15

  28. How to cheat ! • Can use texture mapping to replicate global illumination effects in a scanline renderer. • Reflections : • Environment maps • Shadows : • Shadow buffer method. • Diffuse effects : • Light maps. • Surface details • Bump maps. Lecture Notes #15

  29. Environment maps. Escher’s gazing ball • Capture, or render an image corresponding to the reflection of the scene in a sphere centered at the object. • Calculate texture coordinates corresponding to a reflective mapping. • Image indexed by surface normal. • Maps entire field of view to circle. • Resolution depends upon orientation. Lecture Notes #15

  30. Environment mapping. • Calculate texture coordinates mapping reflection image to model • Need to re-calculate with viewer motion. • Very much an approximation to reflection • Object doesn’t reflect itself • No change in reflection with position change. Lecture Notes #15

  31. Cubical environment map. • Produce from 6 perspective images. • Possible to produce using standard renderer, or from photographs. • More uniform resolution than spherical map. • Easy texture coordinate calculation. Lecture Notes #15

  32. Illumination maps. • Simulate diffuse radiosity-type effects. • For a fraction of the cost ! • Popular in games. reflectance illuminance radiosity Lecture Notes #15

  33. Light maps in Quake. Can use much lower resolution for light map. Lecture Notes #15

  34. Shadow maps. • Calculate shadows by rendering scene from the point of view of the light source. • Test each face with the z-buffer to see if it is the closest object and hence not in shadow. • If not closest – no light contribution. • Accumulate result into texture map, multiply by surface colour. Lecture Notes #15

  35. Shadow maps. Lecture Notes #15

  36. = + Bump maps. • Instead of rendering small scale surface detail, use a texture map to perturb the surface normal. Lecture Notes #15

More Related