Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Graphics In4/MSc Computer Graphics Lecture Notes #15 Illumination III View Independent Rendering.

Similar presentations


Presentation on theme: "Computer Graphics In4/MSc Computer Graphics Lecture Notes #15 Illumination III View Independent Rendering."— Presentation transcript:

1 Computer Graphics In4/MSc Computer Graphics Lecture Notes #15 Illumination III View Independent Rendering

2 Computer Graphics In4/MSc 9/11/2007Lecture Notes #152 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.

3 Computer Graphics In4/MSc 9/11/2007Lecture Notes #153 1. Bidirectional Ray Tracing L A B C E* * * - these transports would be missed by conventional RT.

4 Computer Graphics In4/MSc 9/11/2007Lecture Notes #154 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.

5 Computer Graphics In4/MSc 9/11/2007Lecture Notes #155 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.

6 Computer Graphics In4/MSc 9/11/2007Lecture Notes #156 Bidirectional example Single Pass (Conventional RT)Two Pass (Bidirectional) Note : caustic due to red transparent ball

7 Computer Graphics In4/MSc 9/11/2007Lecture Notes #157 Bidirectional example 200 rays used in lighting pass400 rays used in lighting pass

8 Computer Graphics In4/MSc 9/11/2007Lecture Notes #158 Bidirectional example 800 rays used in lighting pass. Note: - improved caustic definition, - lighting effect of mirror, - reflection of caustic, - shadowing due to mirror lighting.

9 Computer Graphics In4/MSc 9/11/2007Lecture Notes #159 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.

10 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1510 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.

11 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1511

12 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1512

13 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1513

14 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1514 Radiosity method. Radiosity = amount of energy leaving a surface per unit area, per unit time ( W / m 2 ). Form factor ij = ratio of energy leaving surface j that arrives at surface i. The Radiosity problem : - Estimate the form factors - Solve for the entire scene.

15 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1515

16 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1516

17 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1517 Example form factors.

18 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1518

19 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1519 Estimation of form factor by projection of the object onto a hemicube

20 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1520

21 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1521

22 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1522

23 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1523

24 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1524

25 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1525

26 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1526 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.

27 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1527 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!

28 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1528 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.

29 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1529 Environment maps. 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. Escher’s gazing ball

30 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1530 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.

31 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1531 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.

32 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1532 Illumination maps. Simulate diffuse radiosity-type effects. –For a fraction of the cost ! –Popular in games. reflectanceilluminanceradiosity

33 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1533 Light maps in Quake. Can use much lower resolution for light map.

34 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1534 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.

35 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1535 Shadow maps.

36 Computer Graphics In4/MSc 9/11/2007Lecture Notes #1536 Bump maps. Instead of rendering small scale surface detail, use a texture map to perturb the surface normal. + =


Download ppt "Computer Graphics In4/MSc Computer Graphics Lecture Notes #15 Illumination III View Independent Rendering."

Similar presentations


Ads by Google