mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
102.72k stars 35.38k forks source link

blender exports #496

Closed geFive closed 13 years ago

geFive commented 13 years ago

Tree.js is awesome!...My version of the Blender exporter has various settings to choose re. what to export/any suggestions?(i have learned that the "scene" setting, if checked, screws up my export) --still only parts of my animation seem to export, not the full “cycle” (i am trying to export a small,low-poly mode; with 90 frames of animation (rotate, scale,loc) …(blender 2.58)…i would appreciate any suggestions. Thanks, G.E.

alteredq commented 13 years ago

till only parts of my animation seem to export, not the full “cycle”

Do you mean you don't see full length of the animation (but model is ok) or that you don't see parts of the model throughout the animation?

How do you play back the animation?

If you don't see parts of the model, it's possible your model in Blender is composed of multiple pieces and you didn't select all.

If you don't see the whole animation length, it's possible model is fine but you do not play back all the frames. For example horse morph example has hardcoded length for horse animation cycle.

Check shadowmap example for playback snippet that uses animation length from JSON file.

Also in Blender exporter there is "frame step" parameter. This allows you to skip exporting frames. Set it to 1 if you want to preserve all frames (though usually you can have much less frequent sampling, morphing will make animation look quite smooth, for many types of animation it's enough maybe like 10-15 actual frames per second, rest will be interpolated).

geFive commented 13 years ago

Fantastic! what i needed to do was change the "keyframe" var number (i originally used the # of actual keyframes, but changed it to the total frames (95)) and it works beautifully! thanks a million. While I have your ear--I am wondering if there is an example that can perhaps point me in the direction of "procedural-?-" animation: eg;, the viewer animates parts of the model's anatomy by targeting bones in the armature?( as i was once able to do via collada + papervision 3-d)..though i prefer this workflow of belnder + three.js! thanks again.

alteredq commented 13 years ago

Since recently there is also ColladaLoader by @timknip, though I think currently it bakes the skinning animation into morphs upon loading, so you wouldn't be able to move bones by yourself during the runtime.

But maybe there is some code path that allows it, I think at some point of the time Collada playback was recomputing skinning every frame.

geFive commented 13 years ago

wow-it is an honor to get yr responses! i am VERY newbie at programming (esp webGL) and found his examples rather hard to plough through/though i remember him from ActionScript stuff....am willing to keep trying, though! and thank you again

-----Original Message-----

From: alteredq reply@reply.github.com Sent: Sep 4, 2011 4:59 PM To: ge5@earthlink.net Subject: Re: [three.js] blender exports (#496)

Since recently there is also ColladaLoader by @timknip, though I think currently it bakes the skinning animation into morphs upon loading, so you wouldn't be able to move bones by yourself during the runtime.

But maybe there is some code path that allows it, I think at some point of the time Collada playback was recomputing skinning every frame.

Reply to this email directly or view it on GitHub: https://github.com/mrdoob/three.js/issues/496#issuecomment-1993844