## matrix transformations and OpenGL

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Tcll
Posts: 63
Joined: Tue Aug 31, 2010 12:11 am
Location: The Forest of Darkness

### matrix transformations and OpenGL

ok...
there isn't really anything in here that deals with blender,
(but I sincerely hope it doesn't ) >_>

anyways...
I've been going for a few years now and have gotten no answer to my Q.
if someone here could be kind enough to answer this for me,
or at least point me to a good source (since google ain't worth crap),
it would be much appreciated.

what I need to know is how to calculate transforms from a 4x3 inverse matrix.

if you're confused as to why:
I'm trying to read from a file that ONLY uses 4x3 inverse bind matrices for it's bones.

I've already tried adding [0,0,0,1] to the end before inverting it, and that doesn't work...
(the model still looks like it went through a blender) lol

anyone mind lending me a hand and informing me on some stuff here??
thanx in return

stiv
Posts: 3645
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W
I need more coffee to even begin to think about matrix math, but...

A good source of math how-to info is the Khan Academy videos.

A 4x3 matrix sounds...curious. I wonder what is in it? Typically transforms and such are 4x4 homogenous coordinates.

Tcll
Posts: 63
Joined: Tue Aug 31, 2010 12:11 am
Location: The Forest of Darkness
ROFL IK what you mean XDD

a 4x3 matrix (so I've read by many forums) is mainly a transform matrix used by bones...
the arrangement is as usual:
(I go by the width by height format, but I've also seen the row by column (3x4) format)
I'm not sure which is right honestly... >_>

X1 Y1 Z1 O1
X2 Y2 Z2 O2
X3 Y3 Z3 O3

transformation:
X = (VX*X1)+(VX*Y1)+(VX*Z1)+O1
Y = (VY*X2)+(VY*Y2)+(VY*Z2)+O2
Z = (VZ*X3)+(VZ*Y3)+(VZ*Z3)+O3

I'm sure you rmbr me talking about vertex transforms
(you actually had to take each vert and calculate it's transform through it's weights to get it's correct position)
^screw you Nintendo >:O

anyways...
my delema is the matrix is the inverse matrix...

unless you know anywhere I can find out how to calculate the inverse pos-
I think I've just answered my own Q... XDD

transform the verts using the inverse matrix,
then add the inverse of the inverse to the vert...

I'll come back if that doesn't work

thanx for the references btw. ^_^

Tcll
Posts: 63
Joined: Tue Aug 31, 2010 12:11 am
Location: The Forest of Darkness
oh wow...
ok... umm...

that didn't go as planned >_>
my model looks horrid D:

anyways...
so I deleted the inversion function that converted a 4x4 matrix,
and inverted the transform value...

I was better before doing this...

hmm...
would model scale have anything to do with it??
^I still need to calculate the 4th row for the inverse function
(since M+[0,0,0,1] only works half the time)

Tcll
Posts: 63
Joined: Tue Aug 31, 2010 12:11 am
Location: The Forest of Darkness
thank you for those Kahn references

what I actually have are 3x4 matrices.

Tcll
Posts: 63
Joined: Tue Aug 31, 2010 12:11 am
Location: The Forest of Darkness
*sigh*
wish I could edit my last post...

anyways...
I've finally gotton some of the educational results I needed on google...
but they weren't any different than what I've already tried >_>

if you'd like to see/test my problem,

just search 'Universal Model Converter dev version' on google
(I'd have to write down the link) >_<

you must have Melee (SSBM) with a few Pl****.dat files ripped from it.
just do an OBJ conversion of that file.

you should see the problem I'm having...

Pichu is my best conversion that I've tested.

any help would be appreciated, and thanx in return

Tcll
Posts: 63
Joined: Tue Aug 31, 2010 12:11 am
Location: The Forest of Darkness
bump

so how goes everything?? :/

I havn't accomplished anything or gotten anywhere -.-*

### Who is online

Users browsing this forum: No registered users and 3 guests