I guess not much people need to import three.js json file to Blender, but I lost my original Blender file and want to recreate it from json that I exported earlier.
Latest three.js git only has exporter and no importer.
I tried using old json importer (from this link https://github.com/Bangybug/three.js/tree/master/utils/exporters/blender/2.71/scripts/addons/io_mesh_threejs) but it does not load back UV maps, only model and textures, so I wonder if there is some importer that could do this?
Unfortunately, there currently is no working importer to get three.js models into blender. You could try to load the object in three.js and then export it using the THREE.OBJExporter(). You might have a good chance to import that resulting obj-file into blender.
Related
I have a json file. I guess it exported with Three js exporter addon. I don't have source of this file, but i want to open it in blender again and convert to another format. Is this possible ?
I installed a lot of exporters(this one for example), but didn't find import from JSON. Three.js exporter after install says:
I would like to import JSON(made by three.js) data into Maya.
I found exporter of Maya, but couldn't find importer of Maya.
Is there good way to do it?
There are currently no Three.js JSON importer.
The Three.js JSON is meant to be a runtime format, used by Three.js for rendering in WebGL. Usually, you would export to the JSON format when you want to use it for the web. It is not meant to be a storage format.
There are other more common "interchange" formats like FBX, Collada, or OBJ, that are meant to be for storage and for passing around between different people and software packages.
How to export FBX three.js format file?
I found references on the internet showing how an FBX file is converted to three.js, but I can't find how a JSON three.js file is converted to FBX files?
At the moment, there are no exporters for the .FBX file format from a three.js json scene format. You can export to stl or obj. To see some examples of exporters, take a look at the examples in the dev branch. There you can find a folder for exporters: https://github.com/mrdoob/three.js/tree/dev/examples/js/exporters
At the moment, there is a pull request to add FBX loading, but no exporting.
Edit: For completion, a few more links:
FBX SDK Python - Might be helpful in case you want to learn about what is possible with the python bindings for fbx
Three.js Converters - Discusses a python conversion tool to the Three.js format. Might be able to reverse engineer this tool to convert Three.js to FBX.
I'm pretty new to three.js so bear with me!
I'm a seasoned user of Blender and have looking for the best way to export to a three.js importer.
So far, the most successful has been the obj importer, although I would love to include animations. With this in mind, I have tried the Collada dae importer (a bit hit and miss) and am now on the JSON route.
I have successfully (I hope) added the JSON export addon into Blender (2.74) which does now export JSON files. These work OK when imported into three.js, but for some reason, it is only exporting one object when I have several in the scene. I have also checked the JSON file and there is only one set of vertices.
I have read on older posts that it has something to do with parenting, but I can't export the scene as it breaks when imported for some reason.
The reason I want multiple objects is because I want to animate various objects within a scene using keyframes. Sounds easy? Not so much.
Are there any specific limitations of bone-based (on armatures) animations. I have a feeling it may have something to do with the object parenting to the bones?
My error could be in the JSON importer in the three.js file...
The documentation on this is a bit limited so any advice would be welcome.
I installed the three.js plugin for blender to export models to json format, i test it with very simple model contains materials of colors without textures but i get errors if i choose materials in options as in attached image, when i do not choose materials option i can export it but get error in reading it with JSONLoader, the error is "can not read property length of undefined" in three.min.js:264
the blender errors
the exported json file
You haven't added your code here but I think your problem is that when you don't export the material from blender, you have to make your own material; then assign it in JSON loader. If you try to get the material from the JSON file it obviously is nonexistent.
I have faced this error many times. Mainly because I wasn't using the latest releases of three.js or the exporter. If you are using a tutorial check that too.