Jump to content

Using VDB SDF's distance value, how do I make particles lying on some range of surface?


aesthete

Recommended Posts

Hi guys.

 

I've been trying to make particles snap onto surface using vdb sdf.(volume sample and gradient)

Specifically, I am trying to emit the particles from sdf volume and let them lie on some range of a surface.

  

I know how to snap particles on a surface but what I really want to make is exactly not that all particles stick on the surface.

I want some particles to lie down a short distance away from the surface outside or inside.(randomly)

It may be softball question but I can't get easily figured out…

Any suggestions would be appreciated!

 

lee

prac_sdf_distance.hip

image_01.jpg

Link to comment
Share on other sites

Here's one way. I give each particle a random sdf target,  subtract the current sdf value from that, and use that to scale each particle's velocity.

To make it easier to tweak I've run the sdf_target value through a ramp, then a fit range, so you can determine the min+max sdf values you want, and the distribution of those values.

 

 

prac_sdf_distance_mestela.hipnc

  • Like 1
Link to comment
Share on other sites

Thank you so much for your replying and the hip file. I did not even know that using particle's velocity can make them lied on what I determined!

 

If you don't mind, I have another question.

 

After trying out the way you suggested, I also wanted to make the particles move around on each particle's surface where they lie on.

 

It's like P + ((normalized gradient * negate) * (signed distance))

gives the result that particles are snapped onto the surface and slightly move around the surface.  How can I do this?

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