Jump to content

Filter DOP Impacts

Recommended Posts

Im making constraints based on impacts in DOP's.

I've got it all worked out except for the fact that I get so many impacts, i'm making way too many constraints.

I can see that i'm getting sometimes 6 impact points that represent one collision, 3 for one of the objects and 3 for the other. All the impacts are exactly the same except for the impulse attribute.

So, I need to find a good way to filter this. I'd like to end up with just one point representing each collision, but I'm not sure how to achieve this. I tried writing a complex nested set of for loops to test for similar collisions, but it got complex and slow.

The DOP Impact Analysis doesn't do what I want as I don't want to use a threshold to filter the impacts, I just always want the strongest impact.

I'd really appreciate any tricks to deal with this.

Edited by rich_lord

Share this post

Link to post
Share on other sites

Ok, Just 2 days to figure this out!

I tried so many things, but ended up just using a foreach SOP to step through each constraint and compare it. Its not the fastest......

I also do the same thing on the initial impact points too, which seemed to be a little faster as I cull some points before I even build the constraint.

The constraints are currently just made at the center of each rbd, but its easy to shift it to the exact point by using the info in the DOP Impacts.

Get the hip here - http://richardlord.tumblr.com/post/158126297816/hipfile-making-collisions-based-on-impacts-is-way



Edited by rich_lord
  • Like 3

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now