3ds Max C++ API Reference
RendParams Class Reference

This class has a set of data members, and these parameters are passed to the renderer when the renderer is opened. More...

#include <RendParams.h>

+ Inheritance diagram for RendParams:

Public Types

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...
 
void SetRenderElementMgr (IRenderElementMgr *pIRenderElementMgr)
 Sets the render element manager used. More...
 
IRenderElementMgrGetRenderElementMgr () const
 Returns a pointer to the render element manager interface. More...
 
virtual INT_PTR Execute (int, ULONG_PTR=0, ULONG_PTR=0, ULONG_PTR=0)
 This is a general purpose function that allows the API to be extended in the future. More...
 
bool IsToneOperatorPreviewRender () const
 

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
 
bool simplifyAreaLights
 

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...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

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 node.

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;

Indicates if radiosity should be included in rendering.

bool computeRadiosity;

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;

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

RadiosityEffect* pRadiosity;

Points to the radiosity effect.

ToneOperator* pToneOp;

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

MCHAR biFileName[MAX_PATH];

The bitmap output file name.

TimeValue firstFrame;

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 is the height of a scan band (for the default 3ds Max scanline renderer).

ULONG extraFlags;

RENDER_HIDE_FROZEN

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.

Member Enumeration Documentation

◆ Execute_Commands

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.

142  {
145  kCommand_IsToneOpPreview = 0x4e80014c
146  };
@ kCommand_IsToneOpPreview
Queries whether this is a tone operator preview rendering.
Definition: RendParams.h:145

Constructor & Destructor Documentation

◆ RendParams()

RendParams ( )
inline

Constructor.

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

187  {
189  isNetRender = FALSE;
190  fieldRender = FALSE;
191  fieldOrder = 0;
192  frameDur = 0;
193  colorCheck = 0;
194  vidCorrectMethod = 0;
195  ntscPAL = 0;
196  superBlack = 0;
197  sbThresh = 0;
198  rendHidden = 0;
199  force2Side = 0;
200  inMtlEdit = 0;
201  mtlEditTile = 0;
202  mtlEditAA = 0;
203  multiThread = 0;
204  useEnvironAlpha = 0;
205  dontAntialiasBG = 0;
206  useDisplacement = 0;
207  useRadiosity = true;
208  computeRadiosity = true;
209  envMap = NULL;
210  atmos = NULL;
211  mpIRenderElementMgr = NULL;
212  effect = NULL;
213  pRadiosity = NULL;
214  pToneOp = NULL;
215  firstFrame = 0;
216  scanBandHeight = 0;
217  extraFlags = 0;
218  width=height = 0;
219  filterBG = 0;
220  simplifyAreaLights = false;
221  }
@ RENDTYPE_NORMAL
the entire view
Definition: RendType.h:34
#define NULL
Definition: autoptr.h:18
BOOL isNetRender
Definition: RendParams.h:150
float mtlEditTile
Definition: RendParams.h:163
TimeValue firstFrame
Definition: RendParams.h:176
RendType rendType
Definition: RendParams.h:148
BOOL superBlack
Definition: RendParams.h:158
int width
Definition: RendParams.h:179
BOOL useDisplacement
Definition: RendParams.h:168
BOOL dontAntialiasBG
Definition: RendParams.h:167
BOOL mtlEditAA
Definition: RendParams.h:164
int vidCorrectMethod
Definition: RendParams.h:156
int scanBandHeight
Definition: RendParams.h:177
BOOL useEnvironAlpha
Definition: RendParams.h:166
TimeValue frameDur
Definition: RendParams.h:153
BOOL filterBG
Definition: RendParams.h:180
Texmap * envMap
Definition: RendParams.h:171
int ntscPAL
Definition: RendParams.h:157
bool simplifyAreaLights
Definition: RendParams.h:182
ULONG extraFlags
Definition: RendParams.h:178
int fieldOrder
Definition: RendParams.h:152
Effect * effect
Definition: RendParams.h:173
ToneOperator * pToneOp
Definition: RendParams.h:175
BOOL rendHidden
Definition: RendParams.h:160
bool useRadiosity
Definition: RendParams.h:169
BOOL multiThread
Definition: RendParams.h:165
int height
Definition: RendParams.h:179
bool computeRadiosity
Definition: RendParams.h:170
int sbThresh
Definition: RendParams.h:159
BOOL colorCheck
Definition: RendParams.h:155
BOOL fieldRender
Definition: RendParams.h:151
RadiosityEffect * pRadiosity
Definition: RendParams.h:174
Atmospheric * atmos
Definition: RendParams.h:172
BOOL force2Side
Definition: RendParams.h:161
BOOL inMtlEdit
Definition: RendParams.h:162

◆ ~RendParams()

virtual ~RendParams ( )
inlinevirtual

Destructor.

224 {}

Member Function Documentation

◆ SetRenderElementMgr()

void SetRenderElementMgr ( IRenderElementMgr pIRenderElementMgr)
inline

Sets the render element manager used.

Parameters:
IRenderElementMgr *pIRenderElementMgr

Points to the render element manager to set.
230 { mpIRenderElementMgr = pIRenderElementMgr; }

◆ GetRenderElementMgr()

IRenderElementMgr* GetRenderElementMgr ( ) const
inline

Returns a pointer to the render element manager interface.

235  {
236  return( const_cast<RendParams&>(*this).Execute(RP_ANTIALIAS_OFF) ? NULL : mpIRenderElementMgr);
237  }
#define RP_ANTIALIAS_OFF
An index to an external command.
Definition: RendParams.h:232
This class has a set of data members, and these parameters are passed to the renderer when the render...
Definition: RendParams.h:135
virtual INT_PTR Execute(int, ULONG_PTR=0, ULONG_PTR=0, ULONG_PTR=0)
This is a general purpose function that allows the API to be extended in the future.
Definition: RendParams.h:254

◆ Execute()

virtual INT_PTR Execute ( int  ,
ULONG_PTR  = 0,
ULONG_PTR  = 0,
ULONG_PTR  = 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.
254 { return 0; }

◆ IsToneOperatorPreviewRender()

bool IsToneOperatorPreviewRender ( ) const
inline
260  {
261 
262  // Execute the special command on the render params
263  INT_PTR result = const_cast<RendParams&>(*this).Execute(kCommand_IsToneOpPreview);
264  return (result != 0);
265 }

Member Data Documentation

◆ rendType

RendType rendType

◆ isNetRender

BOOL isNetRender

◆ fieldRender

BOOL fieldRender

◆ fieldOrder

int fieldOrder

◆ frameDur

TimeValue frameDur

◆ colorCheck

BOOL colorCheck

◆ vidCorrectMethod

int vidCorrectMethod

◆ ntscPAL

int ntscPAL

◆ superBlack

BOOL superBlack

◆ sbThresh

int sbThresh

◆ rendHidden

BOOL rendHidden

◆ force2Side

BOOL force2Side

◆ inMtlEdit

BOOL inMtlEdit

◆ mtlEditTile

float mtlEditTile

◆ mtlEditAA

BOOL mtlEditAA

◆ multiThread

BOOL multiThread

◆ useEnvironAlpha

BOOL useEnvironAlpha

◆ dontAntialiasBG

BOOL dontAntialiasBG

◆ useDisplacement

BOOL useDisplacement

◆ useRadiosity

bool useRadiosity

◆ computeRadiosity

bool computeRadiosity

◆ envMap

Texmap* envMap

◆ atmos

Atmospheric* atmos

◆ effect

Effect* effect

◆ pRadiosity

RadiosityEffect* pRadiosity

◆ pToneOp

ToneOperator* pToneOp

◆ firstFrame

TimeValue firstFrame

◆ scanBandHeight

int scanBandHeight

◆ extraFlags

ULONG extraFlags

◆ width

int width

◆ height

int height

◆ filterBG

BOOL filterBG

◆ alphaOutOnAdditive

BOOL alphaOutOnAdditive

◆ simplifyAreaLights

bool simplifyAreaLights