How to calculate Velocity of each vertex of any Polygon?

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Post Reply
opoppopopp
Posts: 169
Joined: 16 Jun 2009, 06:23

How to calculate Velocity of each vertex of any Polygon?

Post by opoppopopp » 23 Nov 2023, 02:46

How to calculate per-Point Velocity of each Vertex of any Shape Deformed/Transformed Polygon? :(

User avatar
SPJ
Posts: 63
Joined: 14 Jun 2014, 15:38
Contact:

Re: How to calculate Velocity of each vertex of any Polygon?

Post by SPJ » 27 Nov 2023, 01:16

Image

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.

User avatar
SPJ
Posts: 63
Joined: 14 Jun 2014, 15:38
Contact:

Re: How to calculate Velocity of each vertex of any Polygon?

Post by SPJ » 27 Nov 2023, 01:46

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.

Image

opoppopopp
Posts: 169
Joined: 16 Jun 2009, 06:23

Re: How to calculate Velocity of each vertex of any Polygon?

Post by opoppopopp » 27 Nov 2023, 18:47

Thank you ! :)
1st one already solve my problem.(since I only transform, not deform the source mesh)
SPJ wrote: 27 Nov 2023, 01:16 records the position at the end of the stack before the next frame and then uses that data to make the calculation.
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...)

User avatar
SPJ
Posts: 63
Joined: 14 Jun 2014, 15:38
Contact:

Re: How to calculate Velocity of each vertex of any Polygon?

Post by SPJ » 30 Nov 2023, 14:01

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.

Post Reply

Who is online

Users browsing this forum: brandwatch [Bot] and 48 guests