Jump to content

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
Link to comment
Share on other sites

  • 2 weeks later...
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...