Jump to content

Adding geometry attraction force to Flip?


zjie

Recommended Posts

I cannot see your scene at the moment, so I'm just guessing. There are multiple ways of doing this. The easiest way might be using Volume Motion -> Collisions -> Stick on collision and controlling stickyness bey a field (Control Field). You will have to add that firld to your sim, though. 

You could also use a POP Wrangle node (op POPVOP if you like that any better).

You might take the FLIP particle's velocity and cross this with the volume gradient of your collider (turn it into a volume, first) and then take the cross product of this and again the volume gradient of the collider (please apologize me being slightly imprecise, I'm on a train)

Link to comment
Share on other sites

What Ernest meant was using double cross product to get the velocity that follows the surface tangent, for example you can use any test geometry, add normal and do in wrangle v@v = cross(cross(@N, {0,1,0}), @N); and visualize that in your viewport, that is the surface flow vector based on the vector {0,1,0}.

In volume, there is no "Normal", but you can use volume gradient, basically is a vector field that vectors pointing from high density to low density (if I remember correctly), so a normalized negated volume gradient can be treated as "Normal". And you can sample the volume gradient use volumegradient vex function or in the vop. A double cross product like cross(cross(-normalize(gradient), v@vel), -normalize(gradient)); will give you the surface flow vector based on your velocity. And you can use this velocity to add to your current velocity, or use a fancier method to store it in a temp field and use current velocity to advect it, then use gascalculate to blend it in.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...