Feedback ports on compounds can be used to cache the result of the last evaluation of a subgraph, and use it as the input for the next evaluation. This is how simulations work, where the result of one frame is the basis for the next frame.
Feedback ports consist of a pair of input and output ports on a compound that are matched so that the output value is used as the input the next time the compound or the whole graph is evaluated.
To ensure that the graph gets evaluated each time you advance a frame, it must have an input that changes value. For example, there must be a time
node or an animated input from the host scene.
To see an example of how this works, look inside the simulation_example
compound. It provides a template for a generic simulation that you can make editable and modify for your needs.
To create a pair of feedback ports on a compound:
any
ports are not supported. If necessary, right-click on the ports and choose Set Value Type to set an explicit type.For best results, your custom simulation should: