Jump to content

Push points out of Volume / Collision Deformer


dpap

Recommended Posts

How can I push points that are inside a volume so that they go to the the surface of the volume?

 

I suppose that is one way of getting a collision deformer like in the link below

 

http://vimeo.com/55876041

 

I tried the Ray Sop but the point stick to the wrong side of the geometry.

 

The tricky part is that they are already inside the volume and not approaching with some kind of animation.

 

I tried the technique use in the Waterfall- Go Procedural tutorial  just to test things , but no luck (although I really don't want to use Pops and loose my geo..)

 

Thanks

 

Push Point Out of Volume.hip

Link to comment
Share on other sites

Thanks for the tip Edward.

 

It works now but it gets really ugly if push the sphere beyond a certain point so I guess it is not the right approach for what I want do.

 

Same results both the volume based solution as with RaySop.

 

Just uploading the working (kinda..) for anyone who is interested

 

 

post-9497-0-40416100-1418343528_thumb.jp

Push Point Out of Volume 1.hip

Link to comment
Share on other sites

  • 3 months later...

When you convert on object to a Signed Distance Field, the values in the volume will represent the distance to the surface. If you take the gradient of the sdf, you get the direction to the the nearest point. So to move the point:

 

P = P + (Sdf value at P) * (gradient of the sdf at P) .

 

I always forget it negative is inside or outside, I believe this is also different between native houdini volumes and vdb's. But you can check the sign to see if you are inside, and only apply the offset to these points.

 

 

If you use a vdb, make sure you fill the inside (or at least make the inside band thick enough to catch all the points inside).

 

Hope that helps.

 

Cheers,

Koen

Edited by koen
  • Like 1
  • Thanks 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...