Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by MSachs · Sep 26, 2018 at 06:21 AM · lightinglight

How to stop light from going through an object on to another object?

Hi,


I have spotlights with a mask, to only cast thin line of light into the scene (see in picture). Every object as well as the light is set to cast and receive shadows but still the light (coming from the right side) hits the wall and shines right through on to the wall behind it where the window is. The wall in front and the wall in the back are separate objects. Is there a way to keep the light blocked by the first wall in realtime? I don't even need a shadow on the back wall. I just want to keep the light from shining through.


alt text


thanks in advance :)

bildschirmfoto-2018-09-26-um-080855.png (457.3 kB)
Comment
Add comment · Show 6
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Baalhug · Sep 26, 2018 at 02:52 PM 0
Share

Please, turn off all the lights but the right one and upload image so we can see how the wall is not stopping it, because in that image we can't see the effect.

avatar image MSachs Baalhug · Sep 27, 2018 at 05:44 AM 0
Share

Here you go :) So the light is co$$anonymous$$g from the right side. And for my understanding there shouldn't be any light visible on the wall on the left.

alt text

bildschirmfoto-2018-09-27-um-074034.jpg (213.3 kB)
avatar image MSachs MSachs · Oct 01, 2018 at 11:04 AM 0
Share

Any ideas? :)

avatar image MSachs Baalhug · Sep 27, 2018 at 05:50 AM 0
Share

$$anonymous$$aybe this perspective is a bit more understandable :)


alt text

avatar image hexagonius · Oct 01, 2018 at 07:31 PM 0
Share

and this is also the case when you push the front into the back wall?

avatar image MSachs hexagonius · Oct 02, 2018 at 05:41 AM 0
Share

Yes, it is... I realised that for some reason I didn't get any shadows in that scene no matter what I did. I created a new scene and it works in that one but it is definitely not perfect. For example when I push the light source closer to the front wall the light starts going through the wall again.


But creating a new scene did help at least. I hope that I can work out the rest which isn't quite working.

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by MSachs · Oct 02, 2018 at 08:46 AM

I got it to work. There was something wrong with my scene. I created a new one, enabled all relevant shadows and switched out the multiple spotlights for just one point light with a mask. Now everything works as intended.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Pakillottk · Oct 01, 2018 at 11:09 PM

Can be that there's a little gap between the two walls and light it's just passing through? Try to make them closer, maybe even intersecting a little bit.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MSachs · Oct 02, 2018 at 05:43 AM 0
Share

I tried that already with no different outcome. I realised that I didn't have any shadows in this scene no matter what I did so I created a new one and now it seems to work better.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

123 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

My lighting is weird 1 Answer

The light is not blending 0 Answers

Modify 2D Point Light Distance in runtime? 1 Answer

URP shadow problem 0 Answers

Prefab asset lights differently in different scenes 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges