5. ObjParams pmodifier and sub name¶
The ObjParams pmodifier controls almost all parameters of a node, a base object or a modifier for each pass. You can control each parameter that MAXScript can access.
This was the first pmodifier that needs a sub name. A colon [:] separates the pmodifier type and the sub name, for example ObjParams:LitMul. Thus, this pmodifier lets you make your own pmodifier type for each parameter that you control.
You must type a sub name. Thus, you can make the first ObjParams pmodifier only from the Tab menu.
-
Load the file
renderStacks_Tut_001.maxagain. -
Make 2 passes, "rOrg" and "rBig".
-
Select the pass "rOrg".
-
Press Tab.
-
Select ObjParams.
The top text box shows "Type_Subname".
-
Try to add the pmodifier. You get a warning.

-
You must type a sub name. Type "radius" and press Enter.
You can use any sub name with letters and numbers. The sub name does not change what the pmodifier does. It is only a name. But a name that tells what it does is better.

-
The short name shows the sub name "radius" after the colon: [oP:radius].

-
Right-click the tree view and select Add pmodifier.
The list now has the new ObjParams type with the sub name "radius".
-
Make sure that the new ObjParams:radius pmodifier is selected.
It has 2 empty dropdowns. You must tell it what to control.
-
Select a teapot.
-
Open the first dropdown.
This dropdown sets what to control. Thus, its items change with the selected objects.
It always has 2 items: Node and baseObject.
Node
In the 3ds Max SDK and in MAXScript, a "node" is a scene object. Select "Node" to control parameters of each object, for example the wireframe color and the object ID. Some node parameters have their own pmodifiers, for example Parent, Transform and Material. Use this option for the other node parameters.
baseObject
The base object is the item at the bottom of the modifier stack. It has the creation parameters of a parametric object, for example a Sphere or a Teapot. It also has all light and camera settings.
When you select "baseObject", the parameter dropdown shows the parameters that the base objects of the selected objects have in common. For example, to control the radius of spheres and teapots, select "baseObject" and "radius".
The 3rd option, "baseObject | Teapot", comes later. -
Select baseObject.
-
Open the 2nd dropdown.
It shows all parameters of the selected object, the teapot. -
Select radius.
-
Right-click the property list below the dropdowns.
It shows "Rightclick here to add Objects".
-
Click Add/Edit.
-
The Available list shows all objects that have a "radius" parameter on the base object.
Thus, it shows the cylinder and the torus, and also the teapots. -
Click the Add All button.

-
Press Set after all objects are in the Selected list.
The list shows the selected objects with their current values.
The dropdowns are now not editable.
This pmodifier now controls onlybaseObject.radius. You cannot change what it controls until you remove all objects from the list.
-
Double-click the number 30.1392 in the Teapot001 row.
-
Change the value from 30.1392 to 50.0.
-
Change between "rOrg" and "rBig" a few times.
The radius of the teapot changes. -
Select the "ObjParams:radius_001" pmodifier in "rBig".
-
Select all rows. You can right-click and click Select All.
-
Right-click and select Multi Value Edit.

-
The Multi Value Editor opens.
It changes the values of all selected items at a time.
renderStacks examines the values of the selected items. It opens this dialog only if all selected values are the same type.
-
The value is a float. Thus, the dialog shows a spinner. The radio buttons on the right side set the operation. "=" applies the value on the left as it is. If you set 50.0 and select "=", all items get the value 50.0.
Set the value to 50.0, select "=" and press Set & Activate.
Set & Activate sets the value and activates the pass. Thus, you see the result immediately. But if the pass has many pmodifiers, the activation can take some time.

-
Select only the teapots.
-
Type -10 and select "+".

-
Press Set & Activate.
The radius of the teapots becomes 40 (50 – 10). -
Select all rows again.
-
Type 1.2 and select "x".
renderStacks multiplies the radius of all objects by 1.2.

These are the basics of the ObjParams pmodifier and of pmodifiers with a sub name. At this time, ObjParams is the only pmodifier that needs a sub name. More pmodifiers like this will come.
Now make one more ObjParams pmodifier.
-
Activate the pass "rOrg".
-
Select "Teapot001" (the orange one) and "GeosText" (the Geos text).
-
Apply a Bend modifier.
-
Set Angle to 60.0.

-
Add "ObjParams:Bend".
You learned how to do this above. -
If you know the property, you can type it directly in the dropdowns.
Type "Bend" and "enabled". -
Right-click and click Add/Edit.
-
Add "Teapot001" and "GeosText" and press Set.
-
Clear both check boxes.
-
Change to "rBig" and back to "rOrg".
The Bend is disabled in the pass "rOrg".
This is the end of the basic renderStacks tutorial.
Thanks!