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 Yany · Oct 30, 2017 at 02:55 AM · shadowslightmappingbaked lightmode

No lightmap with mixed light

Simple scene:

  1. A floor

  2. A sphere above it

  3. A directional light

The floor and the sphere has the "Lightmap static" enabled.


  1. Case A: The "Mode" property of the light is set to "Baked". As per the docs, we now have only lightmap on the two objects. This works perfectly whereever I go with my camera.

  2. Case B: The "Mode" property of the light is set to "Realtime". As per the docs, we now have only realtime shadow that is visible only within a given distance. So I have to approach the objects and look at them closely enough to see the realtime shadows. Despite they are marked as "Lightmap static", Unity renders realtime shadows for them.

  3. Case C: The "Mode" property of the light is set to "Mixed". Here my problems come. As per the docs, this way a single light is able to take care of both static and dynamic objects shadows. However if I use this option, the shadow of my static objects is only visible from a close distance. Why? I realized that actually it renders only the realtime shadows for the static objects too.


To be honest I don't really understand this approach. Let's say I have a few buildings on a terrain and a character that I control from a 3rd person camera.

My questions

  1. How can I set up my scene, to see both the cheap static lightmap on the ground even from greater distances and the more expensive shadows of the dynamic objects that are close to the camera?

  2. Is it possible with a single directional light?

  3. Why is it called mixed, if it's not using the baked lightmap, but the dynamic shadow map only?

I really appreciate your help. I might seem to be a beginner and you are totally right, so I hope the solution is just a few easily understandable sentence. :)

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
3
Best Answer

Answer by Firas4d · Mar 26, 2018 at 08:54 AM

1- The key you are looking for is "subtractive" lighting mode which can be reached from the lighting settings -> mixed lighting section. This mode will allow the lights marked as mixed to provide baked shadows to static object while still providing a real-time shadows to non static objects.

2- Of course.

3- Well it's a bit confusing since there are 2 places to change the lighting mode from (the light itself and the lighting settings). By default shadow mask mode is already selected which means the mixed lights will provide only run time shadows to both static and non static objects in addition to baked indirect illumination (hence this is why it's called mixed) and by the way shadows are result of direct lighting calculations not the other way around.

Hope this answers your questions :)

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 Noblauch · Apr 14, 2018 at 01:57 PM

Oh my god. Firas4d, you saved me scene. Was messing around with lighting for days now and after hours of baking this is the setting that fixed everything! Thanks 4 that! :)

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

74 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

Related Questions

Light only generates shadows on realtime and mixed mode, not on baked 0 Answers

Unity 5 Lightmapping 0 Answers

White Spots after baking lights 0 Answers

Baked + Real-Time Shadows 6 Answers

Windows build is much darker than Editor 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