tyFlow Forum
"Integrate" node-help - Printable Version

+- tyFlow Forum (https://forum.tyflow.com)
+-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html)
+--- Forum: General Discussion (https://forum.tyflow.com/forum-2.html)
+--- Thread: "Integrate" node-help (/thread-766.html)



"Integrate" node-help - cgdvs - 06-08-2019

"Integrate" node

The use of it has not been very clear, and the description in the help is not very clear. I hope there is a typical example to illustrate the usefulness of "Integrate".


RE: "Integrate" node-help - tyFlow - 06-08-2019

In a tyFlow sim, positions and velocities are stored separately until the end of the time step, after which point they are integrated. So while the operators are evaluating, a particle might have properties like this:

Code:
pos = [0,0,0]
vel = [1,0,0]

Then at the end of the time step, the velocity is integrated into the position in order to move the particle forward:

Code:
pos += vel

However, prior to the integration happening, any operators that are modifying the particle will see its position as [0,0,0], not [1,0,0], even though [1,0,0] in this case is its final position at the end of the time step.

Sometimes you may want an operator to modify a particle using its post-integration position. So in that case you would use an Integrate operator to integrate its velocity immediately, rather than at the end of the time step.

However, if you integrate immediately and don't flag its velocity as having been integrated already, it will be integrated by the Integrate operator *and* at the end of the time step. So that's why the Integrate operator gives the option to flag the velocity, or clear it...so that integrations won't happen multiple times in the time step.

Also, sometimes you may not want to integrate the velocity immediately, and *also* do not want it integrated at the end of the time step either. That' why the "do nothing" option exists, alongside the option to flag the velocity. That basically prevents a particle from moving that frame, without clearing its velocity.

This is definitely a more "advanced" operator that is typically only useful in more complicated setups.


RE: "Integrate" node-help - cgdvs - 06-09-2019

Thank you very much for your reply. I will try to understand it first. I hope this paragraph can be written into the help. For those who need help in the future


RE: "Integrate" node-help - future_3d - 09-18-2022

Thank you for your good explanation, could you make a brief video about the effect of integrate operator, please?
Thank you