Bullet restitution question
Posted: Mon Aug 02, 2010 10:45 pm
Hi everyone,
I am currently doing a few small comparisons against the main engines (as you do) and have come across something quite unusual.
I'm assuming (hoping) that I am making a silly mistake, but for the life of me I can't see it, so hoped one of you might be able to.
I have a very simple scenario setup in all 3 engines, I have a sphere of radius 10 and density 1 suspended at a y value of 100. I then have a static plane at y position 0 and set Gravity to -9.81. In all engines friction and damping (linear and angular) is set to zero and both the sphere and plane have restitution coefficients of 0.5. I then simply simulate with 1/60th timesteps and am recording the results. "Penetration" width (or skin width as PhysX calls it) is also set to the same tiny amount in Bullet and PhysX (0.001), I can't find the option in ODE, though I believe it solves contacts slightly differently to PhysX and Bullet anyway.
I have found that PhysX and ODE effectively provide the same result, with minor differences due to very minor contact penetration differences. However i can't for the life of me get Bullet to behave in even a similar manner. The first return bounce sees the sphere reaching roughly 50% of the height that I see with PhysX and ODE and then of course it reaches rest nearly 50% faster. Up until the first bounce all 3 engines produce identical figures.
I'm utterly stumped as I have been through the way I have set things up over and over and (other than minor differences I can allow for due to differing penetration techniques) really can't see how the results from Bullet could be so very different.
i can post code if anybody wants me to, but it really is almost the simplest program you could produce with Bullet!
Any help or insight anyone can offer would be very much appreciated.
I am currently doing a few small comparisons against the main engines (as you do) and have come across something quite unusual.
I'm assuming (hoping) that I am making a silly mistake, but for the life of me I can't see it, so hoped one of you might be able to.
I have a very simple scenario setup in all 3 engines, I have a sphere of radius 10 and density 1 suspended at a y value of 100. I then have a static plane at y position 0 and set Gravity to -9.81. In all engines friction and damping (linear and angular) is set to zero and both the sphere and plane have restitution coefficients of 0.5. I then simply simulate with 1/60th timesteps and am recording the results. "Penetration" width (or skin width as PhysX calls it) is also set to the same tiny amount in Bullet and PhysX (0.001), I can't find the option in ODE, though I believe it solves contacts slightly differently to PhysX and Bullet anyway.
I have found that PhysX and ODE effectively provide the same result, with minor differences due to very minor contact penetration differences. However i can't for the life of me get Bullet to behave in even a similar manner. The first return bounce sees the sphere reaching roughly 50% of the height that I see with PhysX and ODE and then of course it reaches rest nearly 50% faster. Up until the first bounce all 3 engines produce identical figures.
I'm utterly stumped as I have been through the way I have set things up over and over and (other than minor differences I can allow for due to differing penetration techniques) really can't see how the results from Bullet could be so very different.
i can post code if anybody wants me to, but it really is almost the simplest program you could produce with Bullet!
Any help or insight anyone can offer would be very much appreciated.