Unable to load GLB Model in Some of the iPhones.
First have checked with a 50 MB GLB File. It Won’t Work on 2/3 of iPhones.
We got reduced it to a 27 MB GLB File. It won’t work on 1/3 of iPhones.
It finely works on android, mac, and windows. I don’t If anyone knows about this issue.?
When it doesn’t work on these iPhones, what problems do you see? Black textures? The page crashes? Something else?
The size of the file can be very different from its memory cost. Running out of memory is a pretty common cause of a crash on iOS. Try opening the GLB on https://gltf.report/ and you’ll see an estimate of its GPU memory cost there.
Problems are not common on all iPhones. In iPhone 13 Pro, iPhone XR - Crashes, iPhone 12 - Unable to load lightings, etc.,
GLTF Report :
disk 28.2 MB
gpu 94.3 MB
draws 45
uncompressed
Ok, those numbers don’t indicate any reason it woudn’t work on some iPhones. Assuming the model contains textures, what is the texture resolution?
If you can share ways to reproduce the problem (live demo, glTF model, etc) this will go much faster than my asking questions and trying to guess what your GLB contains.
The texture sizes are compressed and reduced it to 1 MB and below. I’ll check with my team and will try to get the model share to you.
The file size is less important than the resolution here — regardless of any compression, textures 4096px and larger may not work on some mobile devices.
We also tried the 400kb Model but it won’t work on iPhone SE, iPhone 8.
I think the error is on the Coding side. I will share the code with you to help me through this.
what you faced here ? any update ?
Unfortunately, the size of the file on disk, and the code, are unlikely to be the problem here. If a particular 3D model crashes on certain phones, the problem is in the 3D model. You will have to share that model to get answers, or else you’ll have to investigate it on your own.
A 400kb model could decompress to have 1000 MB of geometry or 16K textures, any of that will certainly crash your phone. There’s really no way to know without seeing it.
The reference to gpu 94.3 MB
suggests that maybe there’s a 4K texture in this model? My suggestion, if so, would be to try reducing it to 2K and see if the phone still crashes.
I had used the concept of storing cache in the local browser, but I have since removed that. As a result, it is now working fine on all iPhone
@donmccurdy Thanks For Support.