So i am currently integrating babylon.js into my own application, so i can not re-produce it in the sandbox or idk how to get the files into a shareable sandbox. Currently i only can import .babylon files. But basically i’m not doing much.
I have build three arrows for my coordinate system with the AxesViewer. I set the length of the Axes to 80.
Then i made an cube (10x10mm) with one hole half-way through. I only could export it as .glTF. Then i uploaded it to the sandbox (everything fine) and then exported it as .babylon file.
Now i imported that file into my application with the AxesViewer. But now the Cube ist like 100 times smaller than the Axes. I thougth the Axes would be in mm too or in cm. Ok maybe they are just bigger i thougth.
But a friend who does other stuff with babylon tzold me his loaded files are also in mm and everything seems fine with the scaling and 10mm modells are 1/10 of his 100 (ScaleLine) Axes.
Any ideas what’s wrong with my Axes or what unit is uses. Or is the conversion through the sandbox wrong? Where can i convert .gltF to .babylon correctly?
Babylon, and most 3D engines, don’t define sizes in terms of physical units, exactly because each user has different needs. So one user might define that 1 unit in Babylon corresponds to 1 physical meter, and another one might define that the same 1 unit corresponds to 1 millimeter. The tricky part is that you have to be aware of what your model uses, since one model might come from a tool that uses the 1 unit = 1m conversion, while another might come from another tool that uses the 1 unit = 1mm.
If you can share your model and AxesViewer setup on a Playground (check this doc page for more instructions Using External Assets In the Playground | Babylon.js Documentation (babylonjs.com)) we can take a deeper look
Ok thanks for that link. I made a playground with my scene: Babylon.js Playground
So now you can see. The imported meshes are a box (10x10mm) but they are way smaller than the axes from the AxesViewer with ScaleLine = 1. Idk why. Also if i scale the imported meshes to unitCube (Codeline 24/25) then it appears bigger, but still not the size of one length of the AxesViewer, so i’m confused how the AxesViewer defines it’s axes length.
Seems like sceneLength = 1 is like 1m of my CAD-Model. So 0.001 = 1mm