lecture11 - CSE472 Computer Graphics Fun with Ray Tracing...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CSE472 Computer Graphics Fun with Ray Tracing Review, what we do Shadows and shadow feelers Antialiasing Stochastic ray tracing Reflection Transmission Penumbra Depth of field
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 CSE472 Computer Graphics The Ray Tracing Process Render model into intersection data structure For each pixel Compute pixel color Set pixel color
Background image of page 2
3 CSE472 Computer Graphics Computing Ray Color // Compute the color for a ray color RayColor(ray) Test ray for intersection If(intersection) Determine for intersection: intersection point, normal, material, texture color color = compute-ambient-color foreach light color += compute-diffuse-color-from-light color += compuer-specular-color-from-light return color else return background-color
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 CSE472 Computer Graphics What you get…
Background image of page 4
5 CSE472 Computer Graphics This is nicer…
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 CSE472 Computer Graphics How do we get shadows? What is different about the light computation to get shadows?
Background image of page 6
7 CSE472 Computer Graphics Shadow Feelers Before we compute the color contribution for a light, shoot a ray in the light direction. Does it hit anything? Called a: “Shadow Feeler
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 CSE472 Computer Graphics Computing Ray Color // Compute the color for a ray color RayColor(ray) Test ray for intersection If(intersection) Determine for intersection: intersection point, normal, material, texture color color = compute-ambient-color foreach light if shadowfeeler does not hit anything color += compute-diffuse-color-from-light color += compuer-specular-color-from-light return color else return background-color
Background image of page 8
9 CSE472 Computer Graphics But, be careful or you might get: Stipple!
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10 CSE472 Computer Graphics Problems with numerical precision How are is this point from the polygon?
Background image of page 10
11 CSE472 Computer Graphics Problems with numerical precision
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
12 CSE472 Computer Graphics A little above or a little below Your intersection point will be rounded to the nearest float, double, whatever. Unlikely it will be on the polygon! If it’s above, no problem If it’s below, what happens to our shadow feeler? Term: Self-shadowing
Background image of page 12
13 CSE472 Computer Graphics Self-shadowing Solutions Ignore any intersection less than some small amount But, how small? What about corners? Ignore the polygon we are intersecting with.
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/25/2008 for the course CSE 472 taught by Professor Owen during the Spring '08 term at Michigan State University.

Page1 / 64

lecture11 - CSE472 Computer Graphics Fun with Ray Tracing...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online