Hi, my scene consists of mostly baked shadows but I also have a couple animated items, so I’ll also need some real-time shadows. I’m looking for some pointers/best practices on mixing the two. Consider this screenshot:
- First off, the real-time shadow color doesn’t match the baked shadow color. I found a potential solution in this thread that talks about tweaking the ground material to allow setting the shadow color. Is this still the only or best option for that?
- Is there anything that can be done about the weird overlap between baked and real-time shadows? Or do I just need to try to avoid that in how I layout my scene?
Thanks for any advice!
Yes as we do not support colored shadow maps.
What do you find weird ? isnt the area naturally darker cause in 2 shadows ?
1 Like
If I had 2 lights casting 2 shadows, then yes, where they overlap would be darker. But in sunlight (a single light) all shadows from everything lit should merge into one. Sounds like this isn’t technically possible so I’ll just do my best to avoid overlap.
Ohhhh I see
yup this is not possible. It would require to bake the shadow map itself.
That said it would be really cool to be able on the first frame to bake the shadow map with all static objects and on subsequent frame reuse this state as the base to render only the dynamic objects in.
1 Like
Wait, so you’re saying there’s a chance?? 
I don’t completely follow what you’re saying about baking a shadow map, but if you can elaborate on the technique you’re imagining or otherwise point me in the right direction, I’d love to dig into this. Lmk, thanks!
Fascinating. Thank you so much for this explanation. Am I understanding correctly that this technique is all done in BJS, and there is no version of this where I can combine shadows from a lightmap (baked from Unity, for example) with BJS real time shadows?
1 Like
I doubt that it will work for light map or you would need exactly one per light to be sure the overlap is with the light you think
1 Like