In openGL 3D graphs, it is possible to add lighting effects:
or
The lighting effect could be turned on by changing the Lighting Mode to Directional Mode. And its source direction and color could be customized.
Origin supports directional lighting mode.
The directional light is the simplest light, comparing with the spotlight and pointlight. The light rays of directional light are, to all intents and purposes, parallel, just like the light from the Sun. That means any ray approaching an object is always the same at angle. Also, for flat surfaces affected by a directional light, the degree of shading will be the same right across the surface.
The light source direction is defined by angles in both horizontal and vertical plane.
In the horizontal plane, zero degree means the light source comes from the east toward the west. With the degree increasing from 0 to 360, the light source rotates in a counterclockwise direction. For example, 90 degrees places the light source to the north of the unrotated surface.
In the vertical plane, zero degree places the light source at the horizon and shining horizontally. An angle of 90 degrees places the light source directly overhead and shining down onto the map and -90 degrees means the opposite.
The dynamic light source means that the light source is fixed according to the specified horizontal and vertical direction, and wouldn't rotate with the surface. In opposite,if this check box is unselected, the light source is fixed relative the surface. If the surface is rotated, the light rotates with it.
Press the "S" key while hovering on a 3D openGL graph. The cursor will change modes. Drag with your mouse or use arrow keys to change lighting source direction. |
Our visual perception is based on the reflection and absorption of light. That's why we can see the colorful world. For example, a sky appears blue in our eyes, this is because the atmosphere absorbs all colors in the visible light except blue. Since the blue reflected light is detected by our eyes, we say the sky is blue. To represent the lighting and render the 3D surface, Origin offers three different types of light colors to represent reflection, Ambient, Diffuse and Specular.
Origin uses a pure white light source. As White light is the effect of combining the visible colors of light in suitable proportions, when the white light shines on the surface, some of the light is absorbed based on the color of the surface material at the shone point, and some light is reflected as below three different types of light respectively.
In order to reflect the surface material color components evenly and objectively, these reflectivity colors should be specified as shades of gray generally. But specifying non-gray colors for the reflectivity can be used to present the special effects. For example, assume the Ambient reflectivity is set to pure red, and the Diffuse and Specular components are set to pure black. The Diffuse and Specular components are essentially disabled by setting their reflectivity color to black. The only light that is reflected to the viewer is red ambient light. Portions of the surface that lack a red component in the material color will appear black, since only red light is reflected to the viewer.
| Notes: By default, lighting is not supported on flatten surfaces, this is controlled by the system variable @OGLFL (default value = 0), but you can set the system variable @OGLFL to 1 to make lighting also supported on flatten surfaces(Run @OGLFL = 1 in command window or script window). This can be turn off later by running @OGLFL = 0, and when you restart Origin, the system variable will change back to the default value 0. |