3ds Max C++ API Reference
|
Encapsulates all that a render session needs to render a frame. More...
#include <IRenderSessionContext.h>
Classes | |
class | IChangeNotifier |
Notification callback interface for IRenderSessionContext. More... | |
Public Member Functions | |
Scene Definition | |
Returns the scene container, which wraps the set of objects to be rendered. | |
virtual const ISceneContainer & | GetScene () const =0 |
Returns the camera container, which abstracts the attributes of the camera to be rendered. More... | |
virtual const ICameraContainer & | GetCamera () const =0 |
Returns the camera container, which abstracts the attributes of the camera to be rendered. More... | |
virtual IEnvironmentContainer * | GetEnvironment () const =0 |
Returns the environment object, which encapsulates the definition of background and environment maps and colors. More... | |
virtual const IRenderSettingsContainer & | GetRenderSettings () const =0 |
Returns the render settings container, which encapsulates the options that affect the translation and rendering processes. More... | |
Default Lighting | |
Default lighting is used when there are no other sources of light in the scene. | |
virtual bool | GetDefaultLightingEnabled (const bool considerEnvironmentLighting, const TimeValue t, Interval &validity) const =0 |
Helper method for determining whether default lighting should be enabled. More... | |
virtual std::vector< DefaultLight > | GetDefaultLights () const =0 |
Returns the set of default lights to be used if there is no other source of lighting in the scene. More... | |
Process Management and Message Logging | |
Returns the interface used for reporting rendering/translation events and progress, as well as to executes jobs from the main thread. | |
virtual IRenderingProcess & | GetRenderingProcess () const =0 |
Returns the interface used for logging messages. More... | |
virtual IRenderingLogger & | GetLogger () const =0 |
Returns the interface used for logging messages. More... | |
RenderBegin() / RenderEnd() | |
Animatable::RenderBegin() must be called on scene objects before they are translated. | |
virtual void | CallRenderBegin (ReferenceMaker &refMaker, const TimeValue t)=0 |
Calls RenderBegin() on the given object and its entire reference sub-hierarchy. More... | |
virtual void | CallRenderEnd (const TimeValue t)=0 |
Calls RenderEnd() on every object for which CallRenderBegin() was called. More... | |
Frame Buffer Processing | |
virtual IFrameBufferProcessor & | GetMainFrameBufferProcessor ()=0 |
Returns the interface used to store data into the main frame buffer. More... | |
virtual void | UpdateBitmapDisplay ()=0 |
Refreshes the frame buffer window, after the frame buffer bitmap has been updated. More... | |
Node Evaluation | |
Provides methods to help evaluate node transforms, taking into account motion blur. | |
virtual MotionTransforms | EvaluateMotionTransforms (INode &node, const TimeValue t, Interval &validity, const MotionBlurSettings *node_motion_blur_settings=nullptr) const =0 |
Evaluates the transforms of the given node, taking motion blur into account. More... | |
virtual MotionBlurSettings | GetMotionBlurSettingsForNode (INode &node, const TimeValue t, Interval &validity, const MotionBlurSettings *global_motion_blur_settings=nullptr) const =0 |
Evaluates the motion blur settings associated with this node. More... | |
Miscellaneous | |
virtual std::vector< IRenderElement * > | GetRenderElements () const =0 |
Returns the set of render elements to be used by this session. More... | |
virtual std::vector< Atmospheric * > | GetAtmospherics () const =0 |
Returns the set of atmospherics to be used by this render session. More... | |
virtual Effect * | GetEffect () const =0 |
Returns the top-level render effect currently being used. More... | |
virtual IRenderSession * | GetRenderSession () const =0 |
Returns the render session to which this context is associated. More... | |
virtual NotificationAPI::IImmediateInteractiveRenderingClient * | GetNotificationClient () const =0 |
Returns the notification client to be used for monitoring scene changes. More... | |
virtual TranslationHelpers::INodeInstancingPool::IManager & | GetNodeInstancingManager () const =0 |
Returns the node instancing manager. More... | |
virtual ITranslationManager & | GetTranslationManager () const =0 |
Returns the translation manager. More... | |
virtual IPoint2 | SetDownResolutionFactor (const unsigned int factor)=0 |
Sets the down-resolution factor. More... | |
Notification | |
Registers a notifier callback, to be called when interactive changes occur. | |
virtual void | RegisterChangeNotifier (IChangeNotifier ¬ifier) const =0 |
Unregisters a notification callback, previously registered with RegisterChangeNotifier(). More... | |
virtual void | UnregisterChangeNotifier (IChangeNotifier ¬ifier) const =0 |
Unregisters a notification callback, previously registered with RegisterChangeNotifier(). More... | |
Protected Member Functions | |
virtual | ~IRenderSessionContext () |
Protected destructor prevents deletion through this interface. More... | |
Encapsulates all that a render session needs to render a frame.
This interface encapsulates the definition of the scene which is to be rendered by a render session. It also exposes functionality related to evaluating the scene and processing the frame buffer.
|
inlineprotectedvirtual |
|
pure virtual |
Returns the camera container, which abstracts the attributes of the camera to be rendered.
|
pure virtual |
Returns the camera container, which abstracts the attributes of the camera to be rendered.
|
pure virtual |
Returns the environment object, which encapsulates the definition of background and environment maps and colors.
|
pure virtual |
Returns the render settings container, which encapsulates the options that affect the translation and rendering processes.
|
pure virtual |
Helper method for determining whether default lighting should be enabled.
This method returns true if and only there are no sources of lighting in the scene (i.e. no light nodes). It may optionally consider the environment to be a source of illumination.
considerEnvironmentLighting | Set to true to consider a non-black environment to be a source of light. |
t | The TimeValue at which to determine whether lighting should be enabled. |
validity | [in, out] The validity of the returned value is intersected into the input value of this parameter. |
|
pure virtual |
Returns the set of default lights to be used if there is no other source of lighting in the scene.
|
pure virtual |
Returns the interface used for logging messages.
|
pure virtual |
Returns the interface used for logging messages.
|
pure virtual |
Calls RenderBegin() on the given object and its entire reference sub-hierarchy.
It's important to call this method on any Animatable before it's accessed for translation or rendering. The standard set of objects on which RenderBegin() should be called includes:
refMaker | The object on which to call RenderBegin(). |
t | The time at which the scene is being translated / rendered. If rendering multiple frames, this is the time of the first frame. |
Calls RenderEnd() on every object for which CallRenderBegin() was called.
This is called automatically by the system under the following conditions:
If needed - generally, if not using ITranslationManager for interactive rendering - the renderer may call this explicitly.
t | The time at which the scene has been last translated / rendered. If rendering multiple frames, this is the time of the last frame. |
|
pure virtual |
Returns the interface used to store data into the main frame buffer.
This interface provides functionality for efficiently transferring the renderer's own frame buffer into the 3ds Max frame buffer, optionally process the active ToneOperator.
|
pure virtual |
Refreshes the frame buffer window, after the frame buffer bitmap has been updated.
This method abstracts the different mechanism for updating the bitmap of an offline or interactive renderer.
|
pure virtual |
Evaluates the transforms of the given node, taking motion blur into account.
node | The node for which to evaluate the transforms. | |
t | The time at which to evaluate the node. | |
[in,out] | validity | The validity of the evaluated transforms is intersected into this. The validity of both transforms is taken into account correctly. |
node_motion_blur_settings | Optional, custom motion blur settings to be used when evaluating the node transforms. If null, the settings are obtained by calling GetMotionBlurSettingsForNode(). |
|
pure virtual |
Evaluates the motion blur settings associated with this node.
This method takes the global motion blur settings as input, modifies them according to the node's object properties, and returns the result. If, for example, the node's object properties disable motion blur, then motion blur will be disabled in the node's settings.
node | The node for which the motion blur settings are to be evaluated. |
t | The time at which to evaluate the motion blur settings. |
validity | [in, out] The validity of the evaluated settings is intersected into this. |
global_motion_blur_settings | Optional, global motion blur settings which are to be modified by the node's properties. If null, the global settings are obtained from ICameraContainer. |
|
pure virtual |
Returns the set of render elements to be used by this session.
|
pure virtual |
Returns the set of atmospherics to be used by this render session.
|
pure virtual |
Returns the top-level render effect currently being used.
In most cases this can be cast to a IRenderEffectsMgr, which wraps and manages the actual collection of render effects to be used.
|
pure virtual |
Returns the render session to which this context is associated.
|
pure virtual |
Returns the notification client to be used for monitoring scene changes.
|
pure virtual |
Returns the node instancing manager.
The node instancing manager is used for collecting those nodes which are all instances of the same geometric object. The complex logic, required to handle instancing correctly, is fully encapsulated by this interface.
|
pure virtual |
Returns the translation manager.
The translation manager is an optional component which may be used to manage the scene translation graph.
Sets the down-resolution factor.
The renderer plugin may decide that it wishes to lower the resolution at which the scene is rendered, e.g. to improve the performance of interactive renders in an adaptive manner. This method will set the factor at which the resolution is lowered, ensuring that all related scene properties are correctly affected - including the resolution, render region, image plane offset, etc.
factor | The factor by which the resolution is to be reduced. The internal default is 1, meaning that the resolution is not reduced. A value of 0 is not valid. A value greater than the resolution will be clamped. |
|
pure virtual |
Unregisters a notification callback, previously registered with RegisterChangeNotifier().
|
pure virtual |
Unregisters a notification callback, previously registered with RegisterChangeNotifier().