Archived

This topic is now archived and is closed to further replies.

robert_s

Falling car - crash sounds, momentum

Recommended Posts

I am trying to play car crashing sound with different sound volume which depends on how hard the car hits the ground. How can I simulate it. I know the car''s mass (1000kg) and velocity. I work in SI units (kilograms, newtons etc..) Now if the car is falling off a very high cliff and crashes into ground I would like to play the sound loud. I assume I would need to calculate momentum m*v but then what shall I do?. Any suggestions? Thank you in advance.

Share this post


Link to post
Share on other sites
you need the normal off the ground, then you can modulate the volume by


fImpactVelocity = -(GroundPoly.Normal * Car.Velocity).

you can also add a grinding sound by taking the magnitude of


fTangencialVelocity = (Car.Velocity + fImpactVelocity * GroundPoly.Normal).Magnitude();

You can multiply this by the mass of the car to get the momentums if you want.

For better results, instead of the car velocity, use the velocity at the contact point. Since the car rotates (maybe not much), it would give a more accurate result.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Thanks Olii.
Can you for example model it this way:

Imagine the car lands on ground after falling off a cliff.

1. We know its weight and gravity then we can calculate its falling velocity (mostly caused by gravity)

2. Now. If it hits the ground. it will compress each spring to minimum length (simple case). Ie. spring will become a solid material. ITs not a spring anymore. ( I am not sure how to do the following) It will basically bounce off the ground like a rigid body (imgaine dropping a metal ball on ground it will bounce off the ground a little bit how does it happen?). Once we know the force exerted from the ground on the object causing it to bounce up we can add this force to the spring force to work out the total force pushing the car body up. (Jump caused by crashing into ground).

Basically I dont know how to calculate the force which pushes the rigid body upwards off the ground after crash.
eg. metal ball

Share this post


Link to post
Share on other sites
yes, collision impulse calculations can be tricky

http://www.cs.unc.edu/~ehmann/RigidTutorial/

this gives the collision impulse resulting from a contact. Along with contact point velocities, ect...

If the spring is fully compressed. The force acting on the car at the spring attachement is then the spring''s max force, plus the force derived from the contact impulse (like the car body collided, not with the floor, but with the spring rod).

Not sure about the maths, but force would be

CollisionForce = CollisionImpulse / dt.

This force will create a torque obviously, making the car rotate after the collision. I''ve got a small demo of a cube hitting a plane if you want. It implements what''s in the tutorial above, plus other things (quaternions).

When the car hits the ground so hard the spring can no longer damp the impact, you would want to look at proper constraint solving, so the car don''t intersects with the floor. And that is very difficult to implement. David Baraff have most of the answers, if you can take on the maths. Look for his papers on google or http://citeseer.nj.nec.com/ (citeseer is probably the best collection of academic papers around).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
1. To make more realastic fall, you should use air-resistance (kav²too. there''s a limit speed for objects. If the environment is very big, g also varies ( (force pullls the obj)F = G.m1.m2/d² -note: G is univeral grav. contant, which is approximately 6.67, m1 is the objects mass, m2 is the mass of the planet. assuming that you''re discarding the gravity-interaction between each object)
2. There''s a unique constant for each object about how elestic they should act (if you want, i can write the full momentum calculation). If there are frictions, this is another story. When falling to the ground, you should use the same momentum calculations, with no exceptions. For this, you should define a mass for the "ground", planet or whatever you name the main mass. Same physics laws, no difference that hitting a ball to a plane.

As for the spring, the potential-energy for kept by springs is kx²/2. The force is F=kx, where k is a special constant for the spring, and..darn, i can''t graph it here (F x grahp, half rectange), but if the force is constant, Ep=Fx/2. Put kx intead of F and kx²/2. The falling object is "responded" by the spring for "x" distance, and then "pushes" the earth _with_ the spring (assuming that spring has mass too)

Hope this helps

Share this post


Link to post
Share on other sites