Jump to content

Collision depth (how far are points inside another geometry)


chiess

Recommended Posts

Hi,

 

I am not sure how I should search for that topic, but I have following issue:

 

Two objects are colliding with each other. How do I figure out how deep one object (the individual points) went into the other object. 

At the moment, I am using a attribTransfer to figure out which points are colliding (run them through a sop solver and simply color them red for now). But I didn't find a good solution to figure out the depth of the points inside the other object.

The solution I am currently using (but I am absolutely not satisfied with it), is a ray sop with distance attribute and reverse normals. It is a very ugly solution and depends heavily on the collision object geometry and their normal directions.

 

I am pretty sure that issue is very common and there are better solutions out there :).

If anyone knows a better solution and/or has a link to another discussion that already talked about it, that would be great!

 

Thanks,

chiess

Link to comment
Share on other sites

Hi magento,

 

Thanks! Yes, I was thinking about it, but was really looking for a solution without using volumes. The geometries I get are very complex and would need a couple steps to get nice looking volumes out (creating a waterproof hull with vdb's etc.). For a procedural solution (many different forms of geometry) this might be too much in the end, as of, too many steps which are extremely dependent on the input geometry. However, I think there is no "easy" way around it anyway.

 

Thanks!

Link to comment
Share on other sites

Without volumes, I think you can use the Ray SOP or the Minimum Position VOP and store the distance and normal attributes for the intersection (Ray SOP provides these) and @dist should show you how much the point is inside or outside (unsigned). So you would need to use the normals etc to determine if they are inside or outside and if they are inside @dist will be the value you need.

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