chiess Posted November 27, 2014 Share Posted November 27, 2014 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 Quote Link to comment Share on other sites More sharing options...
magneto Posted November 27, 2014 Share Posted November 27, 2014 I think you can do this with SDF volumes if your objects are watertight, etc. Quote Link to comment Share on other sites More sharing options...
chiess Posted November 28, 2014 Author Share Posted November 28, 2014 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! Quote Link to comment Share on other sites More sharing options...
magneto Posted November 28, 2014 Share Posted November 28, 2014 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. Quote Link to comment Share on other sites More sharing options...
pbarua Posted November 28, 2014 Share Posted November 28, 2014 Check out my files: get_inside_geo.hip Quote Link to comment Share on other sites More sharing options...
pbarua Posted November 28, 2014 Share Posted November 28, 2014 All inside attribvop: get_inside_geo_all_inside_vops.hip Quote Link to comment Share on other sites More sharing options...
pbarua Posted November 28, 2014 Share Posted November 28, 2014 All inside attribvop method_02: get_inside_geo_all_inside_vops_method_02.hip Quote Link to comment Share on other sites More sharing options...
chiess Posted November 28, 2014 Author Share Posted November 28, 2014 Hi, @magneto: yep, that is exactly what I am doing right now, using the ray sop. The result is ok, but could be better. Maybe I am doing something wrong though. @Pradeep Barua: Thanks for the example files, will have a look asap! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.