Class FrameRendParams
See Also: Class RendParams, Class Color, Class Point2.
class FrameRendParams : public BaseInterfaceServer
Description:
This is passed to the renderer on every frame. This provides information about the ambient light color, the background color, the duration of one frame, etc.
Data Members:
public:
Color ambient;
The ambient light color.
Color background;
The background color.
Color globalLightLevel;
This data member is available in release 2.0 and later only.
This is a multiplier that scales the brightness of all scene lights: it doesn't affect the ambient light level.
float frameDuration;
The duration of one frame in units of current frames. This describes how much scene time is used by one (video) frame time. For instance, in Video Post, you can scale time so it's stretched out or compressed. In this case, you may be rendering one frame to video, but because the scene is being run at a faster speed than normal, you in fact see say 2.5 frames of the scene. Things such as field rendering or motion blur must know about this so they know how long a frame is in terms of the time of the scene.
float relSubFrameDuration;
This data member is available in release 2.0 and later only.
This is the relative fraction of frameDuration used by a subframe. Within the frameDuration, if you're sub-dividing the rendering up into multiple frames for scene motion blur, this may be used.
For instance, say the duration (frames) is set to 0.5 and the duration subdivisions is 5, then this data member would be 0.1. This means that each subframe is effectively covering only 1/10th of the frame duration.
This value is always less than 1.0.
int regxmin, regxmax;
These values were members of Class RendParams prior to release 3.
The x min and max boundary values for render region or render blowup in device coordinates.
int regymin, regymax;
These values were members of Class RendParams prior to release 3.
The y min and max boundary values for render region or render blowup in device coordinates.
Point2 blowupCenter;
This parameter is available in release 3.0 and later only.
The 2D point at the center of the render blowup region.
Point2 blowupFactor;
This parameter is available in release 3.0 and later only.
The X and Y scale factors for render blowup.
Methods:
Prototype:
FrameRendParams();
Remarks:
Constructor. The frameDuration is set to 1.0 and relSubFrameDuration = 1.0f.
Prototype:
virtual INT_PTR Execute(int cmd, ULONG arg1=0, ULONG arg2=0, ULONG arg3=0);
Remarks:
This method is available in release 2.0 and later only.
This is a general purpose function that allows the API to be extended in the future. The 3ds max development team can assign new cmd numbers and continue to add functionality to this class without having to 'break' the API.
Parameters:
int cmd
The index of the command to execute.
ULONG arg1=0
Optional argument 1. See the documentation where the cmd option is discussed for more details on these parameters.
ULONG arg2=0
Optional argument 2.
ULONG arg3=0
Optional argument 3.
Return Value:
An integer return value. See the documentation where the cmd option is discussed for more details on the meaning of this value.