COM/DCOM Interface

The idea behind this COM (Component Object Model) object is to expose the core of 3ds Max so applications can invoke 3ds Max to generate images. The whole implementation of the COM interface was done as a plug-in itself so developers have the option of enhancing it in any manner they wish. Not just by adding interfaces to this object but also by creating entire new objects using this implementation as a code base. The code is extensively documented and the test "Client Application" is also extensively documented in a way where even developers who don't have any experience with COM objects can make use of it. For those with experience, the 3ds Max COM interface is implemented entirely using ATL which makes it very simple to add and/or modify any aspect of the code.

COM Interfaces and their types are defined in an "IDL" file. They may be found in \MAXSDK\SAMPLES\GUP\COMSRV\COMSRV.IDL .

Registering 3ds Max as a DCOM Server

The following steps register 3ds Max as a DCOM server:

1) Build \MAXSDK\SAMPLES\UTILITIES\COMSRV.VCPROJ and copy the resulting COMSRVUI.DLU to the 3ds Max PLUGINS directory.

2) Start 3ds Max and go the Utility Panel. Choose More and pick COM/DCOM Server Control.

3) If the button in the comand panel says "Register" then click it, or if it says "Unregister", then do nothing (as 3ds Max is already registered).

Now 3ds Max is registered as a DCOM server and an instance of it can be created from any COM client.

It is also possible to register and unregister 3ds Max from the command line. There are two command line options that can be passed to 3ds Max:

3DSMAX -RegisterMAXRenderer

3DSMAX -UnregisterMAXRenderer

The MaxRenderer Interface

This is the main interface exported by this COM object. Through its methods you can load a 3ds Max scene, define the parameters for a resulting image, request 3ds Max to render any number of frames, collect the resulting images, and so on. The other interfaces defined are support interfaces used by the different methods of the 3ds Max Renderer Interface.

Properties

These properties are the same ones found in the 3ds Max API. They are exposed here so applications can query or define the different attributes of a scene to be rendered.

Methods

These methods are a superset of the methods found in the 3ds Max API. They encapsulate some of the API functions (specifically those related to rendering) in order to simplify the process as well as to isolate the foreign applications from classes and data not exposed.

The _ImaxRendererEvents() sink interface

Use this interface to receive notifications and events from 3ds Max.

The MaxBitmapInfo Interface

This interface is used to define the characteristics of the resulting image generated by 3ds Max. There are only properties. The only one that might need explanation is the Channels() property. Use this to define what types of special channels you want generated. These are in addition to the standard RGBA channels.