Hi,
I am working with Babylon exporters. They can perfectly export scene into gltf or glb, this is working almost everywhere, but I can not import this created gltf/glb via Blender.
My problem is that I want to have a scene in .obj . Is there any option how to convert exported gltf/glb or how to directly export Babylon scene into .obj?
Hi.
I don’t know if I understood your issue, but I exported meshes from babylonjs as obj and work well in 3dsMax, so I think they should work too in Blender, maybe you are doing something wrong on export. You can test your exported meshes on https://sandbox.babylonjs.com first. here you find few examples about OBJexporter
It is a bit ambiguous there where to get the meshes, for example all the meshes. gltf and glb export works with scene, maybe it even uses the meshes part of the scene.
Should we get the meshes to pass to obj exporter as scene.meshes (or this.scene.meshes), for exporting the whole scene?
Then how to download the files. Is there a downloadFiles() method on the returned object (as in gltf and glb exporters), or do we have to construct a file through Blob API or something like it?
Is OBJ and MTL methods asynchronous or sync? They look like sync from usage above and from source code.
I would like to contribute once I get more fluency in webgl based programming. Yes the obj exporter code looks different in style than the others. Also kind of old but probably most compatible in terms of js and web features.
An async version would be cool.
How do I get the texture files. Obj as a blob, mtl as another blob. whatabout picture files?
Additionally it looks like MTL method does take a single mesh as an argument oppesd to OBJ method taking an array of meshes.
So, I kind of need to map or forEach through my scene.meshes array and call MTL method in each ietration. And then hand this utput array to the Blob constructor.
Am I correct?
Maybe later I can turn this MTL method to an array passed method since babylonjs gives us that as an array.