StrandedKitty / streets-gl

🗺 OpenStreetMap 3D renderer powered by WebGL2
http://streets.gl
MIT License
657 stars 49 forks source link

Performance improvement #171

Open ManDay opened 11 months ago

ManDay commented 11 months ago

streets.gl is rather hard on the CPU/GPU. I think an easy remedy to that, and to the loading time, could be reducing texture size. Given how beautiful streets.gl already is, I hope this can move a bit up on the priority list, as it feels like the most impactful limitation currenty. Most textures could probably be dealt at a fraction (1/10 to 1/100) of their size and quality, seen how people usually don't want to use streets.gl to zoom "1 meter" close to buildings.

For example, there is a 1.36 Mb normal map for a brick wall in the reposity (I don't know whether it's actually being used, but to illustrate the point): https://github.com/StrandedKitty/streets-gl/blob/dev/src/resources/textures/buildings/facades/block_wall_normal.png . I don't think anyone is ever going to zoom in to the point where that normal map becomes relevant, much less where we would need such a "high" resolution.

Thanks!

HolgerJeromin commented 11 months ago

This file is not send to the browser with this size:

https://github.com/StrandedKitty/streets-gl/issues/37#issuecomment-1546648390

ManDay commented 11 months ago

That's a good improvement but regardless, from the files that are downloaded according to the FF Inspector and from the on-screen quality, the textures are still an overkill, in my opinion. Zooming in to such a detail is just not expected, as are normal maps of centimeter resolution:

image

I'm not convinced texture quality is the actual bottleneck; I was just pointing this out as one possible cause for the large performance drag.