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 collederas · Apr 06, 2020 at 09:35 AM · lightingshadowsbaking

Shadows produced by non-static objects are lighter than baked shadows

I created a scene from scratch in 2019.3.7f1. So the relevant lighting settings are default:


  • Default Skybox

  • Shadowmask Baked Gl setting enabled

  • Intensity Multiplier set to 1 for both Env Lighting and Reflections

  • Bounces set to 1 for Env Reflections


In addition, like any default scene, there is one Directional Light set to Mixed mode.

I added a cube in an enclosed room (made up of 6 cubes stitched together so that no light can pass through).

The following is the lighting situation inside the room without baking. All objects are non-static:


alt text


Now I make all the walls static (and leave the enclosed cube dynamic). I would expect Unity to calculate the same light situation and simply apply it as a lightmap. Instead what I get is a proper dark room.


alt text


The questions are the following:

  1. Why the difference?

  2. Why the enclosed room is so bright in the non-static example in the first place? Nothing should get through and the only light should be the Ambient.

  3. How do I make so that the dynamic object inside the enclosed environment will receive the shadows from the walls/ceiling?

Thanks!

screenshot-2020-04-06-at-111752.png (56.8 kB)
screenshot-2020-04-06-at-111821.png (39.5 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

2 Replies

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

Answer by Namey5 · Apr 06, 2020 at 11:13 AM

What you're seeing here aren't shadows; this is global illumination (GI). In reality, light doesn't just stop once it hits something - some is bounced, some is absorbed, etc. In this case, the light you are seeing is ambient lighting from the environment/skybox. That doesn't really make sense, because you can't actually see the skybox from inside the room - no light can enter from the outside, so the room should be black. GI is fairly difficult to do in realtime due to the sheer amount of information processing required, so most GI has to be baked and can therefore only effect static objects. More recently some new realtime GI techniques have been proposed, but this is still emerging technology. If you want your dynamic objects to be effected by global illumination, you can use light probes;

https://docs.unity3d.com/Manual/LightProbes.html

You can think of these as small pre-baked panoramic captures of the scenes static lighting - place a group of them and a dynamic object is able to blend between the closest probes to approximate local GI.

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 collederas · Apr 06, 2020 at 12:37 PM

Thanks @Namey5 ! I have been doing some more reading and experimenting in the meanwhile and mixing that to your answer I think I get it.


In the first case nothing is baked so even if my Directional Light is set to Mixed, there is basically no GI impact in the scene; at that stage it is behaving like a Realtime Light and therefore contributing only direct lighting to my Scene.

Then, when I set objects to static and go through the baking process, GI is applied. This contributes to much richer details (indirect light is now part of the game) and the scene looks darker. At this point changing any Ambient light setting will only affect Dynamic objects as the rest is just a texture.


So Answers are:

  1. Because of the impact of GI which is visible only after baking the lights.

  2. Because it is lit by the Skybox without GI at all. Apparently the Skybox only produces indirect light that it is not at all considered unless some sort of GI is enabled.

  3. Using light probes!


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 Namey5 · Apr 06, 2020 at 10:51 PM 0
Share

Also watch out for reflections with the standard shader. Light is split into a few different paths - direct lighting (from light sources), indirect lighting (GI) and reflections. Even though it may look better, there is still a bit of light leaking because the scene is only reflecting the skybox. You can also use reflection probes (baked or realtime) to get around this.

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

162 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

Related Questions

What am i doing wrong with Lighting? 1 Answer

Shadowmask shadows not showing 0 Answers

HDRP double sided light problem 0 Answers

Baked lights with realtime directional causes black shadows 0 Answers

Lightmapping 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