how to animate a point moving through a vector field?

   3477   7   2
User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
I have a vector field composed of a group of points, each with it's velocity and vector information embedded.

I want to animate a group of points emitting from a certain position and moving through this vector field whose velocity and vector will change and are calculated as the average values across all the points around a given moving particle within a certain radius …

May I ask how to do this, using the particle system maybe?

Thank you very much!

Attachments:
03.PNG (214.7 KB)
04.PNG (211.0 KB)
05.PNG (161.5 KB)
06.PNG (76.8 KB)
pt_move.zip (171.7 KB)

User Avatar
Member
1794 posts
Joined: May 2006
Offline
Here's one way. Use vdb-from-particles to convert your points to a velocity volume, then in a popnet use pop-advect-by-volume to push particles through your field.

Attachments:
pt_move_using_vel_vol.hipnc (637.5 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
Thanks, mestela!

May I ask if there is a way to confine the VDB volume as the same as the bounding box of the point group?

It seems some of the particles are flying out of the point group and stuck over the corner of the VDB volume…

It will take a while for me to understand your approach…

Nevertheless, thanks again!

Attachments:
Capture.PNG (289.0 KB)

User Avatar
Member
1794 posts
Joined: May 2006
Offline
Yep, put a vdb clip sop after its created, and give it the bounds of the original geo to clip it against.

Attachments:
clipped_vdb.hipnc (638.3 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
thank you very much, mestela!

May I ask how to paint the particles by their current velocity?

I have the feeling that the point attrib v, v, v only tell the vector of each particle, not its speed…

appreciate your advice!

Thanks, again!

Attachments:
01.PNG (312.0 KB)
02.PNG (8.4 KB)

User Avatar
Member
4682 posts
Joined: Feb. 2012
Offline
length ( @v ) will give you speed.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
thanks, pusat!

Can you advise on how to use the expression you suggested… ?

It's the first time I see this type of expression although I used hscript before…

does this calculated the length of the vector of each point?

Can it reflect the relative difference in speed btw particles?

Thanks!
User Avatar
Member
4682 posts
Joined: Feb. 2012
Offline
Put the code inside an AttribWrangle after @speed. It will give you a speed attribute. It will be the absolute value. If you want relative, you have to choose the reference point.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
  • Quick Links