Skip to main content
Participant
July 4, 2021
Question

Optimizing Graphs

  • July 4, 2021
  • 1 reply
  • 284 views

Do substance graphs only process nodes in the graph that actively have an influence on the output nodes (e.g. Similar to Maya)?  From what I'm seeing, it doesn't seem like it. For example:

 

1. uniform color connects to both inputs of a switch.

2. The switch connects to an output node.

3. For the switches False statement I insert a custom graph that takes 10 sec to eval.

 

If the switch is set to true, and I clear the graph's timing, the false path connection still give me timing info and the links between the nodes switch from dotted to solid (indicated they've been evaluated) even though the switch is set to true.

 

To me this seems like the graphs push data instead of pull data.  Am I wrong?

 

This topic has been closed for replies.

1 reply

Luca Giarrizzo
Community Manager
Community Manager
July 5, 2021

Hello,

 

As a general precaution, you can uncheck the Enable image cache option in the Graph view toolbar. Using the image cache involves rendering all nodes which are part of a stream connected to a node/graph output displayed in the 2D View or 3D View, regardless of the actual state of parameters and data flow. This impacts the rendering stage of the graph calculations.

 

Before rendering, the cooking stage processes the graph to determine the actual computations that need to occur to render the final outputs. The connections turning from a dotted to a solid line demonstrate the completion of the cooking stage for that part of the graph.

This cooking stage includes an optimisation pass which should indeed trim out the unused branches of a graph, such as the unselected input of a Switch node.

However, this does not appear to occur, we were able to verify that during our own testing. Unused branches are still cooked, resulting in the timings you observed.

 

We are investigating further with the goal of solving or mitigating this issue. This can involve a rework of significant scope, thus we appreciate your patience with the current implementation and thank you for your report!

 

Luca Giarrizzo | Quality Engineer - Substance 3D Designer | Adobe
Participant
July 9, 2021

Quick follow up.  Is it safe to assume anything "flowing" to a hidden output will also be ignored?

 

1: visible input connects to visible output (impacts processing time)

2. Hidden input connects to visible output (still processes because of input default value)

3. Hidden input connects to hidden output (no processing time impact)