BackgroundFade
Synopsis
The BackgroundFade macro creates a DataObject that can be used as a static sky gradient background to a 3D Viewer window with an interpolated fade based on 4 RGB values at each corner.
Input Port
Parameters
depth
|
float
|
Distance background is from camera.
|
None
|
Upper_Left_Red
Upper_Left_Green
Upper_Left_Blue
|
float
|
RGB values for upper left corner of image.
|
UIslider
|
Upper_Right_Red
Upper_Right_Green
Upper_Right_Blue
|
float
|
RGB values for upper right corner of image.
|
UIslider
|
Lower_Left_Red
Lower_Left_Green
Lower_Left_Blue
|
float
|
RGB values for lower left corner of image.
|
UIslider
|
Lower_Right_Red
Lower_Right_Green
Lower_Right_Blue
|
float
|
RGB values for lower right corner of image.
|
UIslider
|
Output Port
out_fld
|
Mesh+Node_Data
|
Field containing Quad cell-set that is used as background.
|
out_obj
|
GDobject
|
Directly renderable output object.
|
Description
The BackgroundFade macro creates a DataObject that can be used as the background to a Viewer window. The controls allow the user to specify a colour fade across the background of the viewer. This allows scenes to contain a simulated sky backdrop.
The effect of a static viewer window background is produced by creating a field that contains a single square cell-set. This cell-set is sized so that it covers the viewer window and is slightly in front of the far clipping plane. The far clipping plane specifies the maximum distance that an object can be away from the camera before it is ignored. Therefore by placing the background slightly in front of the far clipping plane it should be behind everything else. The field is then placed into a DataObject and the transformation of the DataObject is locked. This ensures that the background is not transformed with the rest of the scene.
The background image is created by using node data. The BackgroundFade macro creates a set of node data with a triplet of RGB values at each corner of the square. AVS/Express interpolates between each of these RGB values as normal to create the colour fade effect that can be seen.
Example
Not available
File
v/geoms.v
See also related modules