3D Studio MAX 3: In Depth. Sample Chapter | 4 | WebReference

3D Studio MAX 3: In Depth. Sample Chapter | 4

Parametric Objects

I've just introduced the idea of the "object" in MAX. To give this concept some practical meaning, go to the Create panel and click on the Box primitive to create a box. Look down the panel to the section named Parameters. If you haven't begun to draw the box yet, the screen should look like Figure 1.1.

Figure 1.1 The default parameters for a Box primitive.

Note: 3D objects that can be created directly by an application (without building from component parts) are called primitives in the language of computer graphics.

Think of this as a function. If you were a programmer writing a function that permitted a user to create a Box primitive, what input values would be necessary? What parameters would the function require to generate a valid output?

You would have to tell the function how tall, how wide, and how long the box should be. Because you are working with 3D polygonal models, you would also have to tell the function how many polygonal units there should be in each dimension. Leaving the issue of the mapping coordinates for later, notice that these are precisely the parameters (input values) that the box object is seeking. So by entering values into these slots, either by direct keyboard entry or by drawing interactively on the screen, the function gets the input values it needs to generate the output.

Compare the input parameters for a sphere, as seen in Figure 1.2. Once again, think of the information a function would need to create a polygonal sphere--it would need to know the radius (or diameter) and the amount of polygonal segmentation. MAX adds some more parameters because a MAX Sphere primitive is a bigger concept than a mere ball (it contains chopped spheres as well). This should be enough to give you the idea. The Sphere primitive is a function asking for input parameters.

Figure 1.2 Default parameters for a Sphere primitive.

So what? Doesn't every program do this? In every other program, there's a basic distinction between the function used to create the primitive and the primitive itself. The primitive is just data, the output of the function. Once the function has been used to create the data, it's gone until you call it again to create another object. MAX is completely different, however. The box or sphere that you create in MAX is not just data; it is the function and its input data together in the purest object-oriented style. The function persists, and if you change the input values (the parameters) at any later time, the primitive object is redrawn from scratch.

Try the following exercise:

  1. Draw a box on the ground plane without troubling about its dimensions. It might look like the one shown in Figure 1.3.

  2. Figure 1.3 Box drawn on the ground plane, with parameters visible in the Create panel.

  3. Switch to a wireframe view (right-click on the word "Perspective" in the top-left corner of the window) to see the polygonal segmentation. Now, enter new values in the input parameters, as I've done in Figure 1.4. The box on the screen changes accordingly, both in dimensions and in segmentation.

  4. Figure 1.4 Box from Figure 1.3, with parameters changed in the Create panel.

  5. This may not impress you because you are still in the Create mode. It may just be that you are previewing different dimensions and segmentation options until you actually confirm your decision. So switch to the Modify panel with the box still selected.
  6. The box object has definitely been created, or else there would be nothing to modify. Even though it has been created, its creation parameters are still available for modification in the Modify panel. I changed the dimensions and segmentation of the box using the Modify panel shown in Figure 1.5. Notice that this portion of the Modify panel is identical to that in the Create panel.

    Figure 1.5 Box from Figure 1.4, with parameters changed in the Modify panel.

In short, the box object you created is not simply data; it's a function that outputs a box, and the output changes every time you change the input. The result is the same as creating a new box from scratch. In any other application, you would have to delete a primitive object and re-create it. In MAX, your primitive objects are reborn every time you change your parameters, which is why these objects are called parametric objects.

Note: It can take quite awhile to develop an intuitive understanding of the value of parametric objects. The more you work with MAX, the more you come to understand the value of being able to resize an object by re-creating it from scratch rather than rescaling it with the scale transform. And the ability to change the initial segmentation of a polygonal model after it's already been created and modified is invaluable-one of MAX's most important competitive features.

To Continue, Use Arrow Buttons
Table of Contents or Order Book


Comments are welcome
Reproduced with permission from The Coriolis Group, copyright © 1999

Created: Sept. 30, 1999
Revised: Sept. 30, 1999

URL: http://webreference.com/3d/books/max3/1-3.html