Renderers

 

   

Lighting And Rendering - Quick Navigation

Renderers is a Structure of systemGlobals. It lets the user assign renderer class instances to the current, production, Material Editor and activeShade renderer:

renderers.current

Get/Set the current renderer.

   

renderers.production

Get/Set the production renderer.

   

renderers.activeShade

Get/Set the activeShade renderer. Only renderers whose property supportsActiveShade is true can be set as the activeShade renderer!

   

renderers.medit_locked

Controls the state of the "Lock To Current Renderer" checkbutton next to the Material Editor slot in the Common tab > Assign Renderer rollout in the Render Scene dialog. When set to True , the Production Renderer will be used automatically by the Material Editor. When set to False , the Material Editor renderer can be set independently from the Production Renderer.

   

renderers.medit

Get/set the Material Editor renderer.

   

renderers.GetDraftRenderer()

Returns the draft renderer.

While the draft renderer is not exposed or used by 3ds Max anymore since version 6, it is possible that a renderer is assigned as the draft renderer. If that renderer is an instance of a 3 rd party plug-in and you load the scene file on a computer without that plug-in installed, you will get missing plug-in messages and no way to get rid of them.

Available in 3ds Max 2008 and higher. Previously available in Avguard Extensions.

NOTE:

Getting the draft renderer will cause a new default renderer to be created and set as the draft renderer if there is no current draft renderer.

   

renderers.ClearDraftRenderer()

Removes the draft renderer if present.

While the draft renderer is not exposed or used by 3ds Max anymore since version 6, it is possible that a renderer is assigned as the draft renderer. If that renderer is an instance of a 3 rd party plug-in and you load the scene file on a computer without that plug-in installed, you will get missing plug-in messages and no way to get rid of them.

Available in 3ds Max 2008 and higher. Previously available in Avguard Extensions.

Renderer class instances are creatable by MAXScript. They have a couple of common read-only properties which can be used to determine if the renderer can be used to perform certain special tasks as ActiveShade rendering and TextureBaking.

   

RendererClass Instances Common Properties:

<RendererClassInstance>.supportsActiveShade

Returns true if renderer can be used as ActiveShade renderer, false otherwise. Read-only.

   

<RendererClassInstance>.supportsTexureBaking

Returns true if renderer supports Texture Baking, false otherwise. Read-only.

To acquire a list of all installed renderers on a specific system, you can access the .classes property of the RendererClass MAXSuperClass.

EXAMPLE

RendererClass.classes
#(Default_Scanline_Renderer, VUE_File_Renderer, mental_ray_Renderer, Missing_Renderer)
--You can assign a new renderer class to the current renderer
renderers.current = RendererClass.classes[2]()
VUE_File_Renderer:VUE_File_Renderer

   

Material/Map Renderer Compatibility Method:

areMtlAndRendererCompatible {<mtlbase> | <maxclass>} [ renderer:{<renderer> | <maxclass>} ]

Returns true if the material/texturemap and renderer are compatible. Material/texturemap and renderer can be specified as instances or MAXClasses. If the renderer is not specified, the current renderer is tested against.

EXAMPLE

 --Check Mental_Ray material against Scanline Renderer --They are not compatible!
theMat = Mental_Ray()
mental_ray:mental_ray
theRenderer = Default_Scanline_Renderer()
Default_Scanline_Renderer:Default_Scanline_Renderer
areMtlAndRendererCompatible theMat renderer:theRenderer
false
--Check a Standard material against Scanline Renderer --They are compatible!
theMat = Standard()
Standardmaterial:Standard
areMtlAndRendererCompatible theMat renderer:theRenderer
true

See Also