Does there exists any command line tool that helps you import/export obj/fbx files. I couldn't get the autodesk fbx converter to work. Any decent package preferably CLI tool out there that does the heavy weight lifting or if there's any three.js converters.
Asked
Active
Viewed 1,736 times
0
-
`three.js` provides loaders/importer for `FBX` and `OBJ`. Have a look at [FBXLoader](https://github.com/mrdoob/three.js/blob/dev/examples/js/loaders/FBXLoader.js) and [OBJLoader](https://github.com/mrdoob/three.js/blob/dev/examples/js/loaders/OBJLoader.js). There are also [examples](https://threejs.org/examples/) for both classes which illustrates their usage. However, you might want to convert both formats to `glTF` first. Read the following guide for more information: https://threejs.org/docs/index.html#manual/en/introduction/Loading-3D-models – Mugen87 Sep 23 '18 at 21:05
-
1@Alien128 It's not quite clear what you're trying to do.. You want a tool that converts FBX to OBJ and OBJ to FBX? Or you want to create a scene in three.js, then export it to FBX and OBJ? – Don McCurdy Sep 24 '18 at 03:13
-
@Don McCurdy I want to convert OBJ to FBX and vice versa – Alien128 Sep 24 '18 at 05:48
-
1Oops! Sry, for the misunderstanding^^. – Mugen87 Sep 24 '18 at 08:49
1 Answers
3
For converting various 3D file formats, you can use assimp (https://github.com/assimp/assimp).
A library to import and export various 3d-model-formats including scene-post-processing to generate missing render data.
It also provides a CLI tool (which you have to build yourself).
However, it states that FBX export is still experimental. But give it a try!
EDIT: I just see, there is also a compiled version by now (if you are working on Windows): https://github.com/assimp/assimp/releases/tag/v4.1.0
You have to look for assimp.exe
.
Docs on how to use CLI tool should be in doc/AssimpCmdDoc_Html/AssimpCmdDoc.chm
, which is, however, a bit outdated.
Basic usage is:
assimp.exe export input.fbx output.obj [additional parameters]
See assimp help
and assimp export --help
for additional help.

Brakebein
- 2,197
- 1
- 16
- 21
-
-
I havn't used Autodesk FBX Converter yet. So I can't say anything about it. – Brakebein Sep 24 '18 at 15:11
-
-
Well, I'm not sure what you exactly want. For my understanding, you are looking for a CLI tool that is able to convert FBX to OBJ and vice versa. In my opinion, this has nothing directly to do with three.js. You could probably use three.js with NodeJS to build your own CLI, but there isn't a three.js FBXExporter class yet. – Brakebein Sep 24 '18 at 15:28
-
Any documentation on how to build the cmd tools. I managed to build the source code but the cmd folder is missing thee CMakelist.txt Any good documentation on getting started with assimp cmd tool ? – Alien128 Sep 24 '18 at 17:16
-
1
-
Thanks a lot for the help this works I had idea about assimp before but was unable to build the cmd tools myself and couldn't get any documentation, however the compiled version solved it all. – Alien128 Sep 25 '18 at 08:04