Softbody Wheels for racing sim

Post Reply
linksan
Posts: 13
Joined: Fri May 23, 2008 4:30 pm

Softbody Wheels for racing sim

Post by linksan »

Hi all,

In the process of making a racing sim I realized that using cylinders for wheels causes problems with grip/handling if the wheel is not parallel to the ground.
I was thinking about moving to softbodies for wheels because they could conform to the ground.

Are softbodies stable at high angular/linear velocities?
Can they be made extremely stiff like tires? (in the demos they usually act like jello)

Thanks for the help.
Coz
Posts: 10
Joined: Fri Mar 02, 2007 8:02 pm

Re: Softbody Wheels for racing sim

Post by Coz »

Apparently the recommended way of making wheels for a vehicle is use a raycast method; it's less flexible, but easier to setup, and (I'm making an educated guess here) might avoid this issue.

On the other hand, I have seen no discussion or and no demos of soft body tires; it might or it might not work, as far as I know, there's no proof of concept for this yet. You might have to browse the doxygen-generated API documentation( http://www.continuousphysics.com/Bullet ... index.html ) to see what options a soft body offers.
linksan
Posts: 13
Joined: Fri May 23, 2008 4:30 pm

Re: Softbody Wheels for racing sim

Post by linksan »

Raycast vehicles would solve my problem, I however need to be able to apply torque directly to the wheels.
I have experimented with the raycast vehicle, it works well but isn't that realistic.

I played around with the softbody demos but couldn't figure out how to make an object stiffer.

What parameter controls the stiffness of the spring?

Thanks
Flix
Posts: 456
Joined: Tue Dec 25, 2007 1:06 pm

Re: Softbody Wheels for racing sim

Post by Flix »

Coz wrote:
On the other hand, I have seen no discussion or and no demos of soft body tires
In the softbody demo there's a full "bunny" soft body vehicle, with soft tyres, and another weird kind of vehicle with three "ellipsoidal" soft tyres.

linksan wrote:
I played around with the softbody demos but couldn't figure out how to make an object stiffer.What parameter controls the stiffness of the spring?
softbody->m_materials[0]->m_kLST=kLST; // This seems to change the Link(s) elastic constant (AFAIK) Greater=Harder Smaller=Softer (in [0,1] range)

Other related useful things I've discovered/experimented (but I'm not completely sure about them):
Of course I think you should use pose matching as well:
softbody->setPose(useVolumeConservation,usePoseMatching);
softbody->m_cfg.kMT = kMT; // This must be something related to the volumetric elasticity (in the [0,1] range) but maybe it works only if useVolumeConservation is true.

To summarize my thoughts: I never tried something similiar because I think soft bodies are not flexible/stable enough to be used as wheels but if I should I would try with usePoseMatching=true,kLST=0.8 and (at first) useVolumeConservation=false (I think it might be more stable this way).

I say I don't think soft bodies are good enough for this, because in the past I've tried to simulate a soft soccer (icospherical) ball without being able to get any satisfactory results in stability/bouncing. IMH soft bodies on the other hand can be good to simulate other kind of objects, like cloths or fixed soft objects, without messing up too much with the parameters, that can lead to weird behaviors.

Anyway if you'll manage to do it, please let us know.

P.S. I still recommend to learn the use of the Blender Game Engine: it uses Bullet and you can play around with pose matching and the kLST constant easily without wasting time. That knowledge can be reused when programming your own soft bodies.

Hope it helps.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Softbody Wheels for racing sim

Post by Erwin Coumans »

Modeling wheels using fast rotating soft bodies, nor fast rotating rigid bodies will be suitable for fast racing vehicle simulations.
  • Although the "bunny vehicle" in Bullet/Demos/SoftDemo shows soft body wheels, their stability and friction model isn't suitable for that purpose.
  • The btHinge2Constraint in Bullet 2.75 (RC3 onwards) can model vehicle wheels using rigid body wheels, but it is only suitable for slow moving vehicles
You best bet would be to start with the raycast vehicle, and replace parts of it to make it more realistic.
Thanks,
Erwin
Post Reply