I have a scene with two shadow generators, one for dynamic shadows and one for static shadows. They work as expected, but I would like the shadows to meld together seamlessly so that they appear as one unified shadow. How can I adjust the alpha mode or any other parameters to achieve this effect?
see the attached image for reference.
I am using BABYLON.CascadedShadowGenerator and BABYLON.DirectionalLight
Any suggestions or guidance on this would be greatly appreciated!
I’ve been there, and played around and I don’t see any properties/methods that can achieve this, but no worries, I just wanted to experiment with shadows.
I see that using two shadow generators (static/dynamic) seems to improve performance in my game so mission accomplished
Thanks for the tip, I have no experience with lightmap and I will have a look into it and see if I can generate shadows for my static meshes dynamically.
Yes, I do agree with this comment. Light adds to light. And shadow adds to shadow. Therefor, a smaller object (the player or NPC) in front of a larger (i.e. a tree) casts a darker shadow which adds to the shadow of the tree. May be some fine-tuning but overall, pretty realistic, if you ask me.
For having tested and used this approach a couple or a few times, I’d say… Yes. If you are pretty much happy with the render, I think you can stick with this method (of course, my opinion only )
@webgrid May be not necessary, is it? If not, the solution of
sounds like a good idea to me
I mean, I know I said that having stronger shadow on front objects is ok (kind of realistic) BUT…that’s only true when the static shadow is rather soft and not entirely dark/shadowed. Else, it creates a real weird feeling. There should be a maximum (black point) shadow when in full shadow and any other shadow that comes on top of it should NOT ADD to it.