No wheel's mass parameter in Bullet??

Post Reply
Verbo
Posts: 39
Joined: Fri May 08, 2009 9:27 pm

No wheel's mass parameter in Bullet??

Post by Verbo »

Hi,

I am currently integrating Bullet Physics in our engine and something came to my attention about the vehicle model: the btWheelInfo structure has no "mass" parameter at all. From what I understand from the code, everything is calculated using the chassis rigid body mass as an approximation of the mass of the whole vehicle, and I suppose it include the mass of all the wheels, is that right?

I am just asking this because I saw in some other engine, like Havok for example, that you could set an independant mass for every wheel. But of course, I had no access to Havok source, so maybe it does also encapsulate the wheels mass in the chassis mass.

It might sounds akward to ask, but is this simplification negeligeable or could it be more precise by adding the wheels mass into the calculation? If so, how much complex is it and is there some sample code that I could consult to help me with that? Of course, if it's negligeable, I won't bother.

Also, since there is no actual rigid body for the wheels, it means they are not colliding with anything, so isn't it creating some "wheel clipping" artifact when the car tries to turn near a wall or other objects?

I am still a bit rusted and catching up from all my maths and physics formation in university, so i appologize if some question suddenly sounds a little dumb :)

Thanks guys. :)

Verbo
User avatar
projectileman
Posts: 109
Joined: Thu Dec 14, 2006 4:27 pm
Location: Colombia
Contact:

Re: No wheel's mass parameter in Bullet??

Post by projectileman »

Are you trying to make a Monster Truck?

If so, then the Raycast car model is not for you. Bullet has a helper class for making vehicles at a low computational cost, implementing them with a sort of raycast chasis; that means that their wheels aren't bodies at all, but instead they are just rays that checks distances from the ground. In most racing games (like NeedForSpeed), just maintaining the car rolling over the ground is what only matters, so is convenient simulating a huge crowd of vehicles at a reduced level of detail.

But for a Monster Truck, you must create cylindrical bodies per Wheel and attach them to the chassis using Contraints (or Joints). The constraint most used in this case is btHinge2Constraint, which provides an axial constraing and a kind of suspension model. This is available only at Bullet v2.75.
http://code.google.com/p/bullet/source/ ... nstraint.h
Verbo
Posts: 39
Joined: Fri May 08, 2009 9:27 pm

Re: No wheel's mass parameter in Bullet??

Post by Verbo »

Hi,

Thanks for the feedback.

Nope, no monster truck. I was asking because I was just reading the Havok documentation about their vehicle model, and they do use raycasting, but in their SDK, the structure defining construction of the vehicle define a mass for each wheel). That`s why I was wondering if they were using the mass somewhere, even if there is no actual rigid body for the wheels.

Verbo
Post Reply