Sign in to follow this  

Q-Collide feedback

This topic is 4811 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently trying to use the Q-Collide package to handle collision detection between convex bodies in average constant time ! (using spatial and temporal coherence) : http://www.geocities.com/kelchung220/download/qcollide.ZIP and the thesis http://www.geocities.com/kelchung220/download/thesis.ps.gz I exported it into a DLL (via .NET 2003) And imported it back into C# (well not finished, I'm stumbling on the only 2 structures I have to pass in unsafe code) Has someone ever used Q-Collide ? With success ? What is the exact procedure to obtain the normal and penetration depth at contact point ?

Share this post


Link to post
Share on other sites
looks like you can't. Q-Collide, returns the closest points. When you have intersection, you have to track back until the objects are sufficiently close, then use the closest points to calculate the collision plane.

The col_Report structure returns the normal, and the closest points (more like, some weighted solution of a set of points on each objects). It returns also the normal.

Share this post


Link to post
Share on other sites
note that it's got a function that returns the closest point from previous frame. so, if you find the objects intersection, query for the previous report, where they were not colliding, and use that.

I usually don't like this 'track back in time' style.

Share this post


Link to post
Share on other sites
Well I cannot get normal and penetration depth at contact points.
Even though I use col_findprev_closest_features() to find the closest point the frame before the intersection, this function rarely returns different closest points on the 2 bodies so penetration depth is 0 and normal is degenerate.

Also I'm thinking of a slightly different method :
let C be the closest point in collision found by col_find_closest_features (actual time frame).
We find where C was in body 0 space at previous frame : P0
We find where C was in body 1 space at previous frame : P1
The normal at contact point can vaguely be approximated by (P1-P0).Normalize().
But I don't know how to find a penetration_depth out of that.
(P1-P0).Lenght() seems too imprecise.
Does someona has an idea ?

PS: I also noticed that Q-Collide crashes sometimes in col_test() or col_set_transform() for no apparent reasons. And it's very hard to debug since I made a DLL out of Q-Collide.

Or can someone point me to a free (for non commercial use) package to do collision detection and report normals and penetration depths for convex meshes ?

Preferably featuring :
- compiling into a dll easily.
- add/remove of bodies at run-time possible.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Meqon, tokamak, novodek, Newton all do collision between convex polyhedra. Newton and tokamak are free

Share this post


Link to post
Share on other sites
Thanks, I mistakenly thought it wasn't free

It looks nice but it's a complete rigid body simulator not just collision detection so if I use it I have no more physics to code :(
Can't have everything I guess.

Share this post


Link to post
Share on other sites
V-Clip, by brian mirtich, is supposed to be good for convex polyhedras intersection. it will return the intersection result straight away. It should be fast enough and stable enough.

It's using Voronoi regions for both acclererating the collision detection, calculating the distances, and calculating the contact points (that could be numerous, in case of a face/face collision for example).

That, and QHull, by John Ratcliff, should be what you are looking for.

I wish there was a collision detection package that does it all, but I haven't found one yet :)

Share this post


Link to post
Share on other sites

This topic is 4811 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

Sign in to follow this