I am loading a GLTF model this one Sony A9 II with Lens - Buy Royalty Free 3D model by CG Asura (@CG.Asura) [a83807c] - Sketchfab Store
For some reason I don’t understand why the browser freezes for a few seconds, can I do something about this, what exactly is going on?
I wouldn’t be surprised if it’s down to the texture count and resolutions - 24 4k textures is a lot of data to transfer to the GPU! I think that’s around 1.5GB of GPU memory.
If that is the issue, you could try and downscale some of these textures to smaller resolutions and see if that helps alleviate it.
In most cases the problem is textures, yeah. It takes a long time to decompress and upload large textures – this cost is entirely based on their resolution, not file size.
I can’t see any information about the model without buying it, but you can try:
npm install --global @gltf-transform/cli
gltf-transform inspect scene.glb
To just resize textures to 1K or so, try:
gltf-transform resize input.glb output.glb --width 1024 --height 1024
Or to optimize and compress the whole model more aggressively
gltf-transform optimize input.glb output.glb --texture-size 1024 --texture-compress ktx2 --compress meshopt
There are a lot more options, run things with
--help to see what’s available and what works for your model. KTX2 textures do not require decompression and upload to the GPU much faster, which helps if you can’t reduce resolution any further. But 24 x 4K textures is too much for this model, artists do not usually optimize models for the web, you’ll have to plan on doing that after buying models.
Thank you guys for the info, I modified the textures using photoshop to 1k, and is good now. I also reduced a bit the vertices of the model with blender but I think the issue was the texture size (width/height) as you guys suggested.