Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Bobboau on October 02, 2004, 08:58:04 pm
-
we all know that this has been a bit of a thorn in our sides, this little 3x3 matrix in all the V models that we haven't been able to figure out how to calculate, and thus our models when converted don't act corectly.
well over the last day or so, I've been doing quite a bit or research, it turns out that this isn't simply a matrix, but it is in fact a tensor (http://mathworld.wolfram.com/Tensor.html).
further, I have managed to figure out a partal formula for figureing it out, I am posting my findings now in hopes that someone else can figure it out, and so I don't foget.
[
[ƒ°(y^2+z^2)], [-ƒ°(x*y)], [-ƒ°(x*z)],
[-ƒ°(x*y)], [ƒ°(x^2+z^2)], [-ƒ°(y*z)],
[-ƒ°(x*z)], [-ƒ°(y*z)], [ƒ°(x^2+y^2)]
]
that'd be the sum of every particle * mass/n_paricles as n_particles->infinity, x,y and z are the coords of °th particle
(ƒ° == sum, screwy font...)
-
finally someone's starting to figure this out. good job as usual, bob. :yes:
-
Dear God, I started bleeding from my nose and ears just from reading that link...:shaking:
-
IF (math > 5th grade Dutch high school) THEN {
CRASH and BURN
}
Else{
be-bored
}
cough
nyway, this is a bit too advanced for me, but it looks like a good job.
-
I have no idea what this thread is about...:nervous:
-
Great job! Decode that spagetti logic! :p
Really wish :v: would have documented some of that code.
-
I think that just making this post in public you prevented lots of people to try learn programming eheh :)
-
I just copy it from similar V models and it worked like a charm so far. :p
If you use models from FS1, you'll have to apply specific multipliers to the values for things to work properly. I figured those out once, some years ago.
-
I thinl he posted a load of complicated looking giberish just to try and look cool. :p :D
-
Originally posted by Lightspeed
I just copy it from similar V models and it worked like a charm so far. :p
Doesn't work for me. CoW suffered big time from this.
-
Hmmmm. Since I do not understand the contents of this thread may I hope that you will implement semi-newtonian physics into the SCP?
-
no. This is about the POF settings FS2 always had, and most mods ignore (fools! harrrrrrr.) :)
-
Another reason TVWP will be superior. :p
-
i wish people would start explaining how theese settings work in a manner that those of us who suck at math can understand.
-
http://en.wikipedia.org/wiki/Tensor
In mathematics, a tensor is a certain kind of geometrical entity which generalizes the concepts of scalar, vector (spatial) and linear operator in a way that is independent of any chosen frame of reference. Tensors are of importance in physics and engineering.
While tensors can be represented by multi-dimensional arrays of components, the point of having a tensor theory is to explain the further implications of saying that a quantity is a tensor, beyond that specifying it requires a number of indexed components. In particular, tensors behave in special ways under coordinate transformations.
-
the funny thing is that I thought bob was discussing about some piece of ununderstanded code related to the game physic :D
well, maybe not so funny:nervous:
-
AFAIK know a tensor is a special matrix, which can be used as an operator.
The said matrix multiplied by a vector may give you another vector.
Oversimplifid one dimensional example is mass as the tensor and aceleration as the vector and as a result you may get the velocity.
What Bob diged up seems early similar to the tensor we use in Strudiness (a matter I study at uni).
It is a 3x3 matrix, where the main diagonal has the secondary inertia of the particle for both axeses, while the other components have the simple secondary inertia.
-
so how does this relate to the ships physics characteristics in the game?
-
AH.... It all makes sense now.
::downs tequila shot::
Its clear as crystal. What? huh!?
-
this means that if you have a 20 mile long ubber destroyer and it gets hit by a 5kg missle going 10 m/s the ship won't spin around. moment of inertia is basicly how hard it is to turn something.
-
Ah. Well I've successfully managed to cut and paste FS2's MOI settings from similiar sized vessels. I know its a long shot but any chance MOI can be manipulated to allow newtonian physics? I think it would be cool to do turn around while flying forward like the old Wing Commander III game.
-
no, totaly unrelated
-
Hmmmmmmm...... I think I get the jist of it, though the maths is beyond me. It 'may' be useful if I can get my head round it.......
-
So theoretically, you might be able to fool around and get, say a Moloch to be thrown halfway across the galaxy by a Harpoon? Cool! :D
-
The biggest example of this is the AAA beams. Normal FS2 ships get hit and get knocked around a good deal. Our MOD ships get hit and fly through them like they have a billion tons of mass.
This is why MOD ships including fighters, cruisers, and destroyers behave differently than normal FS2 ships when hit by weapons. Generally the effect is unpleasant although not always noticeable.
-
the diagnal three are the most important, the bigger the number the more your ship will get knocked about, PCS defaults these values to 0. mass is also an important figure, oftine underweight
-
Some suggestions as to how this could be solved (which I can't check now since I'm at uni)
- Where does this matrix get read in in the source code?
- What variables are linked to this data?
I'm pretty sure that if we tracked the use of the matrix through model loading (and if entirely necessary, through physics) we'd either figure out how it does what it does or at least be able to blindly reverse engineer the solution.
I'm willing to do this, but I need some more information on this since I've been out of the loop for a while (and specifically, didn't actually know this was a problem).
-
look in the model file reading code, it's twards the top, it loads it into a simple 3x3 matrix, the only other reference to the variable is a single matrix multiply (acting on an impulse vector IIRC) there isn't much footprint of this in the code but it has a signifigant effect