Skip to content
renderStacks by QuasiKrystal

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.

  1. Load the file renderStacks_Tut_001.max again.

  2. Make 2 passes, "rOrg" and "rBig".

  3. Select the pass "rOrg".

  4. Press Tab.

  5. Select ObjParams.
    The top text box shows "Type_Subname". Add Pmodifier field with Type_Subname and ObjParams selected

  6. Try to add the pmodifier. You get a warning.

    Message that asks for a sub name for ObjParams

  7. 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.
    Add Pmodifier field with the sub name radius and ObjParams selected

  8. The short name shows the sub name "radius" after the colon: [oP:radius].
    Treeview with the new ObjParams pmodifier and its short name oP:radius

  9. Right-click the tree view and select Add pmodifier.
    The list now has the new ObjParams type with the sub name "radius".

    Treeview right-click menu with ObjParams:radius in the Add Pmodifier submenu

  10. Make sure that the new ObjParams:radius pmodifier is selected.
    It has 2 empty dropdowns. You must tell it what to control.

    ObjParams:radius pmodifier with two empty dropdowns

  11. Select a teapot.

  12. 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. ObjParams pmodifier with the first dropdown open: Node, baseObject and baseObject of Teapot

    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.

  13. Select baseObject.

  14. Open the 2nd dropdown.
    It shows all parameters of the selected object, the teapot.

  15. Select radius.

  16. Right-click the property list below the dropdowns.
    It shows "Rightclick here to add Objects". ObjParams pmodifier set to baseObject and radius, with the Add/Edit item in the right-click menu

  17. Click Add/Edit.

  18. 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.

  19. Click the Add All button. Prop/Obj Selection dialog for ObjParams:radius with the Add All button

  20. 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 only baseObject.radius. You cannot change what it controls until you remove all objects from the list.

    ObjParams pmodifier with the radius of each object, and the dropdowns are locked

  21. Double-click the number 30.1392 in the Teapot001 row.

  22. Change the value from 30.1392 to 50.0.

  23. Change between "rOrg" and "rBig" a few times.
    The radius of the teapot changes.

  24. Select the "ObjParams:radius_001" pmodifier in "rBig".

  25. Select all rows. You can right-click and click Select All.

  26. Right-click and select Multi Value Edit.
    ObjParams right-click menu with Multi Value Edit for all the entries

  27. 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.

    Multi Value Edit dialog with a spinner and the =, + and x operations

  28. 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.
    Multi Value Edit with the = operation sets the radius of all the objects to 50

  29. Select only the teapots.

  30. Type -10 and select "+".
    Multi Value Edit with -10 and the + operation sets the radius of the teapots to 40, shown in the viewport

  31. Press Set & Activate.
    The radius of the teapots becomes 40 (50 – 10).

  32. Select all rows again.

  33. Type 1.2 and select "x".
    renderStacks multiplies the radius of all objects by 1.2.
    Multi Value Edit with the x operation makes the radius of all the objects smaller, shown in the viewport

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.

  1. Activate the pass "rOrg".

  2. Select "Teapot001" (the orange one) and "GeosText" (the Geos text).

  3. Apply a Bend modifier.

  4. Set Angle to 60.0.
    Two objects with a Bend modifier and its Angle set to 60

  5. Add "ObjParams:Bend".
    You learned how to do this above.

  6. If you know the property, you can type it directly in the dropdowns.
    Type "Bend" and "enabled".

  7. Right-click and click Add/Edit.

  8. Add "Teapot001" and "GeosText" and press Set.

  9. Clear both check boxes.

  10. Change to "rBig" and back to "rOrg".
    The Bend is disabled in the pass "rOrg".

    ObjParams:Bend pmodifier with the Bend enabled property off for GeosText and Teapot001, and the objects are not bent

This is the end of the basic renderStacks tutorial.

Thanks!