Skip to content
renderStacks by QuasiKrystal

4. Accumulative Pmodifier

All pmodifiers in the tutorials so far are not accumulative. A pass can have only one active pmodifier of each type.

You can add many pmodifiers of the same type to a pass. But when you add more than one, all except the bottom one become black. renderStacks always runs pmodifiers from the top to the bottom. Thus, the pass always uses the last one at the bottom.

AllGeos pass with three Camera pmodifiers, where the pass uses only the last one

For example, a pass can render with only one camera. 2 active cameras in a pass are not possible. renderStacks goes from the base, then from the top to the bottom. The camera in the last Camera pmodifier of the pass is the camera for the render.

Some pmodifiers do not work well with this rule. Object properties are an example. You may want to control "Visible to Camera" for one group of objects and matte properties for a different group.

Thus, for some pmodifier types, more than one pmodifier can be active in a pass. These are accumulative pmodifiers.

At this time, there are 2 accumulative pmodifier types: ObjPropsDisplay and ObjPropsRender.

  1. Load renderStacks_Tut_001.max.
  2. Add the passes "TeapotVertex" and "TeapotNoVertex".
  3. Select the pass "TeapotVertex".
  4. Add an ObjPropsDisplay pmodifier.
  5. Double-click the new "ObjPropsDisplay_001" pmodifier.
    You can rename a pmodifier.
  6. Type "Add vertex tick to teapot".
  7. Press Enter.
    The new name shows in the Pass tree panel and in the Note rollout.
    The prefix [opD] still shows the pmodifier type.
    ObjPropsDisplay pmodifier renamed to Add vertex tick to teapot in the treeview and the Note rollout
  8. This pmodifier works on groups of objects.
    The default is "All". Keep the default for now.
  9. Right-click the text "Rightclick here to add Property".
  10. Click Add/Edit.
  11. Select "Vertex ticks".
    Prop/Obj Selection dialog for ObjPropsDisplay with Vertex Ticks in the Selected list
  12. Press Set.
  13. Click a green "Base_ObjectPropsDisplay" pmodifier.
    Make sure that "All" is selected and "Vertex ticks" is off.
    This is the start point for the object display properties. You control the "Vertex ticks" property for all objects. The base state is off.
  14. Go back to the "Add vertex tick to teapot" pmodifier.
  15. Click Lyr.
  16. Select the layer "3teapots" in the dropdown.
  17. Select the "Vertex ticks" check box.
    ObjPropsDisplay pmodifier with the Lyr button, the 3teapots layer and Vertex Ticks on
  18. Instant scene update does not support accumulative pmodifiers.
    Thus, press the Space bar to activate the pass. All 3 teapots show vertex ticks.
    Viewport where the three teapots show vertex ticks
  19. Select "TeapotNoVertex".
    No vertex ticks show.
  20. Rename the pass. You cannot double-click a pass to rename it, because a double-click expands or collapses it. Press the Rename Node button.
    Rename button with its tooltip
  21. Rename it to "VertexTickOnTubes".
  22. Select the base ObjPropsDisplay pmodifier in the pass.
  23. Press Duplicate Nodes.
  24. For other pmodifier types, the base pmodifier disappeared from the pass after a duplicate. Only the new local pmodifier stayed.
    For an accumulative pmodifier, the base pmodifier stays. renderStacks adds the effect of all pmodifiers of the same type to get the final result.
    Now only the tubes have vertex ticks.
    ObjPropsDisplay pmodifier with the Tubes layer and Vertex Ticks on, and only the tubes show vertex ticks in the viewport
  25. Now control more display properties. Add or duplicate one more ObjPropsDisplay pmodifier.
  26. Right-click the property list.
  27. Click Add/Edit.
  28. Add "Display as Box".
  29. Select the check box.
  30. Select Lyr and "etc".
  31. Press Space to activate the pass.
    The torus and the box show as boxes.
    ObjPropsDisplay pmodifier with the etc layer and Display as Box on, and the torus and the box shown as boxes

Now look at a very important rule of accumulative pmodifiers.

  1. Go back to the second pmodifier, for the vertex ticks on the tubes.
  2. Select LS.
  3. Right-click the LS button.
  4. Make a LayerSet "baseNtube" with the layers "base" and "Tubes". LayerSet Editor with the new baseNTube layer set of the base and Tubes layers
  5. Press Apply.
  6. Press Space to activate the pass.
    If the base cylinder is hard to see, add some Cap Segments.
    ObjPropsDisplay pmodifier with the baseNTUbe layer set, and the base and the tubes show vertex ticks in the viewport
  7. Select a green "Base_ObjPropsDisplay" pmodifier.
  8. Change it to nLyr and select "stuff". Base ObjPropsDisplay pmodifier changed to nLyr and the stuff layer
  9. Activate different passes and look at the viewport.
    The base pmodifier object selection changed from "All" to the nested layers of "stuff". Objects that are not on the "stuff" layers do not change. This is also true for objects that local pmodifiers select, such as the base cylinder, the torus and the box.
  10. Select all 3 objects.
  11. Right-click in the viewport.
  12. Select Object Properties.
  13. Turn off "Display as Box" and "Vertex Ticks".
  14. Activate each pass.
  15. The objects still do not change.

The object selection of a base accumulative pmodifier is the start point of the override. If an object has no base state, a pmodifier cannot change it. A local accumulative pmodifier can only change a subset of the objects in the base pmodifier.

This is the end of the 4th tutorial.

Thanks!