Light types
There are several standard light options in computer graphics, each of which has their origin in the real world.
- Directional Light: Sends light rays in a single direction. The sun is a directional light.
The sun is a point light that puts out light in all directions, but for computer modeling, you can consider it a directional light. It’s a powerful light source a long way away. By the time the light rays reach the earth, the rays appear to be parallel. Check this outside on a sunny day — everything you can see has its shadow going in the same direction.
- Point Light: Sends light rays in all directions like a light bulb.
- Spotlight: Sends light rays in limited directions defined by a cone. A flashlight or a
desk lamp would be a spotlight.
Reflection Model
- Diffuse(漫反射):
In theory, light coming at a surface bounces off at an angle reflected about the surface normal at that point. However, surfaces are microscopically rough, so light bounces off in all directions as the picture above indicates. This produces a diffuse color where the light intensity is proportional to the angle between the incoming light and the surface normal. In computer graphics, this model is called Lambertian reflectance named after Johann Heinrich Lambert who died in 1777. In the real-world, this diffuse reflection is generally true of dull, rough surfaces, but the surface with the most Lambertian property is humanmade:Spectralon(https://en.wikipedia.org/wiki/Spectralon), which is used for optical components.
- Specular(镜面反射): The smoother the surface, the shinier it is, and the light bounces off the surface in fewer directions. A mirror completely reflects off the surface normal without deflection. Shiny objects produce a visible specular highlight, and rendering specular lighting can give your viewers hints about what sort of surface an object is — whether a car is an old wreck or fresh off the sales lot.
- Ambient(环境反射): In the real-world, light bounces around all over the place, so a shadowed object is rarely entirely black. This is the ambient reflection.