Jump to content
  • Advertisement
Sign in to follow this  
Fusi0n

calculating inertia tensors for non-symmetrical volumes

This topic is 4802 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello! I'm in the process of creating a simple vehicle simulator, and i'm approximating the volumes of the vehicles with a cubiod, with the centre of mass slap-bang in the centre of the cuboid. this is resulting in crap handling (feels like a truck) and i can only attribute this to the symetrical inertia tesnor i am using, as most vehicles (cars specifically) (should) have a centre of mass that is near the gear stick. so, i was wondering, how do i calculate an inertia tensor that reflects an offset centre of mass (along a maximum of 2 axis)? im assuming of course that changing the location of the centre of mass would change the inertia tensor? if anyone could help clarify this for me i would be very grateful :) thanks for reading!

Share this post


Link to post
Share on other sites
Advertisement
use monte carlo integration. saying the center of mass is offset by X isn't enough. I depends on more then the position center of mass. what I'm saying is there are many I's such that this is true. what you sould do is define a density function throught your solid and integrate. it seems reasonable that in the density would change very little in the horizontal directions and vary with the vertical. that is to say if I cut the car in half(front to back) the two pices would be symmetric with respect to mass distribution. but if I cut it in half the other way, obviously the side of the car with the engin weighs more. you could mess around with a few functions to vary the density with respect to the vertical. like guassian or something like that. the cubiod has an easy paramaterization so it may be that monte calro integration isn't the best choice, in fact you could probably analitically integreate it provided your density fucntion is analitical.


Tim

Share this post


Link to post
Share on other sites
i see, thanks for that timw. i was kinda hoping i could just nudge the inertia tensor along an axis and all would be good. how naive i am :(

Share this post


Link to post
Share on other sites
An easy way to move the center of mass is to just move your collision geometry with respect to the rigid body it's attached too.

I don't know how your physics pipeline is setup, but if your collision primitive class has a local to world transform matrix which you update from your rigid body's local to world transform matrix, just tinker with it there.

I've found in the past that making the center of mass be closer to the bottom of the cars box collision, will make it harder to tip over and so it will handle more like race car.

-Steve.

Share this post


Link to post
Share on other sites
yea, thanks for that Steve, i was thinking the same thing too, but wouldnt the offset collision volume result in a nonsymmetrical inertia tensor for the volume :)

Share this post


Link to post
Share on other sites
Quote:
Original post by Fusi0n
yea, thanks for that Steve, i was thinking the same thing too, but wouldnt the offset collision volume result in a nonsymmetrical inertia tensor for the volume :)



I'm not sure exactly what it does mathematically to the inertia tensor, but I wouldn't worry about it for a simple game vehicle. Moving the collision volume so the center of mass is lower to the ground will make your vehicle handle much better. Try it and you'll see.

Share this post


Link to post
Share on other sites
You can calcualte shifted inertia tensors using the Parallel Axis Theorem.
(see: wolfram - Parallel Axis Theorem and hyperphysics - pat)

Also, a more general approach for calcuating the inertia tensors for any volume is described in "A Symbolic Method for Calculating the Integral Properties of Arbitrary Nonconvex Polyhedra". - October 1984, CG&A. (I dont think you can get it online, so you might have to wander to your local uni. library)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!