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
1
Question by $$anonymous$$ · May 25, 2016 at 08:07 AM · lightingunity5

Unity 5.3.5 lightning

I'm working on a game and I've got some issues with lightning passing through several walls. I'm not so sure why this occurs, is it because of something with the model or is it because that's how Unity works.

Here's some pictures what I'm talking about:

from the outside alt text from the inside alt text

lower floor [3] http://i.imgur.com/vVu2L3e.jpg

upper floor, above the room [4] http://i.imgur.com/xqykXvP.jpg

What's causing the light passing through walls? Is it because of the model?

bug2.jpg (234.8 kB)
bug1.jpg (235.5 kB)
Comment
Add comment · Show 8
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 Namey5 · May 25, 2016 at 09:38 AM 1
Share

Do you have shadows enabled?

avatar image NicoLocke · May 25, 2016 at 09:49 AM 1
Share

Are the walls joined to the floor in the mesh? Or seperate meshes?

avatar image NicoLocke NicoLocke · May 25, 2016 at 10:15 AM 0
Share

You should think about how lighting works in real life and how it affects objects in real life. Anything with a gap will have light shining through. I'd suggest adjusting your geometry so that it is joined if it is not already.

avatar image $$anonymous$$ NicoLocke · May 25, 2016 at 06:47 PM 0
Share

After redoing the whole topology of the house, which should be perfect now, the light keeps co$$anonymous$$g inside. It's kinda annoying.

avatar image Nazirzadeh · May 25, 2016 at 10:09 AM 1
Share

I agree with NicoLocke, also you can define a layer for those objects which you do not want to lighting them, then from your Light --> Culling $$anonymous$$ask uncheck that layer.

avatar image $$anonymous$$ · May 25, 2016 at 10:26 AM 0
Share

$$anonymous$$y topology seems to be fine, the floor and the walls are connected. Shadows are not enabled, but when I enabled them it made no difference. I guess I'm going to unlink them, and going to uncheck the culling mask. Thanks !

avatar image Namey5 $$anonymous$$ · May 26, 2016 at 04:35 AM 0
Share

If you want shadows, make sure they are always enabled on both light sources and the objects themselves.

avatar image $$anonymous$$ · May 25, 2016 at 10:31 AM 0
Share

I've checked the topology again, and indeed there were some problems. Silly me, it was made a long ago.

1 Reply

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

Answer by IgorAherne · May 25, 2016 at 11:08 PM

Check the shader that is attached on the mesh, perhaps it's not using/writing to shadowmaps, so you won't see shadows.

As mentioned, topology might be freaking out, especially when you have concave polygons. In that case your triangles might be messed up.

Also, make sure that "recieve shadows" is checked on the house mesh

This picture is typical if you have no shadows enabled, since it's pure lambertian shading in that case (shader will highlight what's facing the light, then shades darker anything pointing away from light). Your floor faces towards the light, so it gets shaded. Shadowmaps would overlay shadows on top of such areas, hiding the anomaly.

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 $$anonymous$$ · May 26, 2016 at 11:08 AM 1
Share

Reworking the topology, checking the shader and then fiddling with the light's shadows = great success. Thanks for the help !

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

56 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

Related Questions

how to stop real time shadows in Unity5 from blinking flickering and fritzing 4 Answers

Is it possible to keep the same lighting but baked? 1 Answer

Unity5: Changing AmbientSkyColor doesn't change Skybox Color 2 Answers

Is there a way to change ambient lighting locally? (Unity 5) 0 Answers

What will be the best light baking settings when baking for mobile devices in Unity 5 1 Answer


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