CCD mode issue

~MyXa~
Posts: 4
Joined: Wed Apr 26, 2006 12:35 pm

Post by ~MyXa~ »

Etherton wrote:Very good maybe now you can document that Bullet does not have the limitation that Havok and Ageia has in its GJK.
I think that Bullet is a very good library and before it, there were only three legs on physics: Havok, Agia and ODE, now with Bullet quatrenium is completed. :D

PS:
On the bright side from this criticism the result was positive: an improvement of what was already excellent and know is brilliant
Now I am playing with 1.5d. appCcdPhysicsDemo sometimes hangs in GjkPairDetector::GetClosestPoints. Steps to reproduce:
1) set shooting speed to 120 (at speed 40 hangs too, but needs more patience)
2) set CCD mode
3) fire, wait until box hits the wall, reset scene
4) go to 3 if not hangs yet

I've tried this both in debug (with numObjects set to 120) and release.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

~MyXa~ wrote:
Etherton wrote:Very good maybe now you can document that Bullet does not have the limitation that Havok and Ageia has in its GJK.
I think that Bullet is a very good library and before it, there were only three legs on physics: Havok, Agia and ODE, now with Bullet quatrenium is completed. :D

PS:
On the bright side from this criticism the result was positive: an improvement of what was already excellent and know is brilliant
Now I am playing with 1.5d. appCcdPhysicsDemo sometimes hangs in GjkPairDetector::GetClosestPoints. Steps to reproduce:
1) set shooting speed to 120 (at speed 40 hangs too, but needs more patience)
2) set CCD mode
3) fire, wait until box hits the wall, reset scene
4) go to 3 if not hangs yet

I've tried this both in debug (with numObjects set to 120) and release.
Thanks a lot for the feedback. There was an issue in Time Of Impact calculations (implementation from this paper: http://www.dtecta.com/papers/jgt04raycast.pdf ). The GjkConvexCast implements the first 'brute force' version, SubsimplexConvexCast is the faster version (merged loops). GjkConvexCast was causing the problem. See line 125 of file:
http://www.continuousphysics.com/Bullet ... ource.html

To fix it, replace 0.0 by -SIMD_EPSILON:

Code: Select all

     if (nDotr >= -(SIMD_EPSILON*SIMD_EPSILON)) 
For nDotr values very close to 0, lambda became undefined (#INF), and things went wrong from there.

Can you let us know if this fixes your issue?

Thanks again, such feedback improves the software!
Version 1.5e is uploaded:
http://www.continuousphysics.com/ftp/pu ... source.zip

Erwin

PS: There are some TODO's in using the ConvexCast: If objects start off in penetration and/or move away from eachother, this should be detected before entering the TOI calculation, because that is not handled within the calculation.
Last edited by Erwin Coumans on Wed May 24, 2006 9:23 pm, edited 1 time in total.