Page 1 of 1

soft body solver + ?

Posted: Fri Sep 07, 2007 3:05 pm
by topcomer
Hi everyone,

I've developed a soft body stand-alone solver for volumetric meshes (with AABBvsAABB collision detection which is independent from the solver itself) which needs now to be interfaced with a rigid body world. I have already implemented an interface class from the follwing idea:

1- collisions are detected externally and informations are provided to both the solvers
2- the soft body solver computes its solution with the collision velocity as boundary condition
3- the soft body solver gives a reaction force
4- the reaction force is used by the rigid body solver to update the positions of the rigid bodies
5- the procedure is iterated

I've experimented with ageia's physX but it seems quite close and do not support trimesh vs trimesh collision, so that I was trying to represent the soft body as a set of spheres (moving accordingly to the soft body solution) to detect collision, but it seems that its solver wants to compute the new positions by itself.

Is it a good idea to use ODE+Bullet+Gimpact? Bullet and Gimpact would handle collisions and ODE the rigid bodies and terrains of whatever shape. Does someone have a better solution? Thanks.

Re: soft body solver + ?

Posted: Sat Sep 08, 2007 4:46 am
by Erwin Coumans
topcomer wrote: Is it a good idea to use ODE+Bullet+Gimpact? Bullet and Gimpact would handle collisions and ODE the rigid bodies and terrains of whatever shape. Does someone have a better solution? Thanks.
You could go for just Bullet and GImpact. It wonder why you would introduce ODE to this mix, as Bullet can do rigid body dynamics, terrains and whatever shapes too. If there is any feature missing in Bullet that is in ODE, give some feedback so we can schedule to add it.

Two way interaction could be done using impulse exchange too, rather then forces.

Thanks,
Erwin

Re: soft body solver + ?

Posted: Sat Sep 08, 2007 5:49 am
by Eternl Knight
The only thing missing that I am looking for (currently in ODE) are rotational motors for wheels on a vehicle. As I understand it, we can set rotational velocity but not "rotational torque".

Other than that, I have to agree with Erwin. Bullet is now pulling ahead of ODE in terms of performance and the collision detection is just as good (& better when looking at tri-meshes & compound convex shapes). Memory comparisons are the only "benchmark" I have yet to do, but hear that Bullet pulls ahead in this regard too.

--EK

Re: soft body solver + ?

Posted: Wed Sep 12, 2007 11:27 pm
by projectileman
The only thing missing that I am looking for (currently in ODE) are rotational motors for wheels on a vehicle. As I understand it, we can set rotational velocity but not "rotational torque".
Wrong,
Bullet now supports Rotational motors in classes btHingeConstraint and btGeneric6DofConstraint. But remember that the 6DOF is relative new and is not include in the SDK at this moment. You can get it right here:
http://www.bulletphysics.com/Bullet/php ... f=9&t=1480

In ODE, you need the AMotor and a Point2Point Joints for emulating a btGeneric6DofConstraint object, but with less functionallity.

Re: soft body solver + ?

Posted: Thu Sep 13, 2007 1:32 am
by Eternl Knight
Well, for the sake of completeness/clarity...

btHingeConstraint does not rotate the wheels of a car for you and (as you rightfully mentioned) the 6DOF Constraint is not "officially" part of the Bullet SDK. Nor was the 6Dof constraint out at the time of posting :)

I have not yet had time to test the 6 dof constraint (although I had noticed & obtained it already). If anyone can let me know how it works as a rotational motor - I would be most grateful.

--EK

Re: soft body solver + ?

Posted: Thu Sep 13, 2007 8:40 am
by Erwin Coumans
Bullet 2.61 has officially Francisco's improved btGeneric6DofConstraint. You can check out the GenericJointDemo. It also has optional Extras/quickstep support for Bullet constraints (point to point constraint only for now?). You can check Bullet+quickstep in the CcdPhysicsDemo, by enabling COMPARE_WITH_QUICKSTEP: in the latest version, picking works with quickstep.

But indeed, there is no torque motor. Could one of you work on support for this?
Thanks a lot,
Erwin

Re: soft body solver + ?

Posted: Thu Sep 13, 2007 1:55 pm
by projectileman
btHingeConstraint does not rotate the wheels of a car for you and ....
But indeed, there is no torque motor. Could one of you work on support for this?
IMAO, these motors should handle velocities, not torques. I saw in ODE that the Limit Motors allow you to specify velocities rather than torques. Internally these joints apply torques for reaching their targeted velocity, in an smarter way.

This is an standard behavior for servo-motors in robotics: you can purchase servo-motors that are based on velocities or fixed rotations; and these servo-motors may have a maximum power of torque depending of their model.

But if you need it so, you can implement torque based motors. It's more easy than you think.

Re: soft body solver + ?

Posted: Thu Sep 13, 2007 2:15 pm
by topcomer
Erwin Coumans wrote:
topcomer wrote: Is it a good idea to use ODE+Bullet+Gimpact? Bullet and Gimpact would handle collisions and ODE the rigid bodies and terrains of whatever shape. Does someone have a better solution? Thanks.
You could go for just Bullet and GImpact. It wonder why you would introduce ODE to this mix, as Bullet can do rigid body dynamics, terrains and whatever shapes too. If there is any feature missing in Bullet that is in ODE, give some feedback so we can schedule to add it.

Two way interaction could be done using impulse exchange too, rather then forces.

Thanks,
Erwin
Thanks for the reply.

The reason why I indrouce ODE in the mix is that I have an already implemented wrapper for it, and it would be time consuming (I guess) to change the wrapper to make it working with bullet.

Alessio

Re: soft body solver + ?

Posted: Thu Sep 13, 2007 2:49 pm
by Erwin Coumans
If you already have a wrapper for ODE, it should be even more simple to switch to Bullet. (you only need to make the changes inside wrapper).

It would make support easier, just use this forum.
Hope this helps,
Erwin

Re: soft body solver + ?

Posted: Thu Sep 13, 2007 5:06 pm
by topcomer
Erwin Coumans wrote:If you already have a wrapper for ODE, it should be even more simple to switch to Bullet. (you only need to make the changes inside wrapper).

It would make support easier, just use this forum.
Hope this helps,
Erwin
The main reason I want to use bullet rather than ODE is indeed this very forum (and of course, its features).

Problem is, I havent implement the wrapper by myself, but I was given it, I can have full help and sources by who implemented it though. I will ask also him to see if this is gonna be painless, hoping that bullet and ODE are similar enough to just make small changes without redesigning the wrapper itself.

Thanks,
Alessio

Re: soft body solver + ?

Posted: Mon Sep 17, 2007 9:44 am
by topcomer
Erwin Coumans wrote:
topcomer wrote: Is it a good idea to use ODE+Bullet+Gimpact? Bullet and Gimpact would handle collisions and ODE the rigid bodies and terrains of whatever shape. Does someone have a better solution? Thanks.
You could go for just Bullet and GImpact. It wonder why you would introduce ODE to this mix, as Bullet can do rigid body dynamics, terrains and whatever shapes too. If there is any feature missing in Bullet that is in ODE, give some feedback so we can schedule to add it.

Two way interaction could be done using impulse exchange too, rather then forces.

Thanks,
Erwin
I forgot to say, that is *VERY* important that all the collisions can be collected and examined by my external solver, which can then answer back with the reaction forces applied on the rigid bodies (which might also need to be moved to avoid penetrations). I cannot solve the contacts iteratively, one after the other, while the rigid bodies are still moving according to bullet internal solver. Can bullet do that?

Alessio

Re: soft body solver + ?

Posted: Mon Sep 17, 2007 2:29 pm
by topcomer
topcomer wrote:
Erwin Coumans wrote:
topcomer wrote: Is it a good idea to use ODE+Bullet+Gimpact? Bullet and Gimpact would handle collisions and ODE the rigid bodies and terrains of whatever shape. Does someone have a better solution? Thanks.
You could go for just Bullet and GImpact. It wonder why you would introduce ODE to this mix, as Bullet can do rigid body dynamics, terrains and whatever shapes too. If there is any feature missing in Bullet that is in ODE, give some feedback so we can schedule to add it.

Two way interaction could be done using impulse exchange too, rather then forces.

Thanks,
Erwin
I forgot to say, that is *VERY* important that all the collisions can be collected and examined by my external solver, which can then answer back with the reaction forces applied on the rigid bodies (which might also need to be moved to avoid penetrations). I cannot solve the contacts iteratively, one after the other, while the rigid bodies are still moving according to bullet internal solver. Can bullet do that?

Alessio
This is because I'm using a direct solver. Alternatevely, I could solve my linear system with Gauss Seidel coupling it with your constraint solver (it would mean just increasing the number of equations). If this option were available, it would be awesome.