Page MenuHome

Transformation Matrices not imported correctly
Open, NormalPublic

Description

System Information
OSX El Capitan

Blender Version
Broken: 2.77

Transformation Matrices not imported correctly

I have created a simple camera animation using Maya, where Y is UP. Just two keyframes. The camera has just rotation animation. No translation.

I have exported that animation to Collada 1.4.1.

I have verified the exported file, it complies with collada specification.

This file is not correctly imported by Blender.

This is the file:

<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
  <contributor>
    <author></author>
    <authoring_tool></authoring_tool>
    <comments></comments>
  </contributor>
  <created>2016-03-22T03:43:28+0000</created>
  <keywords></keywords>
  <modified>2016-03-22T03:43:28+0000</modified>
  <revision></revision>
  <subject></subject>
  <title></title>
  <unit meter="0.010000" name="centimeter"></unit>
  <up_axis>Y_UP</up_axis>
</asset>

<library_animations>
    <animation id="camera1-anim" name="camera1">
      <animation>


      <source id="camera1-Matrix-animation-input">
        <float_array id="camera1-Matrix-animation-input-array" count="2">
          0.010011 8.218887 
        </float_array>
        <technique_common>
          <accessor source="#camera1-Matrix-animation-input-array" count="2" stride="1">
            <param name="TIME" type="float"/>
          </accessor>
        </technique_common>
      </source>



      <source id="camera1-Matrix-animation-output-transform">
        <float_array id="camera1-Matrix-animation-output-transform-array" count="32">
          0.990589 -0.136618 -0.008254 0.000000 0.025544 0.125292 0.991791 0.000000 0.134463 0.982669 -0.127602 0.000000 0.000000 0.000000 0.000000 1.000000 
0.995136 -0.076436 0.062146 0.000000 0.046400 0.920170 0.388759 0.000000 0.086900 0.383985 -0.919241 0.000000 0.000000 0.000000 0.000000 1.000000 
       </float_array>
       <technique_common>
         <accessor source="#camera1-Matrix-animation-output-transform-array" count="2" stride="16">
           <param name="TRANSFORM" type="float4x4"/>
         </accessor>
       </technique_common>
    </source>



    <source id="camera1-Interpolations">
      <Name_array id="camera1-Interpolations-array" count="2">
        LINEAR LINEAR 
      </Name_array><technique_common>
      <accessor source="#camera1-Interpolations-array" count="2" stride="1">
        <param name="INTERPOLATION" type="name"/>
      </accessor>
  </technique_common>
</source>



<sampler id="camera1-Matrix-animation-transform">
  <input semantic="INPUT" source="#camera1-Matrix-animation-input"/>
  <input semantic="OUTPUT" source="#camera1-Matrix-animation-output-transform"/>
  <input semantic="INTERPOLATION" source="#camera1-Interpolations"/>
</sampler>
<channel source="#camera1-Matrix-animation-transform" target="camera1/matrix"/>
</animation>
</animation>
</library_animations>


<library_cameras>
  <camera id="camera1" name="camera1">
    <optics>
      <technique_common>
        <perspective>
          <xfov sid="xfov">54.432130</xfov>
          <aspect_ratio>1.500000</aspect_ratio>
          <znear sid="znear">0.100000</znear>
          <zfar sid="zfar">10000.000000</zfar>
        </perspective>
      </technique_common>
      <technique profile="FCOLLADA">
        <vertical_aperture>2.399990</vertical_aperture>
        <horizontal_aperture>3.599990</horizontal_aperture>
        <lens_squeeze>1.000000</lens_squeeze></technique>
    </optics>
  </camera>
</library_cameras>

<library_visual_scenes>
  <visual_scene id="SCENE1" name="SCENE1">
    <node name="camera1" id="camera1" sid="camera1">
      <matrix sid="matrix">0.990589 -0.136618 -0.008254 0.000000 0.025544 0.125292 0.991791 0.000000 0.134463 0.982669 -0.127602 0.000000 0.000000 0.000000 0.000000 1.000000 
</matrix>
      <instance_camera url="#camera1"/>
        <extra>
          <technique profile="FCOLLADA">
            <visibility>1.000000</visibility>
            </technique>
        </extra>
    </node>
    <extra>
      <technique profile="MAX3D"><frame_rate>24.000000</frame_rate></technique>
      <technique profile="FCOLLADA">
        <start_time>0.010011 </start_time>
        <end_time>8.218887 </end_time>
      </technique>
    </extra>
  </visual_scene>
</library_visual_scenes>

<scene>
  <instance_visual_scene url="#SCENE1"></instance_visual_scene>
</scene>

</COLLADA>

Details

Type
Bug

Event Timeline

Mike Lima (lunarbase) updated the task description. (Show Details)
Mike Lima (lunarbase) raised the priority of this task from to Needs Triage by Developer.
Mike Lima (lunarbase) added a project: Collada.
Mike Lima (lunarbase) set Type to Bug.
This comment was removed by Mike Lima (lunarbase).

Please do not paste walls of text like that directly in reports/comments, such reports must be attached as text files instead. Even more important when we actually want to use those as files!

Also, don’t know why, but cameras seem to be PITA to import, we also have tons of issues with them with FBX addon…

@Gaia Clary (gaiaclary) assigning to you, feel free to close/archive as TODO or known issue…

Bastien Montagne (mont29) triaged this task as Normal priority.Mar 26 2016, 4:35 PM

I can take care by end of next week (easter holidays)

Here you have an example of Collada file that Maya can import correctly but Blender fails to do so.

This is a simple animation. Just rotation animation.

  1. First, the camera rolls to the positive side and then back in the x axis.
  2. Second the camera rolls to the positive angles and then back in the z axis
  3. Finally the camera roll to the positive angles and then back in the y axis.

The Y is up.

Thanks.

I have also noted that when you create quaternion animations Blender allows you to set x, y, z and w values above 1. I am not a mathematic experts but as far as I know quaternions are normalized to 1, so no value should go beyond that and this is perhaps the reason why Blender is not importing Collada files correctly. X, y, z and w should never go above 1 in a quaternion.

one question: do you guys have an ETA when this will be addressed/fixed? Thanks.