RendParams Class Reference

RendParams Class Reference

#include <render.h>

Class 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.
+ Inheritance diagram for RendParams:

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. More...
 
virtual ~RendParams ()
 Destructor. More...
 
RenderMode GetRenderMode ()
 Returns the rendering mode. More...
 
void SetRenderElementMgr (IRenderElementMgr *pIRenderElementMgr)
 Sets the render element manager used. More...
 
IRenderElementMgrGetRenderElementMgr ()
 Returns a pointer to the render element manager interface. More...
 
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. More...
 
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
 
TexmapenvMap
 
Atmosphericatmos
 
Effecteffect
 
RadiosityEffectpRadiosity
 
ToneOperatorpToneOp
 
TimeValue firstFrame
 
int scanBandHeight
 
ULONG extraFlags
 
int width
 
int height
 
BOOL filterBG
 
BOOL alphaOutOnAdditive
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Member Enumeration Documentation

enum RenderMode

Render modes.

Enumerator
RM_Default 

normal rendering mode

RM_IReshade 

render is being used for interactive reshading

282  {
283  RM_Default,
284  RM_IReshade,
285  };
render is being used for interactive reshading
Definition: render.h:284
normal rendering mode
Definition: render.h:283

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.

288  {
291  kCommand_IsToneOpPreview = 0x4e80014c
292  };
Queries whether this is a tone operator preview rendering.
Definition: render.h:291

Constructor & Destructor Documentation

RendParams ( )
inline

Constructor.

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

337  {
339  isNetRender = FALSE;
340  fieldRender = FALSE;
341  fieldOrder = 0;
342  frameDur = 0;
343  colorCheck = 0;
344  vidCorrectMethod = 0;
345  ntscPAL = 0;
346  superBlack = 0;
347  sbThresh = 0;
348  rendHidden = 0;
349  force2Side = 0;
350  inMtlEdit = 0;
351  mtlEditTile = 0;
352  mtlEditAA = 0;
353  multiThread = 0;
354  useEnvironAlpha = 0;
355  dontAntialiasBG = 0;
356  useDisplacement = 0;
357  useRadiosity = true;
358  computeRadiosity = true;
359  envMap = NULL;
360  atmos = NULL;
361  mpIRenderElementMgr = NULL;
362  effect = NULL;
363  pRadiosity = NULL;
364  pToneOp = NULL;
365  firstFrame = 0;
366  scanBandHeight = 0;
367  extraFlags = 0;
368  width=height = 0;
369  filterBG = 0;
370 #ifdef SIMPLIFY_AREA_LIGHTS
371  simplifyAreaLights = false;
372 #endif
373  }
Atmospheric * atmos
Definition: render.h:320
BOOL superBlack
Definition: render.h:306
float mtlEditTile
Definition: render.h:311
int width
Definition: render.h:327
BOOL filterBG
Definition: render.h:328
#define NULL
Definition: autoptr.h:20
ToneOperator * pToneOp
Definition: render.h:323
BOOL inMtlEdit
Definition: render.h:310
Texmap * envMap
Definition: render.h:319
BOOL useEnvironAlpha
Definition: render.h:314
int vidCorrectMethod
Definition: render.h:304
BOOL fieldRender
Definition: render.h:299
BOOL mtlEditAA
Definition: render.h:312
RendType rendType
Definition: render.h:294
the entire view
Definition: RendType.h:36
TimeValue frameDur
Definition: render.h:301
ULONG extraFlags
Definition: render.h:326
BOOL dontAntialiasBG
Definition: render.h:315
Effect * effect
Definition: render.h:321
BOOL isNetRender
Definition: render.h:298
int fieldOrder
Definition: render.h:300
BOOL useDisplacement
Definition: render.h:316
bool computeRadiosity
Definition: render.h:318
bool useRadiosity
Definition: render.h:317
TimeValue firstFrame
Definition: render.h:324
int scanBandHeight
Definition: render.h:325
BOOL multiThread
Definition: render.h:313
int ntscPAL
Definition: render.h:305
int sbThresh
Definition: render.h:307
BOOL rendHidden
Definition: render.h:308
BOOL colorCheck
Definition: render.h:303
RadiosityEffect * pRadiosity
Definition: render.h:322
int height
Definition: render.h:327
BOOL force2Side
Definition: render.h:309
virtual ~RendParams ( )
inlinevirtual

Destructor.

376 {}

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.

383 { return RM_Default; }
normal rendering mode
Definition: render.h:283
void SetRenderElementMgr ( IRenderElementMgr pIRenderElementMgr)
inline

Sets the render element manager used.

Parameters:
IRenderElementMgr *pIRenderElementMgr

Points to the render element manager to set.
388 { mpIRenderElementMgr = pIRenderElementMgr; }
IRenderElementMgr* GetRenderElementMgr ( )
inline

Returns a pointer to the render element manager interface.

393  {
394  return( Execute(RP_ANTIALIAS_OFF) ? NULL : mpIRenderElementMgr);
395  }
#define NULL
Definition: autoptr.h:20
#define RP_ANTIALIAS_OFF
An index to an external command.
Definition: render.h:390
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.
Definition: render.h:412
virtual INT_PTR Execute ( int  cmd,
ULONG_PTR  arg1 = 0,
ULONG_PTR  arg2 = 0,
ULONG_PTR  arg3 = 0 
)
inlinevirtual

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.
412 { return 0; }
bool IsToneOperatorPreviewRender ( )
inline
418  {
419 
420  // Execute the special command on the render params
421  INT_PTR result = Execute(kCommand_IsToneOpPreview);
422  return (result != 0);
423 }
Queries whether this is a tone operator preview rendering.
Definition: render.h:291
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.
Definition: render.h:412

Member Data Documentation

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