Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 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 /
avatar image
0
Question by lokesh5shelva_unity · Jan 07, 2021 at 10:48 PM · shadowsbakedlighting

Dynamic object is not casting shadow to static object after baking GI using subtractive mode

I am baking the lighting for a scene and my character is not casting shadow after I bake the lighting. The character is casting shadow before baking.

I am using URP

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by HaruLee932001 · Jan 12, 2021 at 03:56 PM

Hi @lokesh5shelva_unity ! I got the same problem as you.

Static objects, after baking, no longer RECEIVE shadows from Dynamic objects. To fix this, find the Mesh Renderer components on Static objects that you need to bake, then check Contribute Global Illumination. After that, at the drop down Receive Global Illumination, choose Light Probes instead of Lightmaps. Recap: Mesh Renderer -> Contribute Global Illumination -> Receive Global Illumination -> Light Probes

Brief explaination: when you bake your Static objects, all their lighting data (including shadows) is now stored in the Lightmap. Then, at runtime (play mode), Baked Static objects will take the data from Lightmap to lit objects themselves (imagine when you bake Static objects, they don't have any shadow on them, so Baked Lightmap doesn't contain any shadow data on the Static objects, when play, Static objects take that data and lit themselves which doesn't have shadows on them). If you follow my solution above, Baked Static objects now will take the data from Light Probes to lit themselves instead of Lightmap.

What I just explained is not 100% accurate, it bases on my knowledge. So if you want to know more, I think you should dive in Lightmap and Light Probes. I found out how to fix this while testing and reading: https://blogs.unity3d.com/2019/08/28/static-lighting-with-light-probes/

Another similar problem you might encounter in the future is Baked Static objects don't CAST shadows on Dynamic objects. Solution for this, you can read at: https://support.unity.com/hc/en-us/articles/207820473-Mixed-mode-lighting-my-baked-objects-are-not-casting-shadows-on-RealTime-objects

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 Hossam_justDice · Feb 17 at 10:30 AM

I had the same issue. The solution for me was to assign the main directional light as my "Sun Source" under Windows>Rendering> Lighting> Environment> Sun Source

In Subtractive Lighting Mode, all Mixed Lights in your Scene provide baked direct and indirect lighting. Unity bakes shadows cast by static GameObjects into the lightmaps. In addition to the baked shadows, one Directional Light, known as the Main Directional Light, provides real-time shadows for dynamic GameObjects.

As stated in Unity's documentation.

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

114 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

Related Questions

Unwrapping.GenerateSecondaryUVSet makes broken shadow map (Unity 5.4.4f1) 0 Answers

baked lighting with realtime shadows 0 Answers

Shadows not being baked on static objects 0 Answers

Static Baked Lighting: Are Soft Shadows more expensive than Hard Shadows? Is there any runtime performance or memory disadvantage to using baked soft shadows vs hard shadows? 1 Answer

Shadow's quality bug? Or just wrong settings? 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