1

I'm having a trouble, I'm trying to create a dark scene for my project, but, when I add lights, the lights pass through the objects, it has no sense, becouse it pass through the walls.

Light beside of an object Light beside of an object

Light passing through the object Light passing through the object

I tried setting my objects to static, but it is not working.

Also I tried setting Bias in my Universal Render Pipeline settings to 0, but, the same.

1
  • Hi Seokku. I think that the issue is essentially about shadow casting. If we want an object to block the light reaching another object, then we essentially want it to cast a shadow (in Unity terms). So it is important that your Lights are set up to support shadows. Also, your Universal Render Pipeline Asset should be configured so that it supports shadows (Lighting->Main Light and Additional Lights). The individual renderers can be configured to not cast shadows, but will be on per default. Some materials won't support shadows - often when rendering with semi-transparency. Commented Jan 5, 2023 at 8:21

1 Answer 1

1

I know I'm a year late but I had the same problem recently and this is not because the object isn't casting shadows or light is passing through it. This problem is because of shadow strength. If the shadow strength value is lower than 1 Shadows won't be as black as desired. Set the shadow strength value to 1 in your light component and you're good to go.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.