world transform of skinned meshes

I’m having trouble trying to figure out where the world transform of a skinned mesh is located. (When I say “world transform” I mean the position and rotation of the skinned mesh within the scene).
I have found 5 different ways that this information can be stored:
Sometimes it’s stored within the skeleton root node.
Sometimes it’s stored as a parent node of the controller, which is also a parent of the skeleton.
Sometimes it’s stored in a “disembodied joint” which is a parent of the skeleton (but not the controller)
And sometimes it’s stored within the controller node
As you can see it’s a nightmare trying to figure out a scheme that will handle all cases.

In general, the world tranform of a “instance_controller” (or skinned mesh) is the transformation stack starting from the <visual_scene> going through one or more <node> hierarchy to your <instance_controller>. All <translate>, <rotate>, <scale>, <matrix>, <skew>, <lookat> elements in this stack will contribute to the world tranfrom of that <instance_controller>.

Sometime, you might find your <instance_controller> inside the <library_nodes>. These library of <node> might be referenced by <instance_node> somewhere in your <visual_scene>. In that case, your world transfrom will be the transformation stack from <visual_scene> to <instance_node> + the stack from that referenced <node> to your <instance_controller>.

The parent of a skeleton or the “location of a skeleton node” does not contribute to the world transform of the <instance_controller>. Note that you can use more than one <skeleton> in a <instance_controller>.

Let me know when you find more nightmares.
Herbert

Hi uclahklaw,
Thanks for your quick answer.
The way that you say that the world transform is stored certainly sounds like the it ought to work, unfortunately that’s not the way the plugins do things.
For example the Max plugin never exports the controller with any parent node. The world transfrom is normally in a parent node of the skeleton.
You can see this by downloading this skinned mesh:
http://www.sharecg.com/v/3839/3d-model/ … -character
When you export to collada you will see something like this:


  <library_visual_scenes>
    <visual_scene id="armored_swordman_idle.max" name="armored_swordman_idle_max">
      <node id="armored_swordman-node" name="armored_swordman" type="NODE">
        <instance_controller url="#armored_swordman-mesh-skin-skin">
          <skeleton>#Bip01_Pelvis-node</skeleton>
...
        </instance_controller>
      </node>
      <node id="Bip01-node" name="Bip01" type="NODE">
        <matrix>0.000000 1 0 0.367488 -1 0.000000 0 5.45991 0 0 1 113.387 0 0 0 1</matrix>
        <node id="Bip01_Pelvis-node" name="Bip01_Pelvis" sid="Bone1" type="JOINT">
...

If you move the skinned mesh in the scene Bip01-node will change.
Sometimes the Max plugin does other wierd stuff, like using a joint to store the world co-ordinates. Other plugins behave differently as I mentioned above.

Unfortunately true as tools have different limitations and software bugs but we are striving for consistency and interoperability.

IIRC, Max always does world-space skinning so part of that export methodology makes sense. The second part sounds like the exporter is taking a short cut (it’s a bug) in setting up the coordinate system relationships for its skeletons and skin meshes.

Wondering if you had tried the ‘nextgen’ exporter and find the same issue?

the ‘nextgen’ exporter is only half finished. It crashes if you try to export a skinned mesh

did you post a bug report on sourceforge for the nextgen problem? Are you using the latest version? Do you have sample files to prove your bug?

I assume the nextgen plugin is a work in progress and the skinned mesh part isn’t finished

Give it a try. Skinned meshes are fully supported.

Well, I did give it a try and it crashes. If you try to export the skinned mesh in the max file linked above you will see.

I can’t reproduce what you are saying. Attached is the corresponding DAE file. Please provide us further input like 3ds Max version, NextGen version, 32/64 environment, etc. What exactly “crashes”, is it Max, is it your tool, what is the error message?

I use Max 8, sp3 on windows xp 32bit and nextgen_COLLADAMax_0.8.2_x86.
I see now I linked to the wrong model. This is actually the skinned mesh that I was talking about: http://www.sharecg.com/v/17941/3D-Model … -character

(The other one was not rigged)

Still no problem here. I must admit that i have only installed Max 2009 here.
What exactly “crashes”, is it Max, is it your tool, what is the error message?

Yes, it’s Max itself crashes. I don’t remember the message, but it doesn’t give any useful information.
I checked it doesn’t crash on max 2009, only Max 8.