Debugging ICE Trees

There are some basic tools that let you identify and correct problems in ICE trees.

Types of Problems

There are different types of problems you may encounter when building ICE trees:

• Structural problems are caused by incompatible data types, contexts, or structures in the tree. Nodes that are in error because of structural problems are displayed in red, and other nodes in that branch that will not be evaluated because of the error are displayed in yellow. If you have red nodes, or if you cannot connect nodes that you think should be connectable, see Port and Node Messages.

• If a tree is working but not doing what you think it should be doing, it may be that the values being passed to ports are not what you expect them to be. You can display port values in the scene as described in Displaying Port Values, and you can log values to the history pane of the script editor as described in Logging Port Values.

• You can use the runtime message viewer to profile the performance if your tree and see which sections are using the most processing time. See Performance Profiling.

Port and Node Messages

Messages on ports and nodes help you identify structural problems caused by incompatible data types, contexts, or structure.

• Hover the mouse pointer over a port to display a pop-up message showing the data types, context, and structure that the port supports, for example, “Array of 3D Vector per Point of “PointCloud.pointcloud”.

• To see more detailed information about a port, right-click over a port or connection and then choose Log port type details. Information is logged to the history pane of the script editor.

• If a node is red (in error), hover the mouse pointer over it (not over a port) to see the first error message. To see all error messages, right-click over the node and choose Show Messages.

• When you drag an output port onto an incompatible input port, a pop-up message informs you of the conflict and shows the data types, contexts, and structure that are supported by the two ports.

Displaying Port Values

You can display port values in the 3D scene to help you visualize why a tree is giving the results that it gives. When a port’s values are displayed, a “V” icon appears on the connection. The color of the icon corresponds to the color of the data in the 3D views.

 

Only values in branches that are connected and evaluated can be displayed.

When you export a compound, the display state of ports is saved. In particular, this lets you create compounds whose only purpose is to show values for debugging purposes. However, you may need to get and then set the same values back to ensure that the data gets pulled.

 

Per-component attributes cannot be displayed on polygon meshes that are subdivided using the geometry approximation method.

To show port values

1. Right-click over a connection or input port and choose Show Values.

2. If you haven’t displayed the selected port values before, the Show Values dialog box opens. Specify the desired display options and click OK. See AttributeDisplay [Properties Reference].

Otherwise, values are displayed using the last settings.

To change port value display properties

1. Right-click over a displayed port or connection and choose Show Values Properties.

2. Specify the desired display options and click OK. See AttributeDisplay [Properties Reference].

To hide values for a port

• Right-click over a displayed port or connection and choose Hide Values.

The display settings are remembered and reused the next time you display values on that port.

To hide or unhide all port value displays in a specific view

Do one of the following:

• Click the eye icon (Show menu) in a view’s toolbar and toggle Display/ICE Attributes.

or

• Click the eye icon (Show menu) and choose Visibility Options. On the Attributes tab, toggle Display/ICE Attributes. You can set this option separately for selected and unselected objects.

Note that this affects both AttributeDisplay properties on objects as well as port value displays in ICE trees.

To hide or unhide all port value displays in all views

• Choose Display > Visibility Options (All Cameras). On the Attributes tab, toggle Display/ICE Attributes. You can set this option separately for selected and unselected objects.

Note that this affects both AttributeDisplay properties on objects as well as port value displays in ICE trees.

Logging Port Values

You can log the values that are passed along a connection to a port. This lets you use the history pane of the script editor to analyze the behavior of a tree.

To log port values

1. Connect a Log Values nodes from the Debug category of the Tools tab of the preset manager between two ports in the tree. Both the In and Out ports of the Log Value node must be connected.

2. If desired, set or connect the Log Value node’s other ports and parameters. See Log Values [ICE Reference].

3. Force the tree to recalculate somehow, for example, by advancing one frame on the timeline.

Using the ICE Runtime Message Viewer

The ICE runtime message viewer can be used to profile the performance of trees and see which nodes and compounds use the most processing time.

 

1

Open the ICE runtime message viewer.

2

Enable or disable logging.

3

Sort performance information alphabetically by node.

4

Clear all messages.

5

Select the corresponding node. See Selecting and Finding Nodes.

6

Information is displayed here.

To display the ICE runtime message viewer

Do one of the following:

• Click its icon in the ICE tree view.

or

• Choose View > General > ICE Runtime Message Viewer.

Performance Profiling

To display performance information in the ICE runtime message viewer:

1. Make sure that logging is enabled.

 

Logging enabled.

 

Logging disabled.

2. Move the timeline forward, for example, by playing the scene or jogging forward one frame.

Performance messages are cumulative, so you may want to clear them before playing a second time.

By default, nodes are listed in order according to how long they took to evaluate. They are arranged hierarchically, with nested nodes and compounds indented under the compounds that contain them. After the hierarchical list, there is a summary with nodes arranged by type in order according to how long all nodes of a given type took to execute.

To sort alphabetically by node name, click the Sort Message List icon. Again, the list is hierarchical with nested nodes and compounds indented under the compounds that contain them in alphabetical order. After the hierarchical list, there is a summary showing how long each type of node took to evaluate, arranged alphabetically.

You can click on + and – to expand and collapse the performance messages for compounds.

Selecting and Finding Nodes

You can select a line in the ICE runtime viewer and then click Sel to select the corresponding node. The node is selected in the scene, not in the ICE tree view. You can the do the following:

• Press Enter to open its property editor.

• If the node is a compound, click update in the ICE tree view to open it. Otherwise, you can select its parent compound from the ICE runtime message viewer and open that.

 



Autodesk Softimage v.7.5