The Unified Renderer

The Unified Renderer is the entry point to the renderer plugin. It is attached to and lives in the 3ds Max scene.

Unified Renderer

The Unified Renderer, implemented as class UnifiedRenderer, serves as the base class for a renderer plugin. It replaces classes Renderer and IInteractiveRenderer from the legacy API, and also integrates functionality from various extension classes. Its responsibilities are:

Implementing a Renderer Plugin

The plugin developer would start by creating a class that derives from UnifiedRenderer. All important methods have been made pure virtual in UnifiedRenderer, including core methods inherited from Animatable, ReferenceMaker, etc. The most important methods, defined by class UnifiedRenderer, which the plugin developer must implement, are:

virtual std::unique_ptr<IOfflineRenderSession> CreateOfflineSession(
    IRenderSessionContext& sessionContext) = 0;
virtual std::unique_ptr<IInteractiveRenderSession> CreateInteractiveSession(
    IRenderSessionContext& sessionContext) = 0;

These govern the creation of the offline and interactive render sessions, with which the actual rendering work is performed. The destruction of a render session is managed through the unique_ptr returned by these methods. The other important parts of the functionality (render settings, UI, file I/O, etc.) all use the standard mechanisms - generally the parameter block system.

Class Descriptor

Class UnifiedRenderer::ClassDescriptor is the base class from which the class descriptor of a UnifiedRenderer plugin must derive. Internally, it implements functionality related to filtering of compatible material and texture plugins.