3

I am parsing the 1.4.1 Collada(exported from Blender), and I have noticed under the library_visual_scenes section, some nodes have extra technique sections.

Looking online, its not really clear what these are used for, or how I can use them. I assume they are used to transform the bone... but I am not sure. And why is this even needed!? Why is it just not baked into the bone matrix itself?

Example:

<node id="Armature_femaleLThigh" name="femaleLThigh" sid="femaleLThigh" type="JOINT">
            <matrix sid="transform">-0.9970781 0.002205959 -0.07635591 0.1638527 0.003207254 0.9999106 -0.01299338 0.3053502 0.07632041 -0.01320031 -0.9969959 0.8346263 0 0 0 1</matrix>
            <node id="Armature_femaleLCalf" name="femaleLCalf" sid="femaleLCalf" type="JOINT">
              <matrix sid="transform">0.9932371 0.1157223 -0.009409941 5.092525 -0.1157309 0.9932806 -3.67943e-4 -1.14292e-5 0.009304143 0.001454476 0.9999557 3.33786e-6 0 0 0 1</matrix>
              <node id="Armature_femaleLFoot" name="femaleLFoot" sid="femaleLFoot" type="JOINT">
                <matrix sid="transform">0.1140624 -0.991138 -0.06808402 4.458811 0.9934708 0.1139541 0.005483917 9.53674e-7 0.002323155 -0.0682651 0.9976645 2.38419e-7 0 0 0 1</matrix>
                <extra>
                  <technique profile="blender">
                    <layer sid="layer" type="string">0</layer>
                    <roll sid="roll" type="float">-1.571044</roll>
                    <tip_x sid="tip_x" type="float">5.96046e-7</tip_x>
                    <tip_y sid="tip_y" type="float">4.347153</tip_y>
                    <tip_z sid="tip_z" type="float">0.9915916</tip_z>
                  </technique>
                </extra>
              </node>
              <extra>
                <technique profile="blender">
                  <layer sid="layer" type="string">0</layer>
                  <roll sid="roll" type="float">-1.509084</roll>
                  <tip_x sid="tip_x" type="float">-0.02554714</tip_x>
                  <tip_y sid="tip_y" type="float">-0.4897394</tip_y>
                  <tip_z sid="tip_z" type="float">4.431761</tip_z>
                </technique>
              </extra>
            </node>
            <extra>
              <technique profile="blender">
                <layer sid="layer" type="string">0</layer>
                <roll sid="roll" type="float">-1.50752</roll>
                <tip_x sid="tip_x" type="float">-0.06722211</tip_x>
                <tip_y sid="tip_y" type="float">0.02900314</tip_y>
                <tip_z sid="tip_z" type="float">5.091998</tip_z>
              </technique>
            </extra>
          </node>

Thank you!

Mike5050
  • 625
  • 1
  • 7
  • 22

1 Answers1

3

Extra element is program / library / application specific. In your case Blender exported Blender specific options (techniques or else).

For instance if Blender re-import the file then Blender will read all these parameters and will configure the scene. Probably without profile="blender" Blender can't understand the technique in extra is belongs to Blender or not.

So basically, it holds application-specific configurations or extended configurations (extensions). You can put your custom data to there and probably most loaders will ignore them.

recp
  • 383
  • 1
  • 2
  • 14
  • 1
    I am implementing some skeleton animation, and all those nodes with the extra element are the ones that are not working correctly. Is there anyway I can find out how to use this information? layer, roll, tip_x, tip_y, and tip_z are not exactly self explanatory. – Mike5050 Nov 19 '17 at 21:18
  • @Mike5050 COLLADA is exchange format, profiles in extra is not part of main schema so animation should work without the extra element. Maybe there is a bug in COLLADA exporter at Blender. Try re-import to Blender and check if it is working or not. If found this: https://www.khronos.org/collada/wiki/Node_Blender_extension but it is not well documented. If you want to implement the Blender specific profile then you can read Blender sources or just drop an email to mailing list (https://lists.blender.org/mailman/listinfo/bf-committers), I guess you will get answers of Blender specific profile – recp Nov 20 '17 at 07:31
  • Hmmm. I imported it to blender and the T-Position is correct, but animating it just exploded into spaghetti, so this was not helpful in knowing if the issue is on my end or Blender Exporter. AH! I guess I shall just ditch Collada and use FBX... – Mike5050 Nov 20 '17 at 13:40