Page 1 of 1
Solved:right hand coordinate matrix to left hand coordinate?
Posted: Thu Dec 19, 2013 5:04 am
by vivekSivamRP
Hi all, i'm using blender for my 3D model which uses right-hand coordinate system, so when i try to import the model to irrlicht engine( left-hand coordinate system) the mesh and animation looks inverted in x axis.
(for ex, in blender my human Model performs animations in right hand but in irrlicht it does it on left hand side.)
so i'm trying convert the matrices from right hand coordinate to left hand. Can any one give some guidelines to proceed ?
Re: right hand coordinate matrix to left hand coordinate?
Posted: Thu Dec 19, 2013 3:25 pm
by CuteAlien
Generally importers should handle this. Which format are you using?
Re: right hand coordinate matrix to left hand coordinate?
Posted: Fri Dec 20, 2013 5:17 am
by vivekSivamRP
we have written our own export plugin for animated model in blender .Animation ,appearance and everything works fine but works inverted in x axis.
In the export plugin , we have written the matrix for bones and models in blender format itself(right hand coordinate) , after exporting we import the model in irrlicht engine which works on left hand coordinate matrix.
So what we are trying is to convert Right handed to left handed matrix in export plugin itself.
Re: right hand coordinate matrix to left hand coordinate?
Posted: Fri Dec 20, 2013 2:47 pm
by CuteAlien
I had to do that recently and found a solution here:
http://stackoverflow.com/questions/1263 ... ate-system
It depends a little bit on your situation, but in my case Gerrit's answer was the one that had worked. In my case I had to swap axes z up to y up as well. So your solution might be on of the other ones mentioned there (which did not work for me...).
In pseudo-code (aka ruby...):
Code: Select all
t = [1, 0, 0, 0,
0, 0, 1, 0,
0, -1, 0, 0,
0, 0, 0, 1]
result = multiplyMatrix4x4( result, t)
t = [1, 0, 0, 0,
0, 0, 1, 0,
0, 1, 0, 0,
0, 0, 0, 1]
result = multiplyMatrix4x4( t, result)
And don't ask me for an explanation - I was too lazy to work through this myself :-)
[Solved] right hand coordinate matrix to left hand coordinat
Posted: Sat Dec 21, 2013 5:20 am
by vivekSivamRP
After following
Gerrit's procedure , all the issues were solved. Thanks cuteAlien

And this problem taught me how important is, to go through matrix calculations.