Evaluator Reference

This topic provides a detailed explanation of certain Custom Evaluator settings in the Evaluation Toolkit. For an in-depth technical look at Parallel Evaluation and background on custom evaluators, see Using Parallel Maya.

Curve Manager evaluator

Use the Curve Manager evaluator to include additional nodes in the Evaluation Graph. This lets you:
  • manipulate additional nodes using Parallel evaluation and GPU deformation, resulting in higher responsiveness during interactive manipulation
  • cause fewer Evaluation Graph rebuilds, since static nodes can already be included in the Evaluation Graph
To achieve those benefits efficiently, the Curve Manager evaluator performs two main tasks:
  • During Evaluation Graph construction, it triggers dirty propagation from extra nodes so they are included in the graph construction process and the resulting Evaluation Graph
  • During scene evaluation, it handles the evaluation of some of those extra nodes to maintain performance, since they do not need to be evaluated.
To illustrate this result, compare the three following situations in a scene where:
  1. All controllers have a single key (that is, static animation curves). Since the resulting animation curves are constant, they are considered static and are not included in the Evaluation Graph. Playback has nothing to evaluate.
  2. All controllers have keys of different values (that is, animated curves). Therefore, they are included in the Evaluation Graph and playback evaluates everything.
  3. All controllers have a single key (that is, static animation curves), but where the Curve Manager evaluator pre-populates the Evaluation Graph with those static curves.

In the third situation, we are trying to take advantage of the Curve Manager evaluator having an Evaluation Graph that is already set up for Parallel evaluation when the controllers are manipulated.

The following table summarizes the differences between the situations.
Situation # of nodes in EG Playback EM Manip Rebuild when keying
Static curves + Curve Manager off Lowest Fastest No Yes
Animated curves Highest Slowest Yes No
Static curves + Curve Manager on Highest Middle Yes No

In summary, the Curve Manager evaluator benefits from having the Evaluation Graph already populated with nodes so it is reacts to evaluate interactive manipulation, while paying as little cost as possible for those constant nodes during playback. It can be activated using:

cmds.evaluator(name="curveManager", enable=True) cmds.evaluator(name="curveManager", configuration="forceAnimatedCurves=keyed")

The available values for forceAnimatedCurves are:
  • none: No curve will be forced in the evaluation graph.
  • controller: Curves connected to controller nodes will be forced in the evaluation graph. This is basically a generalization of the controller concept.
  • keyed: Keyed static curves, that is, curves with a single key or multiple keys with the same value, will be forced in the evaluation graph.
  • all: All curves are forced in the evaluation graph.
Another option, forceAnimatedNodes, can be used:
  • none: No node will be forced in the evaluation graph.
  • forcedAnimatedAttribute: Nodes with the forced-animated attribute set to true will be forced in the evaluation graph.

This allows tagging nodes to be added with a boolean dynamic attribute. By default, the name of this attribute is forcedAnimated. If it is present on a node and set to true, the node is added to the graph. The name of the attribute can be controlled by using the forcedAnimatedAttributeName option.

By default, the Curve Manager evaluator tries to skip the evaluation of the static parts of the graph. For debugging or performance measurement purposes, this optimization can be disabled:

cmds.evaluator(name="curveManager", configuration="skipStaticEvaluation=disable")

Deformer evaluator

The deformer evaluator implements the GPU Override option.

The deformer evaluator replaces CPU evaluation of deformer nodes chains with GPU evaluation to improve scene performance. Use the deformerEvaluator command to retrieve information about chains of deformer nodes supported in a scene, or to discover why specifics node are not supported. Use the Evaluation Heads Up Display (HUD) Options to see how many vertices are supported by GPU Override.

Limitations

  • Each deformation chain must end with a mesh node that has no output connections. This means, to be supported, the mesh cannot have pointOnPoly constrains, follicles, or any other output connection.
  • Only blendShape, skinCluster, cluster, softMod and tweak nodes are supported and only certain features.

Dynamics Evaluator

The dynamics evaluator handles the proper evaluation of dynamics-related nodes, which often have complex evaluation requirements. Although it supports a few configuration options, you generally won't interact with it, as the default behavior is normally acceptable.

The dynamics evaluator has three main responsibilities:
  1. Group together dynamics-related nodes in clusters to be evaluated by the dynamics evaluator.
  2. Manage the evaluation of such clusters so they respect intricate evaluation rules required by dynamics-related nodes.
  3. Disable Parallel Evaluation when unsupported setups are detected

Limitations

  • Dynamics simulation that uses the Evaluation Manager (and therefore the dynamics evaluator,) sometimes has different results than with DG-based evaluation. However, these results are consistent regardless of whether it occurs in Maya viewport or in Maya Batch.
  • Legacy dynamics (legacy particles and fluids, for instance,) are not supported by the dynamics evaluator. If animated unsupported nodes are found in the scene, parallel evaluation is disabled.

For more detail on dynamics evaluation and unsupported features, see Using Parallel Maya.

Frozen evaluator

The frozen evaluator lets you exclude subsections of the evaluation graph from evaluation. It works with the frozen attribute to propagate the frozen state to related nodes using rules set by the evaluator configuration. Use the frozen evaluator only if you comfortable with the concepts of connection and propagation in the DAG and Evaluation Graph. If you are not, use the simpler invisibility evaluator.

The Evaluation Manager does not evaluate any node that has its frozen attribute set to True. When the frozen evaluator is enabled, it prevents related nodes from evaluating according to the rules corresponding to the enabled options.

The frozen evaluator operates in three phases:

  1. Collects nodes flagged by the invisible and displayLayers options marked for freezing.
  2. Propagates the freezing state outwards through the evaluation graph (according to the values of the downstream and upstream options).
  3. Analyzes the frozen nodes so that if downstream nodes have no other unfrozen inputs they are skipped. This step is referred to as the Runtime operation in the limitations below.

Limitations

  • You must set least one frozen attribute to "True" for the frozen evaluator to shut off evaluation on affected nodes. The most practical use of this would be on a display layer, so that nodes are frozen as a group.
  • If the frozen attribute, or any of the attributes used to define related implicit nodes for freezing (such as visibility) are animated, the evaluator will not remove them from evaluation. They are still scheduled and only the runtime option will help in avoiding unnecessary evaluation.
    Note: The runtime option does not modify the evaluator operation, it modifies the scheduling of nodes for evaluation. You will not see nodes affected by this option in the evaluator information, such as the output from cmds.evaluator( query=True, clusters=True, name='frozen' )
  • Cycle members are not frozen by the evaluator unless every input to the cycle is frozen. This is because as cycles evaluate as a unit, it is pointless to freeze individual members of a cycle.

See the Using Parallel Maya for a more detailed analysis.

Invisibility Evaluator

The invisibility evaluator prevents the evaluation of any node not upstream from a visible DAG node by identifying all DAG nodes considered invisible for the purposes of the modeling viewport. To determine which nodes to render invisible, the evaluator takes any of the following states into consideration:
  1. A node with its "Visibility" attribute set to false.
  2. A node with its "Draw Override Visibility" attribute set to false and its "Draw Override Enabled' attribute set to true.
  3. A node in a display layer that causes option #2 (above) to be true.
  4. A node has its "IsIntermediateObject" attribute set to true.
  5. Every path from a node upward to the root encounters at least one node for which at least one of the above is true. (Every is important in this case, with regard to instancing - every instance path to a node must be rendered invisible by one of the above.)

Any nodes the only drive invisible nodes are frozen and do not evaluate. (A visible DAG node is considered to drive itself so it will always evaluate.)

In most cases, the net result of enabling the invisibility evaluator should be no visible change in your scene, and a modest-to-significant increase in playback speed (depending on what is invisible).

When Not To Use This

The invisibility evaluator takes its definition of visible solely from the node's visibility state, so if your UI or plug-in code requires invisible nodes to evaluate, do not use the invisibility evaluator.

Limitations

  • The invisibility evaluator only considers static visibility. Any node with animated visibility by the definitions above (that is, any attributes checked are animated) are considered always visible.
  • Where cycles exist, everything in the cycle must be invisible or the cycle is not frozen.
  • If a node is instanced and has at least one visible path upwards, then all paths upwards are evaluated (that is, making one of two instances invisible has no effect)