1
votes

Is there any way to export object from three.js? Any one will do : Collada,Blender,3ds Max,Maya

There is import plugin for blender (in master branch) but it's not working (can't even import exported cube), I tried to look in dev branch for updated version, but there is no importer, only exporter

Consider this workflow : User generates some objects/models in browser(three.js) and than I want to import these objects into 3d modeling software for further editing/post modeling

2
far as i know there is only an import function in three.js. its a rendering engine. if you'd like to export you'd have to make a call to a php/asp/serverside script which saves the file to the hd. - Kevin Kuyl
@KevinKuyl That's correct, but I still need such a script - Stecya
I'm confused, are you looking for importer or exporter? because you mention both in the question... In any case please have a look in three.js editor (threejs.org/editor) which has a menu with both import and export as well. test if its work for you and if so, the editor code is public so you can easily take the relevant code for yours - meirm
@meirm it has import/export in to json. What I need is ability to import this json into another 3d modeling software (3ds max, maya) - Stecya

2 Answers

1
votes

Its quite a question. As far as i know 3ds max or maya have no option to import JSON files. You'll have to export as something that 3ds max and maya can import. An OBJ file would be one option.

The first thing you need to do is to create the obj file as a string. The explanation of how an obj file is made can be found here.

Now its just a matter of a few simple loops to get the data from scene.children and generate the obj.

Once you generated the obj, you can send it to a server which saves it.

1
votes

There is a tool I used to use from MrDoob to export my meshes into a format that three.js can easily incorporate. Github to Mr.Doobs export tool https://github.com/mrdoob/three.js/tree/r92