Lens Flare |
The
lens flare element will create a picture object on the 3D window surface, which simulates light reflection in camera objective. The picture to be created is entered as the element's parameter. The picture is used as a common texture. Its size, therefore, should be a power of 2. The actual
texture smoothing will assert itself.
For the lens flare object other rules are valid than for usual 3D objects. X, Y and Z coordinates determine coordinates of light source (it need not be existing object). The new lens flare object is assigned to render group 14. The
depth writing and
depth test operations of a lens flare object are normally switched off.
The default scale of the lens flare object is determined by the lens flare picture dimensions. The default of the scale is set for the picture to be displayed undistorted. The lens flare object horizontal scale is set to object_X_scale = picture_real_width / 3D_window_real_width, vertical scale is set to object_Y_scale = picture_real_height / 3D_window_real_height. When changing the 3D window size the lens flare scale will remain unchanged. The picture will not be adapted to the new 3D window size.
The Z scale of the object determines relative distance of the lens flare picture from the screen center to the light source. Zero value of the Z scale means display lens flare in the screen center. When 1 value is used, lens flare will be displayed on coordinates of light source.
The last transformation parameter asserting itself in a lens flare object, is the rotation around the Z axis. Thus it is made possible to rotate the lens flare picture around its center.
Full Html Context Help of The Peter - Gemtree Software & Children Programming