newspeoplefor developersdocumentationdownloads

3DSMax Toolkit
[Asset Toolchain (Import / Export)]


Detailed Description

This section of the documentation provides technical information on the Nebula 3DS Max Toolkit(aka. nmaxtoolbox) which used to create contents and tools with 3DS Max.

Overview

The Nebula 3DS Max Toolkit is a 3DS Max plugin dll. If you're not familiar with the programming of the 3DS Max plugin, it is highly recommended to read the 3DS Max SDK help file provided when the 3DS Max SDK is installed.

Note:
If you want to see the features of the toolkit and supported 3DS Max features or usages of the toolkit, see the toolkit manual which provides for the artists. The toolkit manual can be found on $nebula2/code/contrib/nmax/doc/artistdoc
A common way to start to write a 3DS Max plugin is to use SDK appwizard shipped and provided by 3DS Max SDK. But the Nebula provides its own libarary and classes which are more easy to use than the appwizard of the SDK. You should use this feature to write a 3DS Max plugin for Nebula. See registeredClassDesc for more details and its usages.

Components of the Toolkit

The toolkit consists of the followings for its components:

  • Exporter - 3DS Max exporter plugin for Nebula.
  • Nebula Script Function Expose System - plugin written based on 3DS Max Function Publishing System which enables to call Nebula script commands via MaxScript.
  • Max Script Generator - plugin which generates max script based on the given Nebula object.

Building the Plugin

nMaxToolBox was targeted at 3DS Max 6 or its higher versions. (though the toolkit has been mainly developed on 3DS Max 7).

When you develop a 3DS Max plug-ins, it is important to choose a proper compiler:

  • Microsoft Visual C++ 6 (VC 6) : It is not recommended.
  • Microsoft Visual C++ .NET 2002 (VC 7.0) : Recommended for 3DS Max 6.
  • Microsoft Visual C++ .NET 2003 (VC 7.1) : Recommended for 3DS Max 7.

Note:
There are link errors when nmaxtoolbox is built with 3ds max6 and vc7.1 on release mode. The error is caused by memory management incompatibility between the various versions of the Microsoft compilers, but it cannot be smoothly solved even with <MAX_Mem.h> which has been provided by Discreet as a solution to that problem, at the moment. So it is highly recommended to use VC 7.0 if you use 3DS Max 6.0.
If you use Microsoft Visual C++ .NET 2005(VC 8.0) with 3dsmax8, specify the following three steps before having futher steps:

a) Generated projects will not compile out of the box, because Max sdk uses a lot of loop variables checks like this:

    for (int i=...)
    {
    }
    do_something(i);

To make these compile, the "compliant for loop scope" option have to be turned off in 'C/C++ Properties' > 'Language'.

b) Runtime libraries need to be "Multithreaded DLL" and NOT multithreaded debug/multithreaded debug dll. Otherwise bad things will happen (memory problems/crashes/etc). So, if you want to be able to debug the plugin, you need to modify the settings for DEBUG configuration: change runtime libraries to "Multithreaded DLL" and remove _DEBUG preprocessor define for all projects, otherwise it will not link.

c) To use runtime libraries, manifest linking should be switched to "Yes", otherwise the plugin will not load.

Now it's time to build the package.

The following list shows the steps of building the plugin:

  1. Run update.tcl(or update.py) to generate workspace.
  2. Add the path of the 3DS Max SDK headers and libraries to your VC Project Directories.
  3. Build the plugin package and copy it to $3dsmax\plugins directory.
    • Generated plugin file, nmaxtoolbox.dlu can be found in $nebula2/bin/win32 or $nebula2/bin/win32d directory depending on your compile mode.
  4. Run 3DS Max.
    • copied plugin will automatically be loaded when you start up 3DS Max.

Note:
You may meet compile time errors which causes by ndirectshow and nmaxtoolkit package even nmaxtoolkit package does not use any ndirectshow functions. This problem is because both directshow and the Max SDK have a header file with the same name. In this case you need to rearrange your include directories to make sure that the platform sdk stuff is included before the Max SDK.

Debugging the Plugin

There is two way to debug the plugin. One for startup of the plugin and the other for exporting of the plugin.

  • Open Project Setting.
  • Under Configuration Properties select Debugging.
    • Set Command to point to 3dsmax.exe.(which is found in the directory where you intalled 3dsmax. i.e. c:/3dsmax7/3dsmax.exe)

The above is useful when you debug and see what happens when the 3dsmax loads the plugin. But with this, you can't debug exporting of the plugin. So there is other way to debug the plugin which enables you to debug process of exporing.

  • First, set break point where you want to debug.
  • Select Debug menu and click Process menu item.
  • This will bring the Process dialog.
    • Select 3dsmax.exe in the list view and click Connect button.
      • It brings the dialog which shows the list of programs to debug.
      • Select 'Native' then click 'Ok' and close the process dialog.
  • Start to export and the debugger will stop where you set the break point.

Now, you can set break point wherever you want to stop and debug the process of exporting.

Additional Notes

The Nebula2 3DS Max Toolkit was written on the native 3DS Max SDK not IGame library which provided by Discreet for easy writing of exporter. (previous Nebula2 3dsmax exporter was written based on the IGame libararay) The reason that the toolkit does not uses IGame libarary is that the library has some bugs and it is not regularly updated and it is nothing more than the wrapper of the exsiting SDK. So, for the reasons of those, the Nebula2 3DS Max Toolkit was written based on the native 3DS Max SDK which provided when the 3DS Max is installed.

(C)2005 Kim, Hyoun Woo


Classes

class  registeredClassDesc
class  nMaxLogHandler
 A class which redirects log messages to MAX log system from Nebula's. More...
class  nMaxAnimator
class  nMaxBoneManager
 Class for handling bones in the given scene. More...
class  nMaxCamera
 A class for exporting camera data of 3DS Max. More...
class  nMaxSampleKey
 A class for sampled key of a control. More...
class  nMaxControl
 A class for getting keys from controllers. More...
class  nMaxCustAttrib
 The class for handling 3dsmax custom attribute. More...
class  nMaxDummy
 A class for a dummy max object. More...
class  nMaxExport2
 A class for Nebula2 3DS Max export plugin. More...
class  nMaxFloatAnimator
 A class for exporting nVectorAnimator. More...
class  nMaxIKAnimator
 A class for handling Inverse Kinemetics(IK). More...
class  nMaxIntAnimator
 A class for exporting nIntAnimator. More...
class  nMaxInterface
 A wrapper class of 3dsmax Interface class. More...
class  nMaxLight
class  nMaxMaterial
 Class for exporting 3DS Max materials. More...
class  nMaxSkinMeshData
 Storage which contains skinned shape node and its group map id in its mesh data. It is needed when we do partitioning the mesh to specifies the fragments and joint palette for the skinned shape node. More...
class  nMaxMesh
 A class for exporting nShapeNode and its derive classes. More...
class  nMaxNode
 Base class of Nebula max object class which correspondes to each of the 3DS Max object. More...
class  nMaxAnimState
 A class which represents animation states. More...
class  nMaxNoteTrack
 Collect animation states and clips in note track of a max node. The collected animation states and clips are used when we build skin animator. More...
class  nMaxNullView
class  nMaxOptions
 A class for global options of the exporter. More...
class  nMaxScene
 A class for 3dsmax scene which to be exported. More...
class  nMaxSkinAnimator
 A class for exporting nSkinAnimator. More...
class  nMaxMeshFragment
 Do partitioning for skinned meshes and specifies its fragments and joint palette. More...
class  nMaxMeshFragment
 Do partitioning for skinned meshes and specifies its fragments and joint palette. More...
class  nMaxTexture
class  nMaxTransform
class  nMaxTransformAnimator
 A class for handling Position/Rotation/Scale(PRS) transform animation. More...
class  nMaxTransformCurveAnimator
 A class for handling path in 3dsmax. (This handles procedure controllers of 3dsmax). More...
class  nMaxUtil
class  nMaxUVAnimator
 A class for exporting nUvAnimator. More...
class  nMaxVectorAnimator
 A class for exporting nVectorAnimator. More...
class  nMaxVertexInfluence
class  nMaxDirDlg
 directory setting dialog More...
class  nMaxDlg
 Base class of plugin dialogs. More...
class  nMaxLogDlg
 Put log message out when exporting. Call nMaxLogDlg::Create() to create log dialog. More...
class  nMaxOptionParamMapDlg
 Nebula export option dialog in utility panel. More...
class  nMaxUtilityObj
 Nebula2 utility object plugin. More...
class  nMaxViewerOptions

Copyright © 1999-2005 by the contributing authors. Ideas, requests, problems: Send feedback.