"webgl context lost"

So i was loading a big fbx files (atleast 1.8GB) suddenly after 98% it says an error “Webgl context lost” and my screen


went to full black

Yes, you’ve run out of memory - as earlier, loading 2GB of FBX at once is not much of an option (esp. that FBXLoader is likely then to separate and duplicate the FBX contents during processing, which can temporarily double/triple the memory usage.)

i mean can you please tell me what should i do to load atleast 2gb?

Get a graphics card with more memory.

2gb of what exactly?

i have a Nvidia gtx 1650 graphics card :man_shrugging:

A complete offshore platform fbx file like this

Is your model textured?
It may be that you’re running out of texture memory, or perhaps it’s just too much geometry to handle for web.
First thing I would do is convert the file to binary gltf, perhaps using DRACO mesh compression, and definitely enabling jpg/webp texture compression, then see how big the resulting file is… Then drag it onto dons excellent web GLTF viewer:

If it loads… that’s a good sign, you may be able to load it…
If not, then I would try to export smaller and smaller parts of the model until you get something that loads in Dons viewer… then decide where you want to go from there.
also generally, imo, avoid using FBX. it’s a braindead format.

1 Like