Position and scale doesn't persist in export

I’ve got a problem, or lack of understanding, with position and scale changes. So, lets go from the beginning:
Meshes are imported in .obj format, then they are merged together (because one “object” is set of multiple smaller meshes) and their position and scale is set ( my resource .obj files are kinda skewed, thats why I have to change the scale ):

BABYLON.SceneLoader.ImportMesh("","objects/", "file_name.obj", scene, 
        var combined = BABYLON.Mesh.MergeMeshes(obj, false);
        combined.scaling = new BABYLON.Vector3(0.01, 0.01, 0.01);
        combined.position = new BABYLON.Vector3(132, 1, 206);
        combined.id = 'object1';

After that I can move them with pointer events, everything works fine when you look at them in web browser, but problem shows up when I export the whole scene into .obj file.
Imported meshes keep their scale and position ( original one ), and nothing is changed. How can I fix that?

P.S. Export function is BabylonJS objSerializer

Hello! Why not using our ObjExport?

1 Like

Had some initial issues with it, but I got it working now.
Still the same issue persists with imported meshes positions and scale

1 Like

Pinging @brianzinn to see if he has some cycles to check

Did you try with baking transformations before exporting? Baking Transformations - Babylon.js Documentation

I have not looked at the exporter before, but hopefully we can get a repro and fix any possible issues. Can you share a .obj file with the issue? We can look at the object center and vertex positions and see what else might be going on then. I will have time next week - been working tonnes of hours the last 6 weeks :slight_smile:

I think I did try the Baking transformations, but will try again.
Sure, here’s the file.

1 Like

Thanks for the file! Can you share your export code? I’ll try to setup a repro in the playground and we can see where the issue is. Cheers.

Export function is Babylon’s own ObjExport

1 Like