What's New: 3ds Max 2016 SDK

The 3ds Max 2016 SDK is binary backward compatible with the 3ds Max 2015 SDK. This means you can run plug-ins compiled with the 3ds Max 2015 SDK in 3ds Max 2016 (but not vice versa) without recompilation. The changes to the 3ds Max 2016 SDK are mostly additions and extensions.

See the SDK Requirements to know the platform requirements for building plug-ins in 3ds Max 2016.

MetaSL Support

MetaSL is no longer supported in 3ds Max 2016. This affects IShaderManager and IHLSLMaterialTranslator. To customize the viewport display in realistic mode, use HLSL directly.

OpenSubdiv Support

The OpenSubdiv modifier was introduced in the 3ds Max 2015 Extension.

SDK exposure can be found in the classes OpenSubdiv and OpenSubdivParameters.

A code sample exercising these classes can be found in maxsdk/samples/utilities/OpenSubdivTest.

Rendering

IRenderMessageManager.h is now public.

New class ThreadedProcessor (toneop.h). This extends the SDK, adding an interface that enables processing the tone operator in a separate thread. The Rendering API now makes use of this, whenever available, to avoid hogging the main thread.

New interface to access Oxygen ID services on A360 for cloud rendering: IAutodesk360.

Interface16::GetCurrentRenderView() - A new method that enables querying the view which is currently selected for rendering in the render panel.

GetRendViewID(), SetRendViewID() - These methods allow you to query render settings for any render mode (production, active shade, etc.) rather than just the current render mode.

Extension to Sky Environment SDK interface: IMRPhysicalSkyEnvironmentMap2 - This class represents the Mental Ray Physical Sky Environment Map, implemented by 3ds Max. SDK client code can get this interface by querying 3ds Max for the current environment map, then asking that object for this interface.

Physical Camera Feature

The new Physical Camera feature is exposed with the IPhysicalCamera class (IPhysicalCamera.h). This class includes methods for getting and setting the camera parameters (such as film width, effective focal length, crop zoom factor, and so on). See the SDK Reference for more information.

As part of this feature, there is a new ToneOperator2 class. The new interface adds methods which accept camera and view information, enabling the tone operator to fetch exposure parameters from the camera and to support features such as vignetting (which requires pixel coordinates).

XRef Changes

The new XRefMaterial override material feature is exposed in IXRefMaterial18.

Changes to the XRef Objects dialog are exposed in the IObjXRefManager16 methods: GetTracksStatus() and SetTracksStatus(). In addition, there are two new Object Xref Options: XREF_TRACKS_XREF (track will inherit the source), XREF_TRACKS_LOCAL (track will be local for editing).

EditPoly Changes

EditPoly now has support for hard & smooth edges:

MNMesh now supports colors in per-vertex and per-edge data channels, currently used in VDATA_COLOR and EDATA_COLOR channels to define colors to be used when displaying these items in the viewports (Crease Set colors and Hard/Smooth edges). Per-element data now may be PERDATA_TYPE_COLOR24 in addition to PERDATA_TYPE_FLOAT (see mesh.h).

New display flags (MNDISP_USE_VERTEX_COLORS and MNDISP_USE_EDGE_COLORS) may be set to display these colors in the viewports if these channels are present on the mesh. If these flags are set and no per-item color channels are defined, the items are drawn normally.

MNMesh now has several new Topology Utilities, smoothing group methods:

A new class extends EPolyMod: EPolyMod18.

Alembic Importer Support

New standard color IDs: kTrackbarCachedLineColor, kTrackbarCacheLineColor.

ATF Importer Support

Open recursively is now defined in maxcom.h: MAXCOM_GROUP_OPEN_RECURSIVELY.

Max Creation Graph Support

New asset type in AssetType.h: AssetType.kMaxCreationGraph

Chamfer Modifier Support

In mnmesh.h there is a new edge flag MN_EDGE_WAS_PROCESSED.

ParameterBlock Changes

New Flags

P_USE_NODE_OS_VALIDITY and P_USE_NODE_TM_VALIDITY

When specified, the validity interval of the param block will take into account that of the node parameter's transform (P_USE_NODE_VALIDITY) or object space/geometry pipeline (P_USE_NODE_OS_VALIDITY).

These new flags can be used in conjunction with any other PB2 parameter flag. They need to be specified as the second flag value (See P_READ_SECOND_FLAG_VALUE for details on the second per-parameter flag value).

P_READ_ONLY_ASSET
When set as a second PB2 param flag, this flag means that the asset is not retargetable and not editable via Maxscript (equivalent to P_READ_ONLY being set too).
P_ENUMERATE_AS_ASSET
This flag indicates that the parameter's value will be recognized and treated as an asset without extra code from the plug-in developer. For example, the plugin will not need to override Animatable::EnumAuxFiles() in order for the parameter's value to show up in the Asset Tracker System, to be archived, etc. This flag needs to be specified as the second flag value when declaring ParameterBlock2 parameters.
P_NO_MACRO_RECORDER
When set, changes to this parameter will not be recorded by the macro recorder. This can be useful when using P_USE_ACCESSOR_ONLY entries to control other parameters indirectly. This flag needs to be specified as the second flag value when declaring ParameterBlock2 parameters.

New Methods

SetValueByName(), GetValueByName()
These two new methods provide a way to get and set parameter values by name instead of ID.
GetParamDefByIndex()
This method's purpose is to provide an efficient way of iterating over parameter definitions without having to access the public data members directly. This is more efficient than the traditional way of calling GetParamDef(IndexToID(i)).

Other Changes

Get Value Methods Now Take Validity Intervals
All get value methods (such as GetInt()) now have validity intervals.
Set Value Methods Now Take Const Objects
Setters (the various SetValue() methods) now take references to const objects, enabling clients to write code which is const-correct and safer.

Graphics SDK Changes

New classes RenderWorldHandle, ICamera, CustomRenderStageHandle, and SimpleRenderGeometry are now exposed. These are demonstrated in new how-to samples for fragment systems. The new samples are:

New interfaces supporting ActiveShade renders: INoSignalCheckProgress, IAbortableRenderer.

New methods on TextureHandle to control Mipmap generation: SetAutoGenerateMipMaps() and GetAutoGenerateMipMaps().

New methods in HLSLMaterialHandle: InitializeWithResource(), SetBufferParameter().

IRenderView, IFixedViewportPipeline

The root entry for the fragment graph system is now exposed as IRenderView2. To acquire the IRenderView2 instance , use ViewExp18::GetRenderView(). With this interface, you can set customized background/shade fragments, and add customized post-shading/overlay fragments. Moreover, you can set your own override graph to the render view.

Other Changes

The IContainerObject16 Interface (in IContainerObject.h) provides support for control of how layer merges are handled.

Point2 XY() const - this function allows you to easily convert from Point3 to Point2.

Support for pinned layers is exposed in new methods in ILayerManagerEx: SetPinnedLayer(), GetPinnedLayer().

UtilExport MSTR CaptureCallStack() - this function walks the current call stack and for each level captures the source file name, line number, and method name.

Versioning

SDK release numbering is updated for this release:

GetAppID() in plugapi.h is now deprecated because it is no longer needed, as there is only one product version (Max Design no longer exists).