UnityGLTF icon indicating copy to clipboard operation
UnityGLTF copied to clipboard

Exporting very complex OBJ with textures crashes Unity

Open clstavros opened this issue 7 years ago • 2 comments

Hello we are attempting to export OBJ files that consist of approximately 450 separate mashes with materials; each of which is about 3MB worth of data. (Matterport scan data). We can successfully export a single mesh or small subset, but when attempting to export to GLBs the entire thing Unity hangs and the file is zero bytes. If exporting to GLTF we get a gltf and .bin file but no images for textures and a similar hang in Unity. presumably, this might be related to the mesh texture images, which are jpg and about 500Kb-1MB ea. Trying to export Looks like memory issues. Using OS X.

Any suggestions on how to debug or get a better sense for where this is hanging? Thank you!

clstavros avatar Jun 29 '19 23:06 clstavros

Update: the OBJ is in fact closer to 1000 individual meshes. If we cut it down to @100, we can successfully export.

The raw OBJ project with all textures is about 385MB (all 1K meshes, combined). The exported GLB containing 100 of the meshes is 265MB. But, it works.

Any suggestions on how to optimize this workflow or the source OBJ? Would running the jpg texture files through a compressor help? Are there any tricks to merge the meshes to get a smaller result?

Thanks again.

clstavros avatar Jun 29 '19 23:06 clstavros

Please update to the latest version and open a new issue if the problem persists. Thanks!

robertdorn83 avatar Feb 09 '24 09:02 robertdorn83