The generality of the current graph architecture causes complications during processing, especially when it comes to cache output. Most other animation graph implementations (as far as I'm aware of) restrict pose outputs to one per node and only allow pose outputs to be connected to one other pin. This ensures that each pose output will be queried once per frame, simplifying caching and computation.
This should also enable performance improvements, as it will be easier to replace string IDs with integers and hashmap lookups with integer indexing.
Solution
Refactored the code to enforce the following graph invariant:
Each node can only have a single pose output
Each pose output can only be connected to a single input
Breaking changes
As part of the refactoring, the animation graph format was changed slightly. Refer to the updated examples for instructions on how to use the updated format.
Objective
The generality of the current graph architecture causes complications during processing, especially when it comes to cache output. Most other animation graph implementations (as far as I'm aware of) restrict pose outputs to one per node and only allow pose outputs to be connected to one other pin. This ensures that each pose output will be queried once per frame, simplifying caching and computation.
This should also enable performance improvements, as it will be easier to replace string IDs with integers and hashmap lookups with integer indexing.
Solution
Refactored the code to enforce the following graph invariant:
Breaking changes
As part of the refactoring, the animation graph format was changed slightly. Refer to the updated examples for instructions on how to use the updated format.