Class RendParams

3DS Max Plug-In SDK

Class RendParams

See Also: Class Atmospheric, Class Effect, Class IRenderElementMgr, Class ToneOperator.

class RendParams

Description:

This class has a set of data members, and these parameters are passed to the renderer when the renderer is opened. All methods of this class are implemented by the system.

Data Members:

public:

RendType rendType;

The type of rendering to perform. See the List of Render Types for more information.

BOOL isNetRender;

Determines if this is a render on a network slave.

BOOL fieldRender;

If TRUE the image will be field rendered; otherwise frame rendered.

int fieldOrder;

The field order used. One of the following values:

0 specifies even.

1 specifies odd.

TimeValue frameDur;

This is used, for example, by video post. In video post you can stretch time. A video post frame might be 1/2 frame long for example. This data member defines the duration of one frame in TimeValue units.

BOOL colorCheck;

Determines if the color is ranged checked.

int vidCorrectMethod;

Video correction method. One of the following values:

0 specifies FLAG (with black).

1 specifies SCALE_LUMA (scale luminance).

2 specifies SCALE_SAT (scale saturation).

int ntscPAL;

Determines if the color is range checked using NTSC or PAL standards. One of the following values:

0 specifies NTSC.

1 specifies PAL.

BOOL superBlack;

If TRUE Super Black is used.

int sbThresh;

Specifies the Super Black threshold.

BOOL rendHidden;

If TRUE hidden objects are rendered.

BOOL force2Side;

If TRUE two sided materials are used for all items in the scene.

BOOL inMtlEdit;

If TRUE the rendering is taking place in the material editor.

float mtlEditTile;

If rendering is taking place in the material editor, scale tiling.

BOOL mtlEditAA;

If TRUE antialiasing should be done in the material editor.

BOOL multiThread;

This is used internally.

BOOL useEnvironAlpha;

If TRUE one should use alpha from the environment map.

BOOL dontAntialiasBG;

If the low-order bit is set don't antialias against the background (this is often used for 'sprites' in video games). For 3ds max 1.1 and 1.2 (in 2.0 and later see scanBandHeight below), this parameter may also be used to access the height of the abuffer in scan lines. This may be obtained using the following syntax:

  abufBandHeight = rendpar.dontAntialiasBG>>8

BOOL useDisplacement;

The apply displacement mapping setting.

bool useRadiosity;

This data member is available in release 4.0 and later only.

Indicates if radiosity should be included in rendering.

bool computeRadiosity;

This data member is available in release 4.0 and later only.

Indicates if radiosity should be computed before rendering.

Texmap *envMap;

The environment map. This may be NULL.

Atmospheric *atmos;

The atmosphere effects. This may be NULL. To the renderer it looks like there is only one atmosphere. You can use this atmosphere and it will go ahead and call all the individual atmospheric effects for you.

Effect *effect;

This data member is available in release 3.0 and later only.

The post-processing effects. This may be NULL if there aren't any.

RadiosityEffect* pRadiosity;

This data member is available in release 4.0 and later only.

Points to the radiosity effect.

ToneOperator* pToneOp;

This data member is available in release 4.0 and later only.

Points to the tone operator if present. This may be NULL

TCHAR biFileName[MAX_PATH];

This data member is available in release 4.0 and later only.

The bitmap output file name.

TimeValue firstFrame;

This data member is available in release 2.0 and later only.

This is the first frame that will be rendered. This lets Open() know the first frame that will be rendered, so it will not have to evaluate at frame 0 when building.

int scanBandHeight;

This data member is available in release 2.0 and later only.

This is the height of a scan band (for the default 3ds max scanline renderer).

ULONG extraFlags;

This data member is available in release 2.0 and later only.

RENDER_HIDE_FROZEN

This option is available in release 4.0 and later only.

Instruct the renderer to hide frozen objects

int width;

The image height.

int height;

The image width.

BOOL filterBG;

The filter background.

Methods:

Prototype:

RendParams();

Remarks:

Constructor. The initialization can be seen in the header file RENDER.H.

Prototype:

RenderMode GetRenderMode();

Remarks:

This method is available in release 4.0 and later only.

Returns the rendering mode. One of the following values:

RM_Default

This is being used for a normal rendering.

RM_IReshade

The render is being used for interactive reshading.

Prototype:

void SetRenderElementMgr(IRenderElementMgr *pIRenderElementMgr);

Remarks:

This method is available in release 4.0 and later only.

Sets the render element manager used.

Parameters:

IRenderElementMgr *pIRenderElementMgr

Points to the render element manager to set.

Prototype:

IRenderElementMgr *GetRenderElementMgr();

Remarks:

This method is available in release 4.0 and later only.

Returns a pointer to the render element manager interface.

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.