How to calculate Velocity of each vertex of any Polygon?
-
- Posts: 169
- Joined: 16 Jun 2009, 06:23
How to calculate Velocity of each vertex of any Polygon?
How to calculate per-Point Velocity of each Vertex of any Shape Deformed/Transformed Polygon?
Re: How to calculate Velocity of each vertex of any Polygon?
Here is a simulated ICE Tree that hopefully does what you are asking. I tested it on a spinning cube.
You need to multiply the value by your FPS to get the velocity per second.
For some reason getting the point position at previous frame doesn't give the position from the last frame. Probably because the movement is not generated by ICE simulation. So instead the tree records the position at the end of the stack before the next frame and then uses that data to make the calculation.
Hope this helps.
Re: How to calculate Velocity of each vertex of any Polygon?
So I tried it on a deforming mesh and the simulated ICE tree kills the deformation. So I've had to split off the ICE sim to a separate object to track the velocity of the source mesh vertices.
This might be more what you are looking for. The velocity data is stored as an array called pointVelocityVal on the ICEsim object.
This might be more what you are looking for. The velocity data is stored as an array called pointVelocityVal on the ICEsim object.
-
- Posts: 169
- Joined: 16 Jun 2009, 06:23
Re: How to calculate Velocity of each vertex of any Polygon?
Thank you !
1st one already solve my problem.(since I only transform, not deform the source mesh)
But for the "Deformed mesh" problem:
"Build Array from Set" is a walk around, for Context not matching, right?
So that this is NOT a way to set it back to per-point data?( Just recall there is a "switch context" node, intended to working with same topology mesh, but tested with no success...)
1st one already solve my problem.(since I only transform, not deform the source mesh)
For me, this one is really clever
But for the "Deformed mesh" problem:
"Build Array from Set" is a walk around, for Context not matching, right?
So that this is NOT a way to set it back to per-point data?( Just recall there is a "switch context" node, intended to working with same topology mesh, but tested with no success...)
Re: How to calculate Velocity of each vertex of any Polygon?
Yes I ran into an issue when I was putting it together and building an array with all the point data seemed to get it working. It was after midnight when I banged this ICE tree together so I can't remember the exact issues I had, but once I got it working I was happy enough to pop it into the forum and get some sleep 😅
Like most programming there is many ways to do things, some are more efficient than others. I definitely don't claim to be the most efficient, but I'm not programming at scale so if I can get the job done that's good enough for me!
Glad you got it working! Nothing worse than a problem like this halting your progress.
Like most programming there is many ways to do things, some are more efficient than others. I definitely don't claim to be the most efficient, but I'm not programming at scale so if I can get the job done that's good enough for me!
Glad you got it working! Nothing worse than a problem like this halting your progress.
Who is online
Users browsing this forum: No registered users and 63 guests