Hello! I’ve recently encountered a problem when implementing Three JS lights for a WebGL game engine. I implemented a plugin to handle Three JS lights earlier this year and everything was going fine, but recently I imported a gltf skinned mesh and its shadow is cut off. I made a fiddle and tried to keep it as close to the engine code as possible. The thing is, I decided to compare it to another gltf mesh and it’s only the skinned mesh that has its shadow cut off. I disabled my custom shader to see if it was a GLSL problem but the issue persists. The shadow cuts off exactly at the edges displayed by the light camera helper, but the helper is a pyramid shape… That surely ain’t right for a point light shadow camera, is it? Plus, why does only the skinned mesh keep its shadow within those boundaries? I’m losing my mind over this…
Just letting whoever reads this in the future know that I managed to fix the issue by updating the mesh bounding box and increasing the bounding sphere radius to match it. For some reason, Blender exports the skinned meshes with a much smaller bounding box. Or maybe I did something wrong on Blender, I’m not very good with 3D modeling, I’m just a programmer. Anyway, problem solved
2 Likes