Due to the change in some projects I have developed a small local tool for the conversion from .obj to .glb (materials are not considered).
Using THREE.OBJLoader I import an .obj and then export it to a .glb using the THREE.GLTFExporter.
This works fine so far.
But I could see that a ~200KB .obj becomes a ~400KB .glb.
If I convert this .obj with Blender I get a ~100KB .glb.
Unfortunately I cannot always reproduce this behaviour. For the most part the threejs exporter is worse than the one from Blender. I have already played with all options of the THREE.GLTFExporter, but could not find any significant changes.
I have a small starting point, but honestly I lack the experience. When I look at the .glb as a JS object, I can see that there are several ArrayBuffers, including an Int8Array and an int32Array. The int32Array has a much smaller size, but when creating the BLOB object for download the int8Array is apparently used.
The glb-JS object also shows me a bytelength of ~400KB, so I am probably wrong with this approach and just misunderstand.
Does anyone have experience with the exporter, or can help me in any other way?
I’m new to this forum, and hope I didn’t do anything wrong, but if I did, my post may be deleted at any time.
Thanks in advance!