I’m using three SpotLights to light up my scene. I want shadows from all the three lights. Problem is, shadow generated by one light is removed by the other ie. the shadowed area created by one light is lighted up by another.
How do I get shadows from all three lights at the same time ?
Please check the below screenshot.
When I switch on the opposite light, the shadow disappears. I want it to stay. Please help.
You can switch on and off the lights in lines 56 and 57. When both lights are on, the shadows naturally disappear. But I want them to say. I basically want to reproduce the shadow arrangement from threed.io. Please check attached pic.
I am kinda thinking that you can cheat that effect. Just a theory tho. You can use 1 light instead of 3 (lights are expensive) and maybe place a sphere somewhere in between the ground and light, and use shadow from the sphere instead shadow from the phone.
Shadow from the sphere will be beneath the phone, with some parameter tweaking maybe you can get that effect.
Also for this to work, you cannot set sphere.isVisible = false, there will be no shadow. Instead you assign a material to sphere, and set alpha of that material to 0; And then you set shadowGenerator.setTransparencyShadow(true);
You can play with
spotLight angle (line 17)
light intensity (line 19)
blurKernel (line 28)
sphere size, (line 34)