I am loading models from URL in my scene, where people can upload their own models and see them live in a gallery environment, the main issue is of the textures, I want to compress the textures using basis after downloading the models from the URL to reduce the VRAM.
In theory this can be done, as compressor can be compiled to wasm module and used on web. I’m not sure about the performance of this, but perhaps see more here:
I’m not sure if you can do this with the current included runtime library of Basis but in theory, you could run the compression on a JPG to create a .basis file in the browser. However, this does take time to compress pending on the user’s machine.
Where are users uploading the models to? You probably want to compress the textures on upload if possible.
Resizing the images on the client-side helps to reduce the VRAM, here is a demo I made to resize at the client-side, any suggestions are welcome to optimize the way I do it https://playcanvas.com/editor/scene/1134102