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.
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).
What we've tried so far :
Exporting a mesh with bones using the Three.js plugin for Maya. The exporter fails with the error
/ 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 //
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
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)
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 ?)
This is the error that shows up :
FBXLoader.js:792 FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights.
4FBXLoader.js:1225 THREE.FBXLoader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry.
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
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)?
You can find the exported files here :
https://www.dropbox.com/s/g5qf8bpm3eulg81/Pigeon_01.json?dl=0 https://www.dropbox.com/s/nts420ohemv8etb/Pigeon_01.fbx?dl=0
Thanks for your answers.
Etienne