Share

Creating a Tool

This topic walks through using Max Creation Graph (MCG) to design a simple tool - a component such as a modifier or controller that can be used in your 3ds Max scene. In this case, we will create a graph that produces geometry, an icosahedron.

  1. Open the Max Creation Graph Editor (Scripting > New Max Creation Graph). The Max Creation Graph editor consists of a menu bar and five windows: The main graph window, the Operator Depot, the View Navigator, the Node Properties, and the Message Log.

  2. In the Operator Depot, expand Geometry > Mesh > Primitives to view Icosahedron Mesh Primitive. Drag this node into the graph editor window.

    This node contains the basic functionality for creating an icosahedron object. Note that it has an input connector on the left side, labeled "radius Float," and on the right side an output connector, labeled "Mesh." (There's also a function output, but we're not going to use it here.)

    As indicated by the labels, the node's input requires a floating-point decimal value, and the output requires a node that produces a triangle-based mesh object.

    Note MCG provides three different types of input nodes:

    • Tool Input nodes create inputs on the tool's generated rollout interface, to let the user of the tool provide the input value. This type of node lets you specify minimum, maximum, and default values, and the displayed label of the input.

    • Compound Input nodes create inputs for a compound.

    • Constant nodes let the graph author specify an input value within the graph. This is most useful when you know what the input value will be, and that it probably won't change.

      To complete the graph, you'll add and connect a tool input node that lets the user of your graph provide a value for the Radius parameter, and an output node to produce the geometry.

  3. In the graph editor window, right-click the node. At the bottom of the menu that opens, choose Generate Tool Inputs. A Tool Input: Float node appears in the editor window, already wired to the Icosahedron node's input connector.

    In the next step, you'll use a different shortcut for finding a node whose name or type you already know.

  4. Deselect any selected nodes, and open the node quick search box by typing the x key. Because you need an output node, you have a pretty good idea what to search for. Type "ou".

    That's all you need to find matches with all nodes whose names begin with "Output." The list now shows only the nodes that match this search criterion.

  5. You want to output a geometry object, so select the "Output: Geometry" item in the search list.

  6. Click and drag from the Icosahedron's Mesh connector to create a connection into the Output's mesh connector.

    The result is a color-coded wire between the two connectors.

  7. Click File > Save, and enter the Tool Name as Icosahedron in the Graph Properties dialog. Then, press Save As and save the file under the following user directory: C:\Users\username\Autodesk\3ds Max 2018\Max Creation Graph\Tools.

    Note The Message Log window tells you that validation succeeded for the graph, that the corresponding MAXScript file was successfully generated, and the .maxtool file was saved as well.

    Validation shows that there are no major problems with the graph. To use its output, however, it's necessary to evaluate it.

  8. Click Build > Evaluate, or press CTRL + E.

    The Message Log window now shows additional statements to the general effect that all is well.

    Next you'll use the graph to create an icosahedron in the scene.

  9. On the Create panel of the main 3ds Max interface, under Geometry, select Max Creation Graph from the drop-down list.

    You will see the Icosahedron button.

  10. Click the Icosahedron button, then click once in any viewport.

    The axis tripod appears where you clicked, but no object appears. If you look at the radius property, you can see why: The object has a radius of 0.0. This is because the Tool Input: Float node in our graph has a default set to 0.0.

  11. Increase the radius to 12.0.

    Now you can see the icosahedron geometry. This is regular polygonal geometry, like most other objects in 3ds Max. You can use it in any normal way: Convert it to an editable format, apply modifiers and materials, and render it.

  12. Note Once you save this .max scene, keep in mind that this MCG tool must be available to 3ds Max when the scene is re-opened. By default, 3ds Max will load all the .maxtool files under C:\Users\username\Autodesk\3ds Max 2018\Max Creation Graph\Tools. See here for more information on MCG file management.

Was this information helpful?