Correct gravity and Mass ?

Posted By: Olzii

Correct gravity and Mass ? - 08/22/05 07:16

Hi all,

I am making a car game. My level has scale 1quant = 20 cm.
In manual there is hint to set gravity :

<<<Earth gravity at sea level is ca –9.81 m/s2, 1 quant is usually defined to be 1 inch, which equals 2.54 cm. Therefore to simulate gravity on earth with a standard scale you would set vecGravity.z to (–9.81 * 100 / 2.54) = -386.>>>

By this hint, my gravity is (–9.81 * 100 / 20cm) = - 49.05

And i set my car's mass in kg units. Also i applied torque to car in N.m units.

And my car is acting like SPACE car.

How to set correct gravity and mass ?
Posted By: Calined

Re: Correct gravity and Mass ? - 08/22/05 14:21

em.. i thought the gravity is always the same...i mean how fast an object falls down no matter how heavy it is..
so i think -9.81 is right^^
...i dont know how big a quant is @___@

but i think it should move 9.81 m per second, so you have just to calculate it right^^"
Posted By: fastlane69

Re: Correct gravity and Mass ? - 08/22/05 17:12

You are making a classic mistake. REal physics do not corrolate to game physics. You will have to tweak the games gravity and mass so that things look and act like you want them to. In other words, don't focus on making your game gravity 9.8 m/s/s; rather tweak it in gamestudio until it looks and acts like you want it.

Also, remember to make ample use of the "time" variable to take variances in timeslices into account.
Posted By: Yulor

Re: Correct gravity and Mass ? - 08/23/05 03:38

What fastlane says is true, the one quant = one inch is just given to you to give people an answer to the question, it does not need to be an inch, if I told you it was one foot it would not make -386 quants/^2 any different. In short the size of a quant does not matter.

However if you were wondering -9.81 m/s^2 is the acceleration due to gravity, which is a constant near the surface of the earth.. (calculation by Gm/r^2)
Posted By: Olzii

Re: Correct gravity and Mass ? - 08/23/05 04:29

If fastlane said true , it is very hard to make real car simulation.

I think that it must have some relationships between Gravity->Mass->Torque.

It is very difficult to set everything by random choosing & observing.

How can i make real simulation for over 30 different cars ?
Posted By: fastlane69

Re: Correct gravity and Mass ? - 08/23/05 04:35

Same way you make a good level: with good ratios.

Pick a car with certain gravity and mass stats....tweak it till it looks good...now use this car as the benchmark and modify each car accordingly.

Example: Ford mass = 1000 kg Chevy mass = 2000 kg.

There is a 2 to 1 ratio in chevy to ford mass.

Now you tweak everything and find that in 3DGS, a Ford moves juuuussssstttt the way you want it, but you had to set ford.mass=25764;. Now, what is the chevy mass? Since it's a 2-1 ratio, mulitply that by 2 and set chevy.mass=51528.

This will give you the correct scale just about every time. If it doesn't, then you can perturb around these first order values to find the correct "feel" to your motion.

(PS: Even if what I said was untrue, a "real" car simulation is still a very hard thing to do )
Posted By: Olzii

Re: Correct gravity and Mass ? - 08/23/05 04:45

I think it is very hard. Even Marco did not make good car simulation in his car tutorial. His car has VERY BAD BRAKING /not like as cars in other games/.

For example, GTA's car has very good acceleration, realistic braking and hand braking.

Did somebody make some expirements on a6 car configuration ?

Is it possible to make cars like GTA using a6 physics ?
Posted By: Helghast

Re: Correct gravity and Mass ? - 08/23/05 07:05

yes, you ARE able to make gta cars... thing is, i did it EXACTLY the way fastlane told you to, take the time, and tweak...
you think GTA was made in a week?? you really gotta sit down in front of it and take the time, this is how i got around doing good cars in A6PE.
Now also, you should see where you hinge the wheels, this can cause problems as well, if you make your wheels too low on your car, it feels like it bounces everywhere, make your wheels too low poly and it hops up and down when moving.

all sort of small tricks that you gotta look out for, now... what i did, take a look in the manual, and looked up every physics keyword. then read what they do, and think how any other car game would have that

like for instance, wheel bounciness, it is 100% rubber, but if you fill that in, it wont bounce at all, now you think further, a wheel has air, hey, cool that's about 40% of air, that leaves us 60% of rubber... hhmm... air bounces, rubber doesnt *filled in a car wheel *, because the rubber overrules in quantity here, make a small value for bounciness.. here comes the tweaking... you allready know you dont need a high value, so you start at maybe 15, then look if it bounces realistic enough for your feeling, keep adding/substracting numbers untill it feels good.
this was a small example on how you should think about these kinda things.
i know it takes up a lot of time, but in the end.. it's worth it

hope it was of some kinda use.

regards and good luck,
Posted By: Olzii

Re: Correct gravity and Mass ? - 08/23/05 07:50

Hi Dennis,

Please show me your results. I want to see good a6 physics car.

Please show me your demo or just EXE.
Posted By: Doug

Re: Correct gravity and Mass ? - 08/23/05 21:00

Quote:

...a "real" car simulation is still a very hard thing to do )




Having wasted a lot of time in a previous job trying to make a “real” car simulation, I can agree with this 100% (and GTA cars are fun but very unrealistic ).

If you are shooting for the niche market that wants ultra-real car simulations, I can suggest some books. But I will warn you that it isn't at all easy. Even the most realistic simulations fake it in some areas. You can spend months researching how the rubber on the tires react to different forces and still not have enough data to simulate a weekend drive.
Posted By: Olzii

Re: Correct gravity and Mass ? - 08/24/05 01:02

First, I want see if somebody made good simulations using A6 physics. If it is possible and somebody made a car which i want, then i can do research and will try to do it.

I don't want waste my time. If it is impossible now, i will publish my first game with a6 car that i did it now.
Posted By: Marco_Grubert

Re: Correct gravity and Mass ? - 08/31/05 00:49

Quote:

First, I want see if somebody made good simulations using A6 physics. If it is possible and somebody made a car which i want, then i can do research and will try to do it.



To my knowledge the Racer demo is the best car demo using A6's physics engine that's currently out there. There are ways to improve on it by tweaking the constants, models, and applying different acceleration/braking equations, adding hidden counterweights, etc.
But if you want a much more realistic or much more arcade-ish simulation then a general purpose physics engine will be only of limited use and you'll probably have to spend a lot of time recreating racing physics from scratch.
Posted By: Ogtrax

Re: Correct gravity and Mass ? - 08/31/05 20:15

I have always thought that mass != weight. In games it might be different though. Havent used the A6 physics engine either. I thought mass was mass, and that weight was a force.
Posted By: Helghast

Re: Correct gravity and Mass ? - 09/01/05 21:04

Quote:

Hi Dennis,

Please show me your results. I want to see good a6 physics car.

Please show me your demo or just EXE.




add me on msn or ICQ *prefer msn* i'll show you something, i got no webspace, so i cant upload :P
Posted By: fastlane69

Re: Correct gravity and Mass ? - 09/01/05 21:34

Quote:

I have always thought that mass != weight. In games it might be different though. Havent used the A6 physics engine either. I thought mass was mass, and that weight was a force.





Who's saying diffrently?

Mass HAS to be a measure of an object tendency to keep moving (Inertia) and Weight HAS to be a measure of the Earth's gravity field on this Inertia (w=mg).

Any game that does it diffrently is not using Physics and the A6 PE shoudl be no diffrent.
© 2024 lite-C Forums