JonVarner Posted October 29, 2018 Share Posted October 29, 2018 Hey all, so I have a scene where I have lit the objects using several lights and turned one of my lights into a shadow caster. The shape of the shadow looks great but because of the other lights the shadow is just not dark enough. I can go through and redo my lighting, but that kind of stinks because everything is looking great except the darkness of the shadows. So I was wondering if there was a way to "over crank" a shadow to make it darker? I currently have the shadow darkness set to 0. Any ideas? Quote Link to comment Share on other sites More sharing options...
VoyVoda Posted October 29, 2018 Share Posted October 29, 2018 Hi, I'm not sure I understand correctly but I can give a few small tactics. You have more than one light, you want the shadows to be dark. If you share a Playground you can get easier help. 1- shadowGenerator.setDarkness(0); You can use this line. It takes a value between 0-1. 0 is the darkest. 2- If the lights are crossed, you can reduce the lights that block the shadow by using yourLightName.intensity = 0.5 In this way, the shadow will stay darker. i hope it helps. It may be useful to share a playround so that other people can better understand the problem and help :") Quote Link to comment Share on other sites More sharing options...
Dieterich Posted October 29, 2018 Share Posted October 29, 2018 Remember, for any question, one initial example in playground..? Quote Link to comment Share on other sites More sharing options...
JonVarner Posted October 29, 2018 Author Share Posted October 29, 2018 Thanks for the response guys. Regarding a playground example: https://playground.babylonjs.com/#B48X7G#22 What I would like to do is make the shadow completely black without changing the intensity of the lights. I can of course change the emissiveColor properties of materials. But for the sake of discussion, I like how my materials and light look but the only thing I want to change is the darkness of the shadow. Possible? Quote Link to comment Share on other sites More sharing options...
Blax Posted October 29, 2018 Share Posted October 29, 2018 5 hours ago, VoyVoda said: 1- shadowGenerator.setDarkness(0); You can use this line. It takes a value between 0-1. 0 is the darkest. shadowGenerator.setDarkness(0); can make shadow lighter, but can not make more dark, if object get light from another lightsourcers ? NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.