3ds Max C++ API Reference
IRenderSettingsContainer Class Referenceabstract

Abstracts the set of settings and parameters which may affect rendering. More...

#include <IRenderSettingsContainer.h>

Classes

class  IChangeNotifier
 Notification callback interface for IRenderSettingsContainer. More...
 

Public Types

enum class  RenderTargetType { MaterialEditor , ToneOperatorPreview , AnimationOrStill , Interactive }
 The type of target for which the render session was created. More...
 

Public Member Functions

virtual bool GetRenderOnlySelected () const =0
 Returns whether only selected objects should be rendered. More...
 
virtual bool GetRenderHiddenObjects () const =0
 
virtual bool GetHideFrozenObjects () const =0
 
virtual bool GetDisplacementEnabled () const =0
 
virtual TimeValue GetFrameDuration () const =0
 Returns the duration, in time ticks, of a single animation frame. More...
 
bool GetIsMEditRender () const
 Returns whether the session is rendering a preview for he material editor or browser. More...
 
virtual RenderTargetType GetRenderTargetType () const =0
 Returns the render target type for which the render session was created: offline, interactive, material editor, etc. More...
 
virtual RendererGetRenderer () const =0
 Returns the renderer from which the render session was created. More...
 
Exposure Control
virtual ToneOperatorGetToneOperator () const =0
 Returns the ToneOperator (a.k.a. More...
 
virtual float GetPhysicalScale (const TimeValue t, Interval &validity) const =0
 Returns the physical scale to be used. More...
 
Notification

Registers a notifier callback, to be called when interactive changes occur.

virtual void RegisterChangeNotifier (IChangeNotifier &notifier) const =0
 Unregisters a notification callback, previously registered with RegisterChangeNotifier(). More...
 
virtual void UnregisterChangeNotifier (IChangeNotifier &notifier) const =0
 Unregisters a notification callback, previously registered with RegisterChangeNotifier(). More...
 

Protected Member Functions

virtual ~IRenderSettingsContainer ()
 

Detailed Description

Abstracts the set of settings and parameters which may affect rendering.

This interface exposes commonly used render settings in a way that abstracts the differences between offline and interactive rendering. For offline rendering, most of these parameters are internally extracted from class RendParams. For interactive rendering, they are queried from the appropriate source.

Note that many of the classical 3ds Max rendering settings, from the common render settings panel, are not exposed here. Those parameters are, for the most part, considered specific to the legacy scanline renderer and are generally ignored by the Rendering API.

Member Enumeration Documentation

◆ RenderTargetType

enum RenderTargetType
strong

The type of target for which the render session was created.

Enumerator
MaterialEditor 

Preview render for the material editor or browser.

ToneOperatorPreview 

Preview render for the tone operator preview panel.

In this mode, the tone operator is applied as a post-process, and IRenderSettingsContainer::GetToneOperator() will return null.

AnimationOrStill 

A standard offline render, for a still or a series of animation frames.

Interactive 

Interactive rendering (a.k.a. ActiveShade), where the renderer must react to changes made by the user while the renderer is active.

109 {
111  MaterialEditor,
114  ToneOperatorPreview,
116  AnimationOrStill,
118  Interactive
119 };

Constructor & Destructor Documentation

◆ ~IRenderSettingsContainer()

virtual ~IRenderSettingsContainer ( )
inlineprotectedvirtual
101 {}

Member Function Documentation

◆ GetRenderOnlySelected()

virtual bool GetRenderOnlySelected ( ) const
pure virtual

Returns whether only selected objects should be rendered.

Remarks
This options is, internally, taken into account by ISceneContainer::GetGeometricNodes().

◆ GetRenderHiddenObjects()

virtual bool GetRenderHiddenObjects ( ) const
pure virtual

◆ GetHideFrozenObjects()

virtual bool GetHideFrozenObjects ( ) const
pure virtual

◆ GetDisplacementEnabled()

virtual bool GetDisplacementEnabled ( ) const
pure virtual

◆ GetFrameDuration()

virtual TimeValue GetFrameDuration ( ) const
pure virtual

Returns the duration, in time ticks, of a single animation frame.

This value is mostly useful for motion blur: it may be used to determine the time values for the shutter open and close times.

Remarks
Consider using ICameraContainer::GetGlobalMotionBlurSettings() to get shutter time values for motion blur.

◆ GetIsMEditRender()

bool GetIsMEditRender ( ) const
inline

Returns whether the session is rendering a preview for he material editor or browser.

18 {
20 }
@ MaterialEditor
Preview render for the material editor or browser.
virtual RenderTargetType GetRenderTargetType() const =0
Returns the render target type for which the render session was created: offline, interactive,...

◆ GetRenderTargetType()

virtual RenderTargetType GetRenderTargetType ( ) const
pure virtual

Returns the render target type for which the render session was created: offline, interactive, material editor, etc.

◆ GetRenderer()

virtual Renderer& GetRenderer ( ) const
pure virtual

Returns the renderer from which the render session was created.

◆ GetToneOperator()

virtual ToneOperator* GetToneOperator ( ) const
pure virtual

Returns the ToneOperator (a.k.a.

exposure control) plugin to be used by the render session.

Remarks
Consider letting the system process the ToneOperator, via IRenderSessionContext::GetMainFrameBufferProcessor().
Returns
The ToneOperator to be used by the render session, or null if none.

◆ GetPhysicalScale()

virtual float GetPhysicalScale ( const TimeValue  t,
Interval validity 
) const
pure virtual

Returns the physical scale to be used.

The physical scale is used to convert non-physical lighting quantities to physical ones, mainly textures used for environment lighting and self-illumination. For a self-illumination texture, the default physical scale of 1500 would map a white texel (RGB 1,1,1) to 1500⁄Π cd/m2 (477 cd⁄m2).

Note that the physical scale works in a backwards manner: rather than multiply non-physical values by the scale, physical values must be divide by the scale. This brings all values into generic, non-physical space. Following rendering, the ToneOperator internally multiplies all values by the physical scale, thus bringing all values values back to physical space. This backward implementation is meant to ensure compatibility with legacy, non-physical plugins which do not know about the physical scale. A simple alternative is to divide the frame buffer values, by the physical scale, before they are passed to the ToneOperator.

Parameters
tThe time at which to evaluate the physical scale.
validity[in, out] The validity of the returned value is intersected into the input value of this parameter.
Returns
The physical scale to be used for converting non-physical lighting values to physical ones.

◆ RegisterChangeNotifier()

virtual void RegisterChangeNotifier ( IChangeNotifier notifier) const
pure virtual

Unregisters a notification callback, previously registered with RegisterChangeNotifier().

◆ UnregisterChangeNotifier()

virtual void UnregisterChangeNotifier ( IChangeNotifier notifier) const
pure virtual

Unregisters a notification callback, previously registered with RegisterChangeNotifier().