I imported a glb file into an empty scene. The glb file is only 5 MB, but after importing it into the Babylon scene and exporting it as a .babylon file, the .babylon file becomes 20 MB. When I checked the .babylon file, I found that many values are using high precision floating-point numbers, such as “position”: [0.09999833334166665,9.999500004166652,0]. Is there a way to reduce the precision of certain attributes in the saved .babylon file?
(I’ve tried modifying the engine’s useHighPrecisionFloats property, but after exporting it as a .babylon file, it still uses high precision floating-point numbers.)
But I need to integrate various information from the Babylon scene, such as lighting, camera input configuration, sprite manager, particle systems, and so on (all of which are associated with the imported models). The only thing I don’t need is something as large as 0.999999999999998.
I looked into the glTF + Draco solution, which may be a good option. I have another question: why are the properties in the .babylon file represented as 16-bit high-precision floating-point numbers? Is it specified by SceneSerializer.Serialize() or by the scene itself and exported as-is? Is there a way to reduce precision to decrease the file size?