Public Types | Public Member Functions | Public Attributes

RendParams Class Reference

Search for all occurrences

Detailed 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:
RendType rendType;

The type of rendering to perform.

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

MCHAR 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.
See also:
Class Atmospheric, Class Effect, Class IRenderElementMgr, Class ToneOperator.

#include <render.h>

Inheritance diagram for RendParams:
Inheritance graph
[legend]

List of all members.

Public Types

enum   RenderMode { RM_Default, RM_IReshade }
 

Render modes.

More...
enum   Execute_Commands { kCommand_IsToneOpPreview = 0x4e80014c }
 

List of commands that can be passed to Execute()

More...

Public Member Functions

  RendParams ()
  Constructor.
virtual  ~RendParams ()
  Destructor.
RenderMode  GetRenderMode ()
  Returns the rendering mode.
void  SetRenderElementMgr (IRenderElementMgr *pIRenderElementMgr)
  Sets the render element manager used.
IRenderElementMgr GetRenderElementMgr ()
  Returns a pointer to the render element manager interface.
virtual INT_PTR  Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0)
  This is a general purpose function that allows the API to be extended in the future.
bool  IsToneOperatorPreviewRender ()

Public Attributes

RendType  rendType
BOOL  isNetRender
BOOL  fieldRender
int  fieldOrder
TimeValue  frameDur
BOOL  colorCheck
int  vidCorrectMethod
int  ntscPAL
BOOL  superBlack
int  sbThresh
BOOL  rendHidden
BOOL  force2Side
BOOL  inMtlEdit
float  mtlEditTile
BOOL  mtlEditAA
BOOL  multiThread
BOOL  useEnvironAlpha
BOOL  dontAntialiasBG
BOOL  useDisplacement
bool  useRadiosity
bool  computeRadiosity
Texmap envMap
Atmospheric atmos
Effect effect
RadiosityEffect pRadiosity
ToneOperator pToneOp
TimeValue  firstFrame
int  scanBandHeight
ULONG  extraFlags
int  width
int  height
BOOL  filterBG
BOOL  alphaOutOnAdditive

Member Enumeration Documentation

enum RenderMode

Render modes.

Enumerator:
RM_Default 

normal rendering mode

RM_IReshade 

render is being used for interactive reshading

List of commands that can be passed to Execute()

Enumerator:
kCommand_IsToneOpPreview 

Queries whether this is a tone operator preview rendering.

Execute() will return non-zero if it is indeed a preview render. None of the "arg" parameters are used.

                          {
        kCommand_IsToneOpPreview = 0x4e80014c
    };

Constructor & Destructor Documentation

RendParams ( ) [inline]

Constructor.

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

    {
        rendType = RENDTYPE_NORMAL;
        isNetRender = FALSE;
        fieldRender = FALSE;
        fieldOrder = 0;
        frameDur = 0;
        colorCheck = 0;
        vidCorrectMethod = 0;
        ntscPAL = 0;
        superBlack = 0;
        sbThresh = 0;
        rendHidden = 0;
        force2Side = 0;
        inMtlEdit = 0;
        mtlEditTile = 0;
        mtlEditAA = 0;
        multiThread = 0;
        useEnvironAlpha = 0;
        dontAntialiasBG = 0;
        useDisplacement = 0;
        useRadiosity = true;
        computeRadiosity = true;
        envMap = NULL;
        atmos = NULL;
        mpIRenderElementMgr = NULL;
        effect = NULL;
        pRadiosity = NULL;
        pToneOp = NULL;
        firstFrame = 0;
        scanBandHeight = 0;
        extraFlags = 0;
        width=height = 0;
        filterBG = 0;
#ifdef SIMPLIFY_AREA_LIGHTS
        simplifyAreaLights = false;
#endif
    }
virtual ~RendParams ( ) [inline, virtual]

Destructor.

{}

Member Function Documentation

RenderMode GetRenderMode ( ) [inline]

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.

{ return RM_Default; } // mjm - 06.08.00
void SetRenderElementMgr ( IRenderElementMgr pIRenderElementMgr ) [inline]

Sets the render element manager used.

Parameters:
IRenderElementMgr *pIRenderElementMgr

Points to the render element manager to set.
{ mpIRenderElementMgr = pIRenderElementMgr; } // mjm - 06.30.00
IRenderElementMgr* GetRenderElementMgr ( ) [inline]

Returns a pointer to the render element manager interface.

                                             { 
        return( Execute(RP_ANTIALIAS_OFF) ? NULL : mpIRenderElementMgr); 
    }
virtual INT_PTR Execute ( int  cmd,
ULONG_PTR  arg1 = 0,
ULONG_PTR  arg2 = 0,
ULONG_PTR  arg3 = 0 
) [inline, virtual]

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_PTR arg1=0

Optional argument 1. See the documentation where the cmd option is discussed for more details on these parameters.

ULONG_PTR arg2=0

Optional argument 2.

ULONG_PTR arg3=0

Optional argument 3.
Returns:
An integer return value. See the documentation where the cmd option is discussed for more details on the meaning of this value.
{ return 0; }
bool IsToneOperatorPreviewRender ( ) [inline]
                                                    {

    // Execute the special command on the render params
    INT_PTR result = Execute(kCommand_IsToneOpPreview);
    return (result != 0);
}

Member Data Documentation

RendType rendType
TimeValue frameDur
BOOL colorCheck
int ntscPAL
BOOL superBlack
int sbThresh
BOOL rendHidden
BOOL force2Side
BOOL inMtlEdit
float mtlEditTile
BOOL mtlEditAA
TimeValue firstFrame
ULONG extraFlags
int width
int height
BOOL filterBG

RendParams RendParams RendParams RendParams RendParams RendParams RendParams RendParams RendParams RendParams
RendParams RendParams RendParams RendParams RendParams RendParams RendParams RendParams RendParams RendParams