Babylon export problem

I have this code for exporting my meshes, but when i import exported .obj file its different.
This is what i export.
And this is imported in babylon sandbox. I want it is imported next each other not like on picture in sandbox.

I’m not an expert (but I do know a little about using obj files in BJS). From the little I can see here, I’d say your script is exporting only the obj files (without the scene transformation). OBJ files will next show without transformation on their axis/pivot (which is likely to be in the center of the object, displaced on the y axis) or is it?

How can i export full scene with all axis/pivot transformation? I need it really.

I will be really happy if you help me. I need it into school.

Yes, well… this is where I am not all too qualified sadly :cold_sweat: :wink: (Fact is I never do this and never used the sceneViewer).
I believe @labris will kindly tell you how to achieve this, Will you? Thx in advance,

Thank you, @labris can you help me?

To be sincere, I don’t have experience with exporters.
First of all, I think, we need a Playground example from Peter @MrPeter in order to help in a most effective way.

Uf What do you exactly need? I have this in Angular + babylonjs and i cant share code.

Do you know somebody who could help?

You can try to simplify your problem in PG, otherwise here knows what is the function sceneViewer does.

Sure - Service offers and requests - Babylon.js

1 Like

Are you sure about this link? I don’t think this is worth a paid job :wink:
In fact, I’m pretty sure the answer has been posted not long ago on this very forum.
Sry that I did involve you in this. I thought you would know and it would take you just a sec. My apologies.

sceneViewer is class with a lot of funtionality. For this import and export i have own component. I can add 3D models from database to scene. Then i can thanks gizmo manager change their position. And i want export this scene with the function in begin of this topic.
this.sceneViewer.getAllMeshes is my function it return all meshes from scene except lines and ground.
I tried export whole scene with .glb but it show nothung in sandbox.
You can try this .obj in sandbox. Should i send you same .glb file? (6.7 MB)

Well, incidentally I’ve now seen some of your other posts all about the same thing and in truth, it seems like none of us really understands the processing. I know you stated it is ‘secret’ but it will be hard to help without this understanding. Why would you re-import an exported obj from bjs in bjs? Obviously exporting your object to GLTF will do the same as exporting the OBJ == it will export the object, NOT the object transformation in BJS (BJS is simply not made for this). If you export the BJS scene to import elsewhere say in a mediaplayer, that makes sense but it seems like this is not what you want. I guess we are all a little bit lost here. Not as if we were not willing to help (if we can)…

I know its hard help me without more info but i dont know what to say more :D. Idk how simplify it in pg bcs i taking 3D models from database. I want make user can export scene, save it in the file and when he need it he can import this file into scene. Just say me what you need to see i can send it. Now i am exporting 3 bones and this is console log('Exporting ’ + this.sceneViewer.getAllMeshes()):

Are there any reasons to use OBJ format?

So, should I understand that you cannot edit the original file. You have files (any files, obj, gltf) in a library and you import them in BJS, correct?

OK, but so far you are only exporting objects (not the scene). Exporting to a BJS scene is easy.

Should I understand import the BJS exported scene in another BJS scene. Again, that would be easy.

Again, I have no XP with sceneViewer but I know that all the above could be achieved (fairly easily).
If this is what you want, state it. Else, give us more details pls,

No there is not, i tried use GLTF2 but when i imported that .glb file into sandbox there is just this.
Exported model as glb
This is in sandbox…

GLTF2Export.GLBAsync(this.scene, filename).then((glb) => {

Yes i want export scene with all positions and later import this exported scene into scene.

Yes, well. But then you should have stated this long ago, because as per the above script you are exporting only GLTF (the object), not the scene.

Edit: this might help for SAVING your BJS scene (in BJS format) for later import in another BJS SCENE:

Do you know how to help me? This is my console.log idk how to get object Object :smiley: