The maya exporter does not appear to work correctly with mirrored bones. Can anyone confirm this please?
I’ve been unable to find a windows collada viewer that supports the latest format, so I’m only testing this with my own viewer currently.
I have, however, seen the exact same thing before, with the same model. This was when I was writing my own maya exporter, there was a bit of extra code required to handle mirrored bones.
I was hoping there was maybe an inverted scale or something that gives the hint, but I can’t find anything in the maya export results that show this.
I just added this issue on SourceForge: #1416550. I’ve assigned the issue to one of our engineers to handle. As far as I see, there are two ways to deal with mirror bones:
Duplicate the data within the COLLADA file, with negative scales. That’s a lot of duplication, if you have animation curves on the bone as well.
Mark the original bone as “mirrored”, to indicate that this bone and its children should be mirrored… something along the lines of <extra><technique profile=“MAYA”><mirror_hierarchy>TRUE</mirror_hierarchy></technique></extra>
Which of these two are you interested in? Do you have another way to represent this data to propose us?
To be honest, all I was expecting was a alternate transform matrix for the JOINT node in the scene heirarchy.
I’m not sure why there would be any duplicated data needed.
In my case, I have bones for left and right arms (wings actually) of a model.
The modeller created the left wing by mirroring the right wing.
When you just apply the standard transformations in the scene heirarchy, you can see that the mirrored wing is orientated the same way as the original wing, rather than appearing like a mirror image as it does within maya.
When I was handling this in my own exporter a year or two back, from what I can remember, I would have a built up transform matrix for the node, and then if the bone was detected as being mirrored, I simply applied an extra transform. I will try and look up exactly what I did, but it was something along the lines of a matrix with a scale of -1.
So, what I might expect if I currently get this:
The idea being that your application code does not care whether a bone was mirrored or not during creation. All it wants is the final transformation of the node. The animation transforms would all have this extra transform applied as well.