Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 /
  • Help Room /
avatar image
0
Question by maksymdev · Jul 16, 2019 at 10:33 AM · materialshadersgraphicsshadowslightning

Shadows passing through objects, why?

Hi, I'm using Unity 2018.2.17f1 without HDRP or LWRP. Just a regular base.

I have this problem when there are objects one above other one and the directional lightning set up like this.


alt text


The shadow of the object above the cube is passing through this cube and causes shadow to be visible on the cube way below (see screenshot).


alt text


What's wrong with my lightning/shadows/materials or something else. I've spent a lot of time trying to figure it out and I have no idea what's wrong.

Thank you for your help.

light-settings.png (40.9 kB)
rock-shadow.png (344.2 kB)
Comment
Add comment
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

4 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by GhostlyFedoras · Jul 16, 2019 at 02:20 PM

I believe this might be an issue with your model, I may be wrong but looking at it The only model with the issue seems to be the one it is coming from, Alternatively You could add a different rotation to your directional light though I feel this might ruin the whole look of your game a 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 maksymdev · Jul 17, 2019 at 01:18 PM 1
Share

Hi!, thank you for your answer. Unfortunately it's not just that model, every other has the same issue it's not visible on that screen tho. But the guy on the upper-left side casts the same shadow passing through the white tile.

avatar image
0

Answer by Styro8 · Mar 22, 2020 at 01:38 AM

I have same issue, did you fixed it?

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 maksymdev · Apr 27, 2020 at 09:00 AM 0
Share

Unfortunately not. The "best" solution I haven't stick to was "fake projection of shadows" with some asset but it wasn't very well optimized for mobiles so I am going to search more.

avatar image
0

Answer by ahsen35813 · Jul 11, 2020 at 04:43 PM

I found this answer: https://stackoverflow.com/questions/21666776/shadows-going-through-objects
I wasn't able to find the necessary shader, but I think it might work for you if you can.

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 maksymdev · Sep 10, 2020 at 09:19 AM 0
Share

Thanks for the reply. When I did my research I found this post but it wasn't the best solution to me. I decided to give up on Unity Shadows and switched to the fake blob shadows (projectors) or faking the static elements with textures. Works well for my game.

avatar image
0

Answer by Ishnubarak · Dec 15, 2021 at 11:42 PM

Many years later now, and I ran into this same issue. In my case, the problem was that the floor itself was supposed to be casting the shadow which would cover up the shadow of the dynamic object. This is probably the line of investigation you should go down.


There are many reasons why this may be happening, but in my case it's because the floor was a static object whose shadow was cast using the lightmapper, while the dynamic object's shadow was... Realtime (i.e. Lighting Mode: Subtractive).


The lightmapped shadow coupled with the floor's lightmap resolution being too low to display a proper shadow caused the dynamic shadows to show up where the floor's shadow should be instead. Once I had the static object's shadow properly cast, this was no longer a problem

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

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

216 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 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

Best way to render hundreds of textures for flooring in an in-game editor? 0 Answers

[URP] Transp Shadergraph has shadows? 2 Answers

Is there any way to create and load a shader source file at runtime? 1 Answer

Please Help! Scene Lighting has Bugged Out and Colors are Not Showing Correctly Anymore 1 Answer

Hair material problem 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