Author Topic: Moment of inertia  (Read 1373 times)

0 Members and 1 Guest are viewing this topic.

Offline IceFire

  • GTVI Section 3
  • 212
    • http://www.3dap.com/hlp/hosted/ce
I've asked about this before and undoubtedly its fallen by the wayside...but I think a major component to modded fighters and capital ships that has been neglected (and indeed shrouded in mystery) is the Moment of Inertia bit thats in the POF's.

This is the thing that makes the difference between a FS2 fighter being bounced by a stray TerSlash and a MODded fighter vaporized.  Or the difference between a AAAf dealing a moderate blow to a AAAf dealing a deadly blow.

Can someone who is knowledgeable about the source code please go in, find out what Moment of Inertia does and how it should be calculated for a model so that we can all start applying this calculation to our craft.

Thanks guys!  Good luck!
- IceFire
BlackWater Ops, Cold Element
"Burn the land, boil the sea, you can't take the sky from me..."

 
Ice, here's what I learned when you asked me to look into it.

First of all, the inertia matrix stored in .pof's is in inverse form to get rid of division operation in calculations. That doesn't mean it's the "real" inverse of the actual matrix...just that in every cell the actual value is the reprocical of what's written in .pofs.

The default length of the inertia vectors seem to be 1e-5.

For asteroids, the lenght of the inertia vectors is 1/(mass*radius)...which is standard physics.

For debris pieces, the length of the inertia vectors is 12/(mass*dimension)....which is NOT standard physics, since there's a weird scalar there.

And that's what I found before I had to leave to you-know-where :)

It's quite hard job to do what you're asking, since it's common practise to introduce scalars to normal physical equations to shape the game physics to developers liking, and because inertia vectors are calculated by the compiler...not by the game. We'd need BSPGen's source to easily solve the thing. Otherwise we'd just have find the fitting scalars, which takes some time. This is why I asked you to ask DaveB if he could dig them up from somewhere.

 

Offline IceFire

  • GTVI Section 3
  • 212
    • http://www.3dap.com/hlp/hosted/ce
Quote
Originally posted by Eternal One
This is why I asked you to ask DaveB if he could dig them up from somewhere.

Right, I should give him an ask about that.
- IceFire
BlackWater Ops, Cold Element
"Burn the land, boil the sea, you can't take the sky from me..."