150 likes | 416 Views
Shading. Surface can either (both) Emit light. E.g. light bult Reflect light. E.g. Mirror. Shading. Rendering equation Cannot solved in general Even by numerical method. Shading. Approximation of rendering equation Radiosity (slow) Ray tracing (slow) Phong Reflection Model
E N D
Shading Surface can either (both) Emit light. E.g. light bult Reflect light. E.g. Mirror
Shading Rendering equation Cannot solved in general Even by numerical method.
Shading Approximation of rendering equation Radiosity (slow) Ray tracing (slow) Phong Reflection Model similar to ray tracing Consider only single interaction (between light source & surface) Two independent parts of the problem Light source Reflection model (between light and material)
Shading How refection model works: Light directly to your eyes Light reflect from the surface Single/multiple interaction between rays and object.
Shading When light strikes a surface, Some of it is abosrbed, Some of it is reflected. If the surface is opaque, reflection and absorption account for all the light striking the surface. Surface is translucent, some light transmitted through the material (& interact with other objects).
Shading An object illuminated by white light appears red because it absorbs most of the incident light but reflects light in the red range of frequencies. A shiny object appears so because its surface is smooth. Conversely, a dull object has a rough surface. The shading of objects also depends on the orientation of their surfaces, a factor that is characterized by the normal vector at each point.
Classification of Surface Specular surface appear shiny because most of the light that is reflected is scattered in a narrow range of angle close to the angle of reflection. Mirrors are perfectly specular surfaces. Diffuse surfaces are characterized by reflected light being scattered in all directions. Perfectly diffuse surfaces scatter light equally in all directions and thus appear the same to all viewer. Translucent surfaces allow some light to pentrate the surface and to emerge from another location on the object. This process of refraction characterizes glass and water.
Light Source There are four basic types of light sources: Ambient Light. Point light Spot Lights Distance Light. We describe a source through a three component intensity or luminance function I=[Ir, Ig, Ib]
Ambient Light In some rooms, such as in certain classrooms or kitchens, the lights have been designed and positioned to provide uniform illumination throughout the room. This uniform lighting is called ambient light. Ia = [Iar, Iag, Iab]
Point Light An ideal point source emits light equally in all direction. I(p0) = [Ir(p0), Ig(p0), Ib(p0)]. i(p,p0) = I(p0) /|p-p0|2 Or i(p,p0) = I(p0) /a+bd+cd2 where d=|p-p0|
SpotLight Apex: ps Direction: Ls Angle: How rapidly the light intensity drops off: Cose. 0< < . Notice that cos = sl, l is the direction of the light, s is a vector from apex to the surface. The angle between s and l is . Both s and l are unit length.
Phong Reflection Model The model uses four vectors, l, n, v, r, to calculate a color for an arbitrary point p on the surface. l: point from p to the light. N: normal of p on the surface V: point from p to the eye. R: reflection vector for the vector from light to p.
Phong Model The Phong model supports the three types of material-light interactions: ambient, diffuse, and specular. Suppose that we have a set of point sources. We assume that each source can have separate ambient, diffuse, and specular components for each of the three primary color. We need 9 coefficients to characterize these terms at any point p on the surface. Li=
Phong Model For each point, we have 9 coefficients that we can place in matrix of reflection terms of the form: Ri = We can then compute the contribution for each color source by adding the ambient, diffuse, and specular components. E.g. The red intensity that we see at p from source i: Iir = RiraLira +RirdLird+RirsLirs=Iira+Iird+Iirs