How to minimize gltf file size for Web

I want to minimize a GLTF file so it is small enough to be rendered nicely on websites. I use the useGLTF hook from @react-three/drei and here’s the results of the Object:

This object is small enough. Asking more for my other GLTF files that are more complex. Normally what kind of data of a GLTF object can I drop for the object to still look good enough? I’m thinking of editing/dropping values within my React code to achieve this but any other suggestions would be appreciated too! :slight_smile:

There are a lot of reasons a glTF file could be large – it’d be easier to give concrete advice if you could share one of the more complex models. Some general rules of thumb might be to aim for < 100,000 vertices being rendered at any given time, and the smallest and lowest-resolution textures you can get away with. Nothing larger than 4096px, and ideally no more than 2048px, especially if you want the webpage to work on mobile devices. There are optimization tools (e.g. gltf-transform and gltfpack) that can often reduce file size quite a bit, compared to the original file exported from Blender.