center of gravity? - Printable Version

+- Forums (
+-- Forum: Community (
+--- Forum: Feature Requests (
+--- Thread: center of gravity? (/showthread.php?tid=86)

center of gravity? - thelusiv - 08-29-2005

I need some way to figure out where the center of gravity in the cars are. I'm very tempted to make most/all the masses 0 and put one particle with all the mass at the center of gravity...but I'd rather not. What would be better would be if the game could tell me where the center of gravity ended up and I could adjust the weights accordingly.edit: This doesn't have to be in the game, it could be anything - another program or even a spread sheet that does the calculations, but I'd like something that will calculate the center of gravity and weight distribution given a bunch of masses and locations and the dimensions of the car.

center of gravity? - thelusiv - 08-29-2005

Playing with the s2k today I have found that a) the center of gravity is all wrong and b) it is the key to making this thing drive right, which I still can't make it this is very important. I have found that raising the weights makes the car lean in the turns much, much better. However, it makes them lean a little too much, so I've tried moving the back ones up and the front ones down, moving them towards the center or out, moving them forwards or's a lot of guessing and I'm running in circles, because I can only change one thing at a time and I have very little way of testing - besides driving, making a replay and watching. This is very time consuming.I have some physics books lying around that will probably tell me how to calculate the center of mass and I might be able to come up with a spreadsheet...I'd appreciate any tips.One thing that really messes with me, though - every time I change the weight distribution the cameras move. I didn't realize they were positioned relative to the center of gravity. This is a really bad way to position them because I have no idea where the cg is, plus changing the weights changes the cameras...

center of gravity? - dolio - 08-29-2005

Calculating the center of mass isn't too difficult, as I recall. You can separate it along each axis. For each mass, determine its position, then the center of mass is simplySadm1*x1 + m2*x2 + ...)/(m1 + m2 + ...)So, you multiply the masses by their position, add them together, and then divide out by the mass to determine the average position of the accumulated mass.I don't do spreadsheets, really. However, it seems to me it'd be pretty simple to have a column for mass, and then columns for the corresponding x, y and z positions of those masses. You can take those and calculate the moment (m*x; I think that's the correct term) row by row, as well as the total mass, and then at the end, divide out by the total mass to determine the overall center of mass (the overall center point can be found by finding the centers in each axis independently).From what I've read, most drifting setups want as close to a 50/50 weight distribution as possible, so a center of mass of 0 along the length of the car (assuming the 0 of each axis is in the exact center of the car) would be desirable. And of course, in the size-to-side direction, you'd want it to be 0. I'm not sure about the z-axis, however.Hope this helps a little.

center of gravity? - joevenzon - 08-30-2005

dollo is spot on.also, you might want to mess around with the suspension position a little more... keep in mind that it's the point at which forces from the wheels are applied to the body, so the body roll should be affected by its position in relation to the forces from the wheels (and the hinges). the mustang setup is quite good, i think (perhaps too good for a mustang), so you might want to try a similar setup.having the cameras positioned at the center of mass is a bit inconvenient, but it's how vamos works -- the car model is repositioned so that 0,0 is the center of mass. it's nice because you can draw the model in your 3D program wherever you want (as long as your coordinates are consistent with that position in your XML file), but that camera position thing is a side effect. i'll work on a fix for the camera position if it's too much of an annoyance.

center of gravity? - thelusiv - 08-30-2005

OK, I will work on a spreadsheet. Thanks for the explanation dolio, it's all coming back to me now...sorry, college physics classes made me ill. The simple Newtonian physics are easy but the stuff requiring Calculus...ugh. :oops:[QUOTE BY=joevenzon]also, you might want to mess around with the suspension position a little more... keep in mind that it's the point at which forces from the wheels are applied to the body, so the body roll should be affected by its position in relation to the forces from the wheels (and the hinges). the mustang setup is quite good, i think (perhaps too good for a mustang), so you might want to try a similar setup.[/QUOTE]I'll take another look at the Mustang. I've been playing with the Carrera more too, I need to get it driving sorta right.

center of gravity? - thelusiv - 09-03-2005

OK, I made a spreadsheet to calculate the center of gravity using the stuff dolio suggested (thanks). Using this I've updated the S2000's settings and maybe I think reduced the understeer a little more. If anyone's interested to use my file (or to check my math) you can get it here: - format is Open Office Calc (spreadsheet).edit: I just updated the spreadsheet, coincides with my latest SVN checkins.

- uldics - 02-11-2007

The Newtonian physics is actually not so simple to calculate as it looks like. If we speak about suspension, and it's work in rolling and stability, then it could get a lot more complicated as it is discussed here in this topic. As I know something about ships, maybe this information could give a little bit to gettin the game even more realistic.

1. Ships mass center is the one point at which a force pushes her down
2. Same amount of force is pushing her upwards, but in another point - center of displacement, which is higher than the first. And here it becomes nasty, as the ship is stable.
There are some formulas to calculate all this for ships (one force down and one up), but to relate to cars - you should spread the force of mass center to every wheel (taking into account the distance of wheel from mass center, like you did in your spreadsheet, but the other way), where a force of mass is pointing down and another force of the same amount pointing up. And that would only work if the car is not moving and have no suspension (like a brick). If there is suspension, then we have to take another formula of springs (acumulating energy; again new formulas) into account.
And to make it even nicer - that was only an insinght in static stability theory. Dynamic stability works with accumulated energy when a ship is rolling from side to side. If the car is moving, the mass center acumulates kinetic energy (X,Y,Z direction), which is counteracted by ground in wheel lowest points (if we take springs in to account, I don't even know where and how). Talking about ships for that purpose are used some, actually simplified (but not simple) formulas, where there is only few action-counteraction points and forces. With cars it gets kinda 4 times more complicated. We have to take into account a few forces - a portion of cars mass at every wheel, the natural (I hope it is called natural force, with letter n in english) force from surface up to wheel, the traction force (horizontal).
In physics it is kinda easy to calculate forces. It is kinda easy to calculate energies. But to do it all together needs some Einsteins brain. So, if you can figure this all out, and the game gets all of this, at first it would get extreme realistic physics, second, you would probably get a proposal from one of the Formula 1 companies to work for them.

I hope this was not too geeky and at least 50% was understandable. If there are questions, you are welcome, I'll try to explain.

- reece146 - 02-11-2007

FWIW, the center of displacement in a ship is roughly analogous to the roll centers of the front end rear axles and the resultant roll axis. Lateral force makes the car want to rotate about the roll axis.

For clarifaction, the roll axis is different from the axis made by the centroids of the car in the transverse plane.

The big deal for VDrift is to get a valid centroid and polar moment of inertia in the car models. This is why the particles are important. The centroid defines the wheel loadings but the polar moment defines how easily a car can "snap" into or be recovered from understeer and oversteer.

I've been meaning to dig into the VAMOS code to see how RC is derived/faked from the suspension geometry numbers in the .car files. Last time I looked at it I came away with the impression there were some assumptions being made in the RC generation. Haven't had a chance to look at it again.