UnityGLTF icon indicating copy to clipboard operation
UnityGLTF copied to clipboard

Larger file size on export when combining meshes in Unity

Open revyTH opened this issue 7 years ago • 2 comments

Hi, I don't know if this is an issue or just normal behaviour, would like to ask anyway.

I am using a script in Unity which combines meshes which shares the same material into a single one. The goal of this operation is to reduce the draw calls on the gpu. I've noticed a larger file size when exporting the combined scene in glb format, respect to the uncombined one. In my case I have about 2 MB on the uncombined exported scene and about 6 MB on the combined exported scene. I can't uderstand this increase in the size since materials and texture are the same, only the geometries are merged. Does someone know why is this happening?

revyTH avatar Apr 10 '19 15:04 revyTH

If you have a mesh that is referenced (ie instanced) multiple times in the scene at different transforms, but then combined into a single mesh, they will be duplicated. If you have 3 such transforms, and then combined into a single mesh, it will be 3 times larger.

icegibbon avatar Apr 17 '19 14:04 icegibbon

Fixed in latest release

robertdorn83 avatar Feb 09 '24 08:02 robertdorn83