Results 1 to 4 of 4

Thread: maya exporter mirrored bones?

  1. #1
    Junior Member
    Join Date
    Jan 2006
    Posts
    9

    maya exporter mirrored bones?

    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.

    Muzza

  2. #2
    Senior Member
    Join Date
    Apr 2005
    Location
    Feeling Software, Montreal, Quebec
    Posts
    111
    Hi again,

    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:

    1. 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.

    2. 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?

    Sincerely,
    Guillaume Laforte
    Feeling Software Inc
    http://www.feelingsoftware.com

  3. #3
    Junior Member
    Join Date
    Jan 2006
    Posts
    9
    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:
    Code :
    <node id="Wing_inner_L" name="Wing_inner_L" type="JOINT">
        <translate sid="translate">1.433 1.070 3.237</translate>
        <rotate sid="jointOrientZ">0 0 1 40.630604</rotate>
        <rotate sid="jointOrientY">0 1 0 31.351257</rotate>
        <rotate sid="jointOrientX">1 0 0 -146.516602</rotate>
    then after the exporter fix, I would get something like this:
    Code :
    <node id="Wing_inner_L" name="Wing_inner_L" type="JOINT">
        <translate sid="translate">1.433 1.070 3.237</translate>
        <rotate sid="jointOrientZ">0 0 1 40.630604</rotate>
        <rotate sid="jointOrientY">0 1 0 31.351257</rotate>
        <rotate sid="jointOrientX">1 0 0 -146.516602</rotate>
        <rotate sid="jointOrientX">1 0 0 -146.516602</rotate>
        // this next line added to compensate for mirroring
        <matrix sid="transform">-1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1</matrix>

    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.

    Hope that makes sense.

    Muzza

  4. #4
    fairyanna
    Guest
    After much searching I have found that the URI error was caused by the memcpy, so back to square one.

    I tried some different sizeof() values, copying from the creation of the data objects but with no luck.

    Has anyone else had success with OpenCollada on armv7 / armv7s or have any idea what may be wrong?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •