Jump to content
wowgetoffyourcellphone

Collada transform matrix numbers

Recommended Posts

Hi guy. So, I fix the "cape" prop point in the new unit meshes. I did this by hand by edit in Notepad++ (just add prop- to the name of the node). I was hoping to fix the "helmet" prop point too. I think it need to be rotated forward if you look at them in Atlas, but I am not sure of the numbers in the collada file. I am sure they represent position and rotation, but I am not sure which number is which and in what notation they are be used.

 


                      <node id="prop-helmet" name="prop-helmet" sid="prop-helmet" type="JOINT">
                        <matrix sid="transform">1 1.10134e-13 7.27118e-9 1.13687e-13 -1.20792e-13 1 4.02331e-7 -5.96046e-8 -7.27115e-9 -4.32134e-7 1 0 0 0 0 1</matrix>
                      </node>

 

If I do this by hand I can just apply the same rotation to all the meshes with Notepad++ instead of importing all the mesh to Blender (a program I am not familiar with anyway, so I would probably export them wrong). Or maybe I can just give the (cape-fixed) files to someone like @LordGood or @niektb and he can fix the helmet node and export again.

 

 

@Enrique

Edited by wowgetoffyourcellphone

Share this post


Link to post
Share on other sites
fcxSanya    389
On 10/9/2016 at 3:38 AM, wowgetoffyourcellphone said:

<...> I am not sure of the numbers in the collada file. I am sure they represent position and rotation, but I am not sure which number is which and in what notation they are be used.

They are a transformation matrix (a 4x4 one), so you have to look at the numbers from your example this way:

 1              1.10134e-13     7.27118e-9       1.13687e-13 
-1.20792e-13    1               4.02331e-7      -5.96046e-8 
-7.27115e-9    -4.32134e-7      1                0 
 0              0               0                1

To understand an existing matrix and construct one with required modifications applied, you have to know how matrixes for specific modification are constructed, this is a standard algebra topic and these matrixes are used in 3d graphics so you may find a lot of tutorials on the subject, one example: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/ .

But it may be not very convenient and error-prone to calculate these matrixes manually, so as you already said it may be easier to just use Blender to do modifications and re-export.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×