Hello Babylon community!
We’ve just merged a PR that introduces key improvements to Babylon’s glTF serializer.
Here’s a quick overview of the changes:
1. Left-Hand to Right-Hand Conversion
We’ve improved the left-to-right hand conversion by directly modifying mesh vertex data and transformations of left-handed nodes. This effectively reverts #13909 and addresses issues like GltfExport - flipped camera.
2. Vertex Data Preservation
We now avoid converting smaller vertex data types to floats unless absolutely necessary.
Additionally, shared geometries are now preserved in the exported glTF, eliminating buffer duplication and addressing issues like #14056, How to get instances exported when instantiating hierarchy from assetContainer?, Huge size discordance between GLB file exported by code or through Inspector, and Exporting large scenes to GLTF (Range error). Both of these changes will result in smaller export sizes.
We value your feedback! Please let us know if you encounter any issues or have suggestions for further improvements. Thanks for your support!
16 Likes
Very good, I hope to add the original texture export, otherwise exporting PNG images now will make the file larger
I’m not sure what you mean by this. We should already be exporting the same texture format as the original loaded texture format.
And the #15869 is the latest PR, isn’t it?
If so, should this not be marked as breaking change, too?
1 Like
I’m not sure what you mean by this. We should already be exporting the same texture format as the original loaded texture format.
I believe @brightMoon is referencing this issue: GLB export changes original image which has been added to our backlog
If so, should this not be marked as breaking change, too?
Hmm, I don’t know if this qualifies. The issue that was solved by #13909 is still solved by #15869. No public API contract has been changed, and I’d consider the details of an exported glTF file to be internal. But it is true that, if someone were interfacing directly with the exported glTF file, the numbers will be different.
At least, if #15869 is a breaking change, then that implies #13909 was also a breaking change.
1 Like
We marked #13909 as a breaking change because people relied on the output. #15869 should also be a breaking change. I’ve marked it as such.
Yes, that’s the question I’m referring to
1 Like