Jump to content

Is it possible to over crank a shadow.


Recommended Posts

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?

Link to comment
Share on other sites

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 :")
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...