I'm am getting quite far with moving my existing art pipeline over to collada. I was working on porting animation and skinning portions of my existing pipeline over to collada when I realized I totally skipped something fundamental in my basic geometry exporter. See the simple visual scene element below:
<visual_scene id="unnamed_scene" name="unnamed_scene">
<node id="Box01" name="Box01">
<matrix>1 0 0 10 0 1 0 0 0 0 1 0 0 0 0 1</matrix>
<node id="Box01_PIVOT" name="Box01_PIVOT">
<matrix>1 0 0 -10 0 1 0 0 0 0 1 0 0 0 0 1</matrix>
So, this is a visual scene element for a simple box exported from Max 7. This test case show what happens when you modify the pivot point for an object. It creates a child <node> element under the "Box01" element called "Box01_PIVOT". Oops. This was the first time I had moved the pivot point on an object, so of course my collada parser wasn't ready and didn't know how to handle the new node. Boom...crash.
My question is, ok, I get what the "Box01_PIVOT" node is. I'm assuming that since my engine stores vertices in pivot space, I'll need to transform each vert of the box's geometry by the inverse of the pivot point transform. Assuming that's right then I'm all set correct? Well, maybe not. I fired up Maya 6 and created the same simple test case of a box that had its pivot moved 10 units along the X axis as well. Upon export the visual scene element looked nothing like max's visual scene element. I didn't see a "Box01_PIVOT" node. The only way I know to parse the visual scene element above is to recognize that I've found a "*_PIVOT" node and take the appropriate action, BUT, if Max and Maya don't agree in the XML output or naming conventions, it seems I need to make distinctions between max and maya collada DAEs. Right? Or, maybe I don't fully understand the "Box01_PIVOT" node.
Anyone have any insightful ideas? Maybe I don't understand something basic here. So far, I haven't had to distinquish between Max and Maya DAE's in my collada parser and things are moving along nicely.
Thanks in advance,