title: Exporting mesh with animation (keyframes or bones) from Maya to Three.js
body: <p>We're currently working on a project where we need to have an animated mesh imported into three.js. Our 3D artist is working with Maya.</p>
  
  <p>From what I've read, json and fbx would be the prefered format for that. However, we haven't been able so far to import correctly either of those in three.js (or even export from Maya for some cases).</p>
  
  <p>What we've tried so far :</p>
  
  <p>Exporting a mesh with bones using the Three.js plugin for Maya. The exporter fails with the error </p>
  
  <blockquote>
    <p>/ Error: line 0: RuntimeError: file
    S:\Maya_2016_DI\build\Release\runTime\Python\Lib\site-packages\maya\OpenMayaAnim.py
    line 1415: (kInvalidParameter): Object is incompatible with this
    method //</p>
  </blockquote>
  
  <p>Now, without the bones, and given that we've triangulated the mesh and froze the transforms, the export works. However, the import fails with the error</p>
  
  <blockquote>
    <p>three.js:33418 Uncaught TypeError: Cannot read property '40' of
    undefined
        at parseModel (three.js:33418)
        at JSONLoader.Object.assign.parse (three.js:33704)
        at handleJSON (Loader.js:479)
        at FileReader. (Loader.js:241)</p>
  </blockquote>
  
  <p>Exporting a FBX file. No problem with the exporting pary, but the three.js loader crashes on import. I initially thought it was because of Three.js lack of support for binary FBX, but it seems to have been added (recently though. So maybe there's a bug with that ?)</p>
  
  <p>This is the error that shows up :</p>
  
  <blockquote>
    <p>FBXLoader.js:792 FBXLoader: Vertex has more than 4 skinning weights
    assigned to vertex.  Deleting additional weights.</p>
    
    <p>4FBXLoader.js:1225 THREE.FBXLoader relies on THREE.NURBSCurve for any
    nurbs present in the model.  Nurbs will show up as empty geometry.</p>
    
    <p>parseNurbsGeometry @ FBXLoader.js:1225 parseGeometry @
    FBXLoader.js:675 parseGeometries @ FBXLoader.js:648 parse @
    FBXLoader.js:126 (anonymous) @ Loader.js:163 FBXLoader.js:2157
    Uncaught TypeError: Cannot read property 'values' of null</p>
  </blockquote>
  
  <p>I'm beginning to feel a little stuck with this one. Is there anything obvious I've missed? Or are there alternative formats that would be also do the job (collada)?</p>
  
  <p>You can find the exported files here :</p>
  
  <p><a href="https://www.dropbox.com/s/g5qf8bpm3eulg81/Pigeon_01.json?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/g5qf8bpm3eulg81/Pigeon_01.json?dl=0</a>
  <a href="https://www.dropbox.com/s/nts420ohemv8etb/Pigeon_01.fbx?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/nts420ohemv8etb/Pigeon_01.fbx?dl=0</a></p>
  
  <p>Thanks for your answers.</p>
  
  <p>Etienne</p>