renderStacks

⌘K
  1. Home
  2. Docs
  3. renderStacks
  4. Tutorials
  5. 4. Accumulative Pmodifier

4. Accumulative Pmodifier

So far, all the pmodifiers we have used are non-accumulative pmodifier. Basically you can
have one one active pmodifier per pass for a pmodifier type.

You can add as many as the same type pmodifier in a pass. But, as soon as you more than one
same type pmodifier, you can see other pmodifier turns to black except the most below one.
renderStacks always evaluate pmodifier from the top to the bottom. So, always the last one at
the bottom is the one used.

For example, think about Camera, you can only have one camera to render per pass, having 2
active camera for a pass doesn’t make sense. If we follow the order from base to the top to the
bottom, the camera in the last Camera pmodifier for the pass is the camera we will use for
render.

But, there are some pmodifiers doesn’t work well with this concept. For example, object
properties. You may want to control Visible to Camera for only a group of objects while
controlling matte properties for other group of objects.

Therefore, more than one pmodifier can be active in a pass for some type of pmodifiers. I’ll call
this kinds of pmodifier, an accumulative pmodifier.

As of now, there are 2 accumulative pmodifier type, ObjPropsDIsplay and ObjPropsRender.

  1. Load renderStacks_Tut_001.max .
  2. Add “TeapotVertex”, “TeapotNoVertex” passes.
  3. Select “TeapotVertex” pass.
  4. Add “ObjPropsDisplay” pmodifier.
  5. Double click the newly added “ObjPropsDisplay_001” pmodifier.
    Yes, you can rename pmodifier.
  6. Type “Add vertex tick to teapot”.
  7. Press Enter.
    You can see the pmodifier name changed in Pass tree panel and Note rollout.
    But, the pmodifier type prefix [opD] is still there to tell you what this pmodifier type is.
  8. As you can see, this pmodifier works on groups of multiple objects.
    The default is “All”. Let’s keep as default for now.
  9. Right click the “Rightclick here to add Property”.
  10. Click Add/Edit.
  11. Select “Vertex ticks”.
  12. Press “Set”.
  13. Click any green “Base_ObjectPropsDisplay” pmodifier.
    Make sure “All” is selected and “Vertex tick” is off.
    This is your start point for object display properties. You decided to control “Vertex ticks”
    property for all objects. The base state is off.
  14. Go back to the “Add vertex tick to teapot” pmodifier we added.
  15. Click “Lyr”.
  16. Select “3teapots” layer from the dropdown list.
  17. Turn on “Vertex ticks” checkbox.
  18. Instant scene update doesn’t support accumulative pmodifiers.
    So, press Space bar to activate pass. You can see all 3 teapots showing vertex ticks.
  19. Select “TeapotNoVertex”.
    All vertex ticks are gone.
  20. Let’s rename pass. No, you can not double click to rename pass. That’s reserved for expand/collapse by Windows. Press “Rename Node” button.
  21. Rename as “VertexTickOnTubes”.=
  22. Select base ObjPropsDIsplay pmodifier in the pass.
  23. Press Duplicate Nodes.
  24. Do you remember the base pmodifier for other pmodifiers were disappeared when you
    duplicate? Only localized new pmodifier were leC.
    For accumulative pmodifier, the base pmodifier doesn’t disappear since the evaluation of all
    same type pmodifier will be accumulative to get the final result.
    Now only tubes has vertex ticks.
  25. Lets try to control more display properties. Add or duplicate one more ObjPropsDisplay
    pmodifier.
  26. 26.Right click property list.
  27. Click Add/Edit
  28. Add “Display as Box”
  29. Check the checkbox.
  30. Choose “Lyr” and “etc”.
  31. Press Space to activate the pass.
    The Torus and the box will display as box

OK. Here we need to check a very important concept of accumulative pmodifier.

  1. 1.Go back to the second pmodifier for vertex ticked tubes.
  2. Select “LS”.
  3. Rightclick “LS” button.
  4. Make a “baseNtube” layer set with “base” and “Tubes” layer.
  5. Press “Apply” button.
  6. Press Space to activate the pass.
    If you can not see base cyilinder well, add some Cap Segments.
  7. Select a green “Base_ObjPropsDisplay” pmodifier.
  8. Change to “nLyr” and select “stuff”.
  9. Activate different passes and check the viewport.
    Can you tell what’s going on?
    ACer we switched the base pmodifier object selection from All to nested layers of “stuff”. Any object which is not under “stuff” layers are not changing even tho you selected them in local pmodifiers like cylinder base and torus and box.
  10. Select all three.
  11. Rightclick in the viewport.
  12. Select Object Properties.
  13. Turn off Display as Box and Vertex tick.
  14. Now activate each passes.
  15. They are still not changing.

I think I mentioned one time before. The object selection in a base accumulative pmodifier is
used as an starting point of override. If object doesn’t have base state, it can not be modified
by pmodifier. Basically You can only modify subset of the object in the base pmodifier in a local
accumulative pmodifier.

This is the end of our 4th tutorial.

Thanks!