SharpGL learning notes (10) common light source types, creating light sources, sharpgl learning notes
In OpenGL, different types of lights can be created by combining the characteristics of the light source, such as color, position, and direction.
Common lighting types include:
Directonal)
Positional)
Attenuation Light Source
Spotlight
Next we use the light source in 3dsmax to simulate the corresponding type of OpenGL light source, rendering for everyone to have a quick impression.
Note that all the light effects in the following picture enable the projection effect. However, in OpenGL, the projection is not an incidental effect of the light. We need to perform some additional work.
The oriented light source in OpengGL refers to the light source that is set in an infinite distance. when the light is shining on an object, its direction is parallel. This feature is just equivalent to the parallel light in 3dsmax.
The position of the positioning light source in OpenGL determines the impact on the scene. This feature is equivalent to a bulb in 3dsmax.
The attenuation light source in OpenGL. The so-called attenuation refers to the light intensity of an object that is farther away from the light. This property is equivalent to the light source with the attenuation option enabled in 3dsmax, such as the bulb.
There is an obvious depth of field effect of brightness, and in the perspective, 3dsmax also marks the position of the attenuation of the near and remote points.
OpenGL spotlight refers to limiting positioning to a cone, that is, the stage spotlight effect in real life. This kind of lighting is an effect of cone illumination.
The corresponding spotlight is also available in 3dsmax, as shown in.
Original article, from "blog garden, pig weneng's blog": http://www.cnblogs.com/hackpig/