Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

makehuman skeletal animation export to three.js

I try in Three.js to load skeletal animation (bhv) from blender (make human).

It is revision 77 last , make human last version 1.1.0 .

I try older version of three.js (js format) exporter for blender

Nice work with file from three.js repo : marine_anims.js not gui for me but clip goes play ...

About error : trackName at all

three.min.js:316 Uncaught Error: cannot parse trackName at all: .bones[spine-1].position

.bones[spine-1].position Fixed : .bones[spine_1].position

(do it for all strings with - )

Last version of my code is based on blendCharacter.js from three.js .

Maybe blender export ( blender 2.77a ) is wrong! - skinIndices and skinWeights are all zero [0,0,0,0,0,0,0,0,0...0]

  • Also (json last ver exporter) in one of variant i gets success with skinIndices and skinWeights but :

    { "rotq": [0,0,0,1], "parent": 7, "pos": [-2.0792,1.92099,7.0397], "name": "DEF_lolid.R" },

    { "rotq": [0,0,0,1], "parent": null, "pos": [0,0,-0], "name": "DEF_f_index.03.L" },{

parent : null ( 95% , 5% is correct )

I cant fix with hands it too complicated ...

(js format exporter) three.min.js:306 can not bind to bones as node does not have a skeleton T…E.PropertyBinding {path: ".bones[hips].position", parsedPath: Object, node: 11, rootNode: 11}

Online demo : http://maximumroulette.com/stack_demos/blendAnimationThreeJs/

(forget files missing) Put this in console !

FONTANA____.blendMesh.mixer._actions[0].play()

19 dec 2016 update : I found easy way for importing animation with bhv . Its collada format . I succes to implement one animation sequence. I will post about this after implementation more than one animation (in one export).

like image 971
Nikola Lukic Avatar asked Nov 08 '22 15:11

Nikola Lukic


1 Answers

Currently the most reliable ways to bring skeletal information into three.js from Blender are FBX and glTF.

  • FBXLoader example
  • GLTFLoader example, Blender exporter, and a tutorial on character animation with Mixamo.
like image 56
Don McCurdy Avatar answered Nov 15 '22 05:11

Don McCurdy