Jump to content

drop issue


roberttt

Recommended Posts

I think you can do it with a POP Wrangle, plugging your geometry on one of the input of the DOP network.

You calculate distance of the particle to the surface of the object (xyzdist return the distance and you can pass a vector and an integer to know what is the closest point), and if it is really close to 0, then you replace the x and z coordinates of the particle position by the one of the nearest point on the sphere (using the uv and prim number returned by the xyzdist). Therefore y keeps being updated (gravity etc.), but once there is a contact with the sphere, the drop stick to it.

If you want the drop to fall and stop sticking, you can test its position in y vs. the position of the sphere, or tets a condition vs. the slope of the tangent of the contact point with the sphere (you would expect the drop to stick while the tangent is quite vertical, but once you have reached the inferior quarter of the sphere, the drop should fall again... no ?). By the way, to get the tangent, I would use primuv (with uv and prim number given by xyzdist, again) to get the normal of the sphere, and make a cross product with an horizontal vector (and then check the cosine of that tangent with up vector...).

Hope this helps.

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...