Jump to content

OBD:OBAN: Difference between revisions

1,848 bytes added ,  1 March 2007
m
no edit summary
m ("what is the matrix?")
mNo edit summary
Line 196: Line 196:
::We may thus move OBD:OBAN to OBAN etc. Soon.
::We may thus move OBD:OBAN to OBAN etc. Soon.
::[[User:Geyser|geyser]] 22:19, 28 February 2007 (CET)
::[[User:Geyser|geyser]] 22:19, 28 February 2007 (CET)
:;geyser
:Thanks!
:The fixed transform can be anything including scaling which is quite common. For example the motorcycle from level 3 is scaled down a bit (0.7197) and its wheels are scaled down and they also have a rotation applied to them. Without this transform the resulting motorcycle looks funny, the wheels are a bit bigger and nearer to the center of the motorcycle body than they should makeing it look like it was compressed. Note that the animation frame only includes rotation and translation so any scaling that must be applied to the 3D models used in animation needs to be done with this matrix. Some other object animations where I saw this matrix used are the blackvan animation from the end of level 3 and the truck animation from the end of level 1 (the truck back model is way bigger than the truck front model so scaling is badly needed there).
:While you are technically correct about expressing the transform as a translation and a 3x3 matrix that does rotation, scaling, shearing and mirroring I have never seen a 3D graphic system (or documentation) doing it. It's much easier in practice to only deal with one 4x4 transform matrix which includes everything (the 3x3 transform part, the translation and the projection). In addition as you already noted the translation part is (m14, m24, m34) (the first 3 elements of the last column) so it is easy to spot it for someone who is only interested in object position. In a similar way a 2D graphic system uses a 3x3 matrix to express rotation, scaling, shearing and mirroring transforms for 2D vectors. This thing is sort of burned into my mind, when I saw 12 float values with 3 of them looking like a position I said to myself "alright, this must be a transform matrix without its last column" (I mostly use Direct 3D so I tend to think in row major matrix order) :).


<HR>
<HR>
708

edits