English subtitles

← Specular Material - Interactive 3D Graphics

Get Embed Code
2 Languages

Showing Revision 2 created 05/24/2016 by Udacity Robot.

  1. There are quite a few materials that are nearly diffuse reflectors such as rough
  2. wood, newspaper, concrete, and mouse pad. However, a considerable number of
  3. surfaces are shiny or glossy. We call these specular materials. Examples include
  4. polish metals, plastics, polish wood, glass, glazed ceramics, and enamel paint.
  5. These materials look different when you view them different angles, so we need
  6. to take into account the direction from the surface to the eye. One standard way
  7. of simulating specular materials is called the Blinn-Phong Reflection Model
  8. named after its inventors, Jim Blinn and Bui Tuong Phong. The full model has a
  9. number of terms in it for self-shadowing and for a shininess factor called the
  10. Fresnel coefficent. But the simplest and most common form is this. Specular
  11. equals the maximum of N dot H or 0, whichever is larger, raised to a power. N is
  12. the surface normal, same as with diffuse material. H is called the half angle
  13. vector. Say, you're given a surface, a light source direction, and a viewer
  14. direction. How would you point a mirror so that the light reflected directly
  15. toward the viewer? The answer is the half angle vector, which is the vector
  16. halfway between these two directions, so that these two angles are equal. If the
  17. surface normal and the half angle are identical, then the surface is perfectly
  18. aligned to reflect light to the eye. So, N dot H would be 1, and all light is
  19. reflective. As the normal and the half angle diversion direction, N dot H
  20. becomes smaller. Once the angle between these vectors is 90 degrees, the
  21. contribution goes to 0. The maximum function here limits the inputs so that this
  22. value is never negative. We want to avoid it being negative because we're about
  23. to raise it to a power. The S factor here is the shininess or specular power,
  24. and has a range from 1 to infinity, though anything above 100 is not too much
  25. different. When you raise a fraction to a power, the result is smaller, and
  26. smaller still the higher the power. For example, 0.5 squared is 0.25, cubed, is
  27. 0.125, and so on. By raising this term to a higher power, the object appears
  28. shinier. We can see this in the graph of N dot H versus the specular intensity.
  29. As the cosine power rises, the slope becomes tighter and tighter and gets
  30. sharper. What the half angle represents is the distribution of microfacets on a
  31. surface. A microfacet is a way of thinking how a material reflects light. For
  32. example, a fairly smooth surface may look like this. Light coming in from one
  33. direction will bounce off the surface mostly in the reflection direction. A
  34. rougher surface will a lower shininess has a distribution of facets more like
  35. this and the light will still go in the reflection direction, but with a much
  36. wider dispersal. At this point, it's best for you to try out the specular power
  37. function and see how it responds. An example program that follows, you control
  38. the ambient, diffuse, and specular contributions. Try playing with the shininess
  39. and other controls to see their effects.