Moving from IPAS to MAX Plug-In Development

3DS Max Plug-In SDK

Moving from IPAS to MAX Plug-In Development

See Also: Plug-In Types Overview, Plug-In Architecture Overview.

Overview

This topic is provided as an aide to IPAS programmers making the transition to 3ds max plug-in development. This section discusses the similarities and differences in the IPAS and 3ds max programming architectures. The changes in development environment, plug-in/system control flow, user interface, and graphics programming support are reviewed. This section also discusses the six types of IPAS routines possible under 3D Studio DOS and how they may be implemented under the 3ds max plug-in architecture.

Development Environment

IPAS routines were developed in 3D Studio DOS using the C programming language with the MetaWare or Watcom compilers. In MAX, development is done using the C++ programming language with Microsoft Visual C++ 5.0 under Windows NT. The 3ds max architecture is an object-oriented system that provides a comprehensive set of classes that developers can combine and extend to create seamlessly integrated plug-in applications. See the section Writing Plug-In Applications for more information on the basics of 3ds max development.

Control Flow

IPAS plug-ins would completely take over control of 3D Studio DOS. When the IPAS routine started it had exclusive control and maintained this control until the user exited the routine. This forced the user to leave the familiar program interface and work with a separate and different interface with each IPAS routine. This is not the case in 3ds max. Most 3ds max plug-ins are modeless in operation. This means their operation comes in and out of focus as the system requires processing on their part. The user is free to operate the remainder of the standard 3ds max interface even as the plug-in has its user interface up. In this way the user never leaves their familiar working environment.

User Interface

3ds max provides a set of custom controls that provide a consistent user interface between the plug-in and the system. This provides a level of familiarity for users who often use many different plug-ins. See the Advanced Topics section Custom Controls for more details on user interface implementation in MAX.

IPAS provided a set of graphic functions that let developers access the screen directly and use standard dialogs. These were the GFX calls such as gfx_xorline, gfx_c_blitput, and gfx_file_selector. Most of these functions were low level (get/put pixel, draw line, etc.), but there are also a number of higher-level interface routines, such as standard 3D Studio file selectors, material selectors and other commonly used dialogs. These capabilities are provided by 3ds max as well. Review the section Interactive Renderer: Graphics Window for details on the low level graphics routines supplied by MAX. For higher level interface routines such as access to standard 3ds max dialog boxes see the methods of the Interface class. The Windows API is also often employed in graphics work in MAX.

IPAS also provided routines to access the mouse and change the cursor form. 3ds max provides mouse and cursor control using the CommandMode class. See the section Command Modes and Mouse Procs for more details on working with the mouse.

There were also GFX routines to access 3D Studio bitmap services (load / save bitmaps, re-size bitmaps, color-cut bitmaps, etc.). 3ds max provides a comprehensive set of bitmap management tools. For details see the section Working with Bitmaps.

Many interfaces built in IPAS were created using the 3DE utility. This simplified the creation of dialog boxes and custom user interfaces. 3ds max uses the Visual C++ tools for creating its dialog boxes. These tools are more comprehensive and robust than 3DE. The section on Custom Controls provides an general introduction to this tool although you will want to consult the VC++ on-line help for more detail.

Graphics Programming Functions

IPAS routines could make use of some SDK-supplied include files that provided utility functions such as linear algebra, quaternion algebra, and other common graphics programming functions. The 3ds max architecture provides a very comprehensive set of these tools as well. These standard classes are used throughout 3ds max programming. The following list of classes all provide various graphic / geometric programming support: Class Point2, Class Point3, Class Matrix3, Class Quat, Class Color.

IPAS Plug-In Types as MAX Plug-Ins

The following sections discuss how each of the six IPAS types may be implemented as a 3ds max plug-in. In many cases there is not an exact one-to-one correspondence due to the differences in the two architectures. On the whole however, IPAS developers will find the 3ds max APIs much more powerful, comprehensive and better integrated with the core program.

IXP - Image Processing Modules

IXPs were used to create new images or modify existing ones in the video post data stream. They were also used to create special effects such as image blur, star filters and glows. In 3ds max these types of effects are achieved using Filter plug-ins. These plug-ins are derived from class ImageFilter. Filters may be used as image modifiers, image compositors or as transition effects. The 3ds max capabilities for image processing plug-ins are much greater than their IPAS counterparts. Sample code may be found in the sub directories of \MAXSDK\SAMPLES\POSTFILTERS for example ADD.CPP.

PXP - Procedural Objects Modules

This type of IPAS routine was usually used to create an object from an algorithm or to modify an existing object. In 3ds max this type of plug-in translates into a procedural object, or an object modifier, or a utility plug-in.

In 3ds max a procedural object is best suited to create an object defined by an algorithm. Geometric procedural objects are derived from SimpleObject, or GeomObject. Sample code for this plug-in type may be found in \MAXSDK\SAMPLES\OBJECTS\SPHERE.CPP.

To modify an existing object, the object space modifier plug-in type is appropriate. Sample code for an object space modifier may be found in \MAXSDK\SAMPLES\MODIFIERS\BEND.CPP.

Certain utility IPAS routines were created as PXPs. 3ds max also supports these utility plug-ins. Utility plug-ins are derived from Class UtilityObj. Sample code for this plug-in type may be found in \MAXSDK\SAMPLES\UTILITIES\ASCIIOUT.CPP.

AXP - Animated Procedural Objects

These plug-ins were used to create hard-to-animate objects such as particle systems and real world data. These procedures animated at render-time on a frame by frame basis.

Certain AXP types could be implemented in 3ds max as procedural objects (particles systems), atmospheric plug-ins (some types of smoke, vapor, and fog), or space warps.

Particle systems may be derived from classes ParticleObject, and SimpleParticle. Sample code may be found in \MAXSDK\SAMPLES\OBJECTS\RAIN.CPP. Particle-system type effects may also be created using the Atmospheric class.

Geometric procedural objects are derived from SimpleObject, or GeomObject.

Space warp plug-ins may be used to modify existing geometry in world space. These plug-ins are derived from Modifier or WSMModifier.

SXP - Solid Texture Procedures

The IPAS SXP routines were 3D functions that could be assigned as maps in the 3D Studio Material Editor. 3ds max provides similar but more-extensive capabilities for both 2D and 3D procedural textures, compositors and color modifiers. 3ds max also provides APIs to develop complete plug-in materials. The sample code for these plug-ins can be found in the directory \MAXSDK\SAMPLES\MATERIALS.

KXP - Keyframe Procedures

These IPAS routines were typically used to create or modify keyframe data of objects in the keyframer. In MAX, controller plug-ins are used to manage animation. See classes Control and StdControl. Sample controller code is available in \MAXSDK\SAMPLES\HOWTO\PCONTROL\PCONTROL.CPP. There is also an interface into the Linear, TCB, or Bezier key frame controllers that allows a developer to add, delete, retrieve and store the keys of the controller. See Class IKeyControl.

BXP - Bitmap Loading / Saving Procedures

BXP plug-ins were used to provide extended image file loading and saving support. These image loader / saver plug-ins are called IO modules in MAX. These plug-ins are derived from class BitmapIO. Sample code for these plug-in may be found in the sub-directories of \MAXSDK\SAMPLES\IO, for example \MAXSDK\SAMPLES\IO\BMP.CPP.

Summary

This section presented an overview of the similarities and differences between the IPAS and 3ds max plug-in architectures. 3ds max provides a powerful development system for creating plug-ins that are tightly integration with the core program. IPAS developers are encouraged to implement their plug-ins using the standard 3ds max types in order to provide the best integration with the system. For those plug-ins that simply don't fit within the 3ds max architecture, the Utility API is provided to allow these plug-ins to work in MAX.

You may find it helpful to review the section Plug-In Types Overview to see a summary of the general categories of 3ds max plug-in applications.