On linux, i'm using:
the last vestion of Blender (2.79b)
the last version of ThreeJS (r95).
With Blender, i created a very simple rigged mesh and created several actions with the "Action Editor".
I would like to export to ThreeJS and be able to animate my character by calling the actions by their name.
I haven't found a clear tutorial on this subject on the internet regarding the latest versions of ThreeJS.
More over, i installed the Blender exporter, but when i want to load the json file,i get an error "three.min.js:737 THREE.JSONLoader: /public/scene/dae/r91/robot.json should be loaded with THREE.ObjectLoader instead."
Does anyone have a good tutorial to suggest for my case? Thanks.
The three.js JSON exporter has several bugs (like three.js#6326) related to exporting multiple animations.
As an alternative, you can use Blender to export to glTF, then load with THREE.GLTFLoader.
https://github.com/Kupoman/blendergltf
KhronosGroup/glTF-Blender-Exporter (experimental support for multiple animations here)
Related
I'm trying to figure out how to add animations from external files into a GLTF model file, server-side. Currently, I use threeJS to load the GLTF model into a website and FBXLoader to add animation from external files, which works perfectly. To enable use in Web AR like the Google model-viewer, I would like to merge these into a single GLB or GLTF file via script. I was looking into NodeJS gltf-pipeline or Python pygltflib library which looked promising, but I didn't find a way to include animations.
Does anyone have a solution on how to do this with NodeJS or Python, without an app like i.e. Blender?
does anyone know how to export models from threejs editor that support the GLTF KHR_materials_pbrSpecularGlossiness extension?
I found that the THREEJS GLTFExporter supports the extension as well as the importer. However, I could not find how to export a 3D object from threejs editor that supports this extension KHR_materials_pbrSpecularGlossiness.
Background:
I've created an object with a MeshPhysicalMaterial inside the threejs editor but whenever I export it to GLTF and import it into my app it has a MeshStandardMaterial. I do understand why it becomes a MeshStandardMaterial from looking at the code. However, I'm thinking that using the KHR_materials_pbrSpecularGlossiness extension I might get the importer to use another material.
Thanks for your help
If you import a glTF model in the editor that uses KHR_materials_pbrSpecularGlossiness, the respective glTF exporter will honor this setting and export the extension again. However, it's currently not possible to force the export to KHR_materials_pbrSpecularGlossiness. GLTFExporter does not provide an option for this.
If you require this feature, consider to make a feature request at github.
three.js R113
i'm trying to export a model to use it in three.js, it's important for me that after import on threejs i can see the smoke effect and the particles, but unfortunately this doesn't happen.
i don't know if is an issue or i'm doing something wrong in my project, so i've attached the blender project and a screenshot of my export settings.
can someone please help me to figure out what's wrong?
gltf exporter settings
in this github issue you can find the Blender project
I have been trying to export a skeletal animation, from Maya 2013 to THREE.js for quite some time, and I haven't seen this exact issue come up yet...
After getting frustrated for it not working. I resorted to copy and pasting the monster example then placing it with my model, my model has lost its animations. :( I baked them and everything when I exported in FBX-DAE.
I do get a warning but i don't know if it matters:
could not find transform "visibility" in node joint1.
Have you tried the OpenCOLLADA exporter?
There's a new project under way that might be of interest to you. Export path would be Maya > OpenCOLLADA > gltF > Three.js
Here's the glTF loader for Three.js:
https://github.com/KhronosGroup/glTF/tree/master/loaders/threejs
Do you have to have it in a Collada format? How about if you could export an animation from Maya directly to .JS?
You might be aware that THREE.js comes with an exporter for Maya, but it only works for static models. I have created an updated version that also supports exporting rigged and animated models. It doesn't require any intermediate steps: it just outputs straight to a .JS file. We have a pull request to integrate the updated exporter with the THREE trunk, but if you want to get the new and improved exporter immediately you can get it from this repository: https://github.com/BlackTowerEntertainment/three.js/tree/maya_animation_exporter. The exporter files are in utils/exporters/maya.
Hope this helps.
I have a simply question and hopefully someone can answer this. I need to get an animated model into three.js from Maya. I know currently the only exporter/ converter to the three.js JSON format that supports animations is the blender plugin. Unfortunately, my company works with Maya and Blender doesn't take FBXs. I already figured out that in order to do what I need to do, I need to export out of maya a Collada, import the Collada into Blender, then export out to three.js using the plugin.
But here is my problem. When importing the dae file from maya, I get an error:
Sax FWL Error: Could not resolve sid "**" referenced in skin controller.
for each bone in the rig and nothing is connected properly.
I also tried exporting the fbx from other Autodesk applications but each one gives me the same errors.
Anyone know either how to resolve this error or another way to get a Maya animated rig into blender without error.
It may not answer your question but this two animations from the three.js repository use collada .dae format instead of JSON format supported by the ColladaLoader.js:
http://threejs.org/examples/webgl_loader_collada.html
http://threejs.org/examples/webgl_loader_collada_keyframe.html
I have created an updated version that also supports exporting rigged and animated models. It doesn't require any intermediate steps: it just outputs straight to a .JS file. We have a pull request to integrate the updated exporter with the THREE trunk, but if you want to get the new and improved exporter immediately you can get it from this repository: https://github.com/BlackTowerEntertainment/three.js/tree/maya_animation_exporter. The exporter files are in utils/exporters/maya.