Jump to content

Sticking moving particles to a deforming surface


ndeboar

Recommended Posts

If the geo is too complex or thin for VDBs you can try using xyzdistance inside the solver to pull the nearest surface position. You'll need to recalculate your velocity vectors afterwards though, so not as elegant as the VDB solution. Nice example Sean the volume gradient idea is really clever.
 

int primID;
vector primUVs;
xyzdist(1,@P,primID,primUVs); // get the primID and primUV of the nearest prim on input2
@P = primuv(1,"P",primID,primUVs); // move the P to the position on that primitive

 

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