vircadia-web
vircadia-web copied to clipboard
Lightmaps Fail when more than one glb in the scene has them.
If you have two glb files loaded and both contain lightmaps, one of them will fail. I strongly suspect this is because of having more than none vircadia_lightmapData object in the scene.
It appears that whatever lightmap loads first tends to work, and the second will not scale properly, but still be applied to the object. I'm assuming at the moment that the smaller sized glb will typically finish first, and therefore be the one that loads correctly, but this is speculation.
On closer inspection, the issue appears to be related to matching lightmap names/materials between multiple glb files. One solution is to have the name randomized, either directly in vircadia web or within the blender plugin.
I've created a workaround in the unity-to-vircadia plugin that simply assigns lightmaps random 16 digit strings as lightmap names for the time being, however I think I'll leave this issue open as it's possible it can be adjusted so this is no longer necessary at some point.