4

I have a model with simple animation designed on 3Ds MAX (my version is 2013). How can I export it to .json extension including its animation (for usage with Three.js)? I've tried several times to export it with tools from Three.js package but these go to waste ("morphTargets" array still empty).
How can I handle this problem? Is there any way else? Do I have to use 3D Maya to make animation for my model?
Thanks for reading!

Manhhailua
  • 1,062
  • 3
  • 13
  • 33
  • 1
    You can export to .fbx and use the fbx python converter with threejs to do this. I am currently trying to figure out how to actually access the animations, but max > fbx > json is a theoretically good path. I have been able to import my model using a sceneloader. – Andy Ray Dec 13 '13 at 06:17
  • I will try this way. Thank you, Andy! – Manhhailua Dec 21 '13 at 15:41

2 Answers2

7

To get morph targets you need to export each morph target object individually as a .obj file, including the unmorphed mesh. Then you need to pass them all to the python convert script found in /utils/converters/obj:

python convert_obj_three.py -i unmorphedmesh.obj -m 'morphmesh1.obj morphmesh2.obj' -o comppiledTargets.js

and then your morph targets will be populated.

If you want a boned / rigged mesh, I wrote a blog post about detailing the entire rigged 3ds max > threejs export.

It is currently impossible to have both a boned / rigged mesh and morph targets coming from 3ds max. There is an example of both skinning and morphing in threejs, so it's possible, but that model was made in blender.

Andy Ray
  • 30,372
  • 14
  • 101
  • 138
0

this StackOverflow post suggests that the 'correct' pathway is Max > OBJ > ThreeJs -- which would mean no animations, since OBJ is not an animation format. The three JS Max exporter here also does not include animation (neither does the Maya one), AFAICT

Sorry I don't have a better suggestion.

Community
  • 1
  • 1
theodox
  • 12,028
  • 3
  • 23
  • 36
  • If you don't get a more satisfying answer, mark this one as accepted so future readers will know there's no other option. – theodox Jun 10 '13 at 05:17
  • 1
    In this demo: "yomotsu.github.io/threejs-examples/md2". Author use this model: "yomotsu.github.io/threejs-examples/md2/droid.js". It include a not empty "morphtargets" array for animation. I wonder how he can do that?. – Manhhailua Jun 10 '13 at 08:45
  • 1
    Md2 is the quake 2 animation format. The comments in that file indicate it was converted -- i found this md2 converter online:http://oos.moxiecode.com/js_webgl/md2_converter/ There's an md2 exporter here: http://thegreystudios.com/blog/?p=278 (Warning: I haven't tried either of these myself!) – theodox Jun 10 '13 at 16:40