3DSinghVFX / animation_nodes

Node-based visual scripting system designed for motion graphics in Blender.
Other
155 stars 16 forks source link

Ability to Cache Simulation Node? #172

Closed Gerstmann-Bradley closed 3 years ago

Gerstmann-Bradley commented 3 years ago

Wondering if it's possible / already doable.

3DSinghVFX commented 3 years ago

Wondering if it's possible / already doable.

Yes, it is possible. There is the option to cache the Group Node, so you can create Group Node with the Simulation Node.

Screenshot from 2021-05-16 10-12-41

Gerstmann-Bradley commented 3 years ago

Wondering if it's possible / already doable.

Yes, it is possible. There is the option to cache the Group Node, so you can create Group Node with the Simulation Node.

Screenshot from 2021-05-16 10-12-41

Thanks! I just tried your method. Taking Spline Trace as an example, If I set cache type to "Once", node tree becomes non-functional. If I set cache type to the "Once per Frame", the node tree is functioning, but in the second round the node starts from 0 and won't function anymore. If I set cache type to "Once per Input", it says cache method is not available... Also one thing is that, I don't visualize anything signal on timeline as I can see in physics or other simulation. I am not sure if my cache is generated properly or not.

Do you have any solution? Thanks!

3DSinghVFX commented 3 years ago

Taking Spline Trace as an example, If I set cache type to "Once", node tree becomes non-functional.

One Time: it only computes that node-tree/group node once so that is why the tree is non-functional for another time.

If I set cache type to the "Once per Frame", the node tree is functioning, but in the second round the node starts from 0 and won't function anymore.

Once per Frame.

What do you mean by the second round?

If I set cache type to "Once per Input", it says cache method is not available...

Once per Input: It is only available for input data types that are comparable.

Also one thing is that, I don't visualize anything signal on timeline as I can see in physics or other simulation. I am not sure if my cache is generated properly or not.

I do not know is there a way to show per node cache in the timeline. I'll talk to Omar about this.

Do you have any solution? Thanks!

Can you elaborate on your node tree for Simulation Nodes?

Gerstmann-Bradley commented 3 years ago

What do you mean by the second round?

If everything is cached, then I need to play the cached animation correct? So the timeline will be run again. But then there's nothing happening.

Can you elaborate on your node tree for Simulation Nodes?

I guess my problem is solved. I found the Curve Object Output Node needs to stand outside the cache so that the cache will work. Generally the reason I am asking for cache is the lagging of viewport is horrible. Once cached, fps jumps from 6 fps to 20+ fps for this setup now. Thanks for helping. image

3DSinghVFX commented 3 years ago

Okay. Caching does not for any object in the Group/Loop node.