Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 DennisZ · Sep 20, 2014 at 09:17 PM · shadowslightmaplightmappinglights

Mixing baked and real-time shadows and real-time performance

Hello everyone.

I have a two-part question about lightmapping and dynamic shadows which I haven't been able to find a good answer to.

Question 1: How would you mix baked and real-time shadows if you want them to be cast by the same light source? I've tried using the same light source for first baking the lightmap and then setting it to real-time for it to render dynamic shadows of moving objects. This just causes the same light source to be cast a second time on top of the lightmap making it even brighter than it was before. Am I doing something wrong?

Question 2: What is the most performance hungry part of real-time lighting with shadows? Is a small scene with a lot of small shadow-casting objects more demanding than a large scene with a small number of large shadow-casting objects if there is only 1 light source?

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

1 Reply

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

Answer by MakeCodeNow · Sep 21, 2014 at 03:43 AM

1) The whole idea behind dual lightmaps is to support this kind of workflow. Near the camera the dual lightmaps only store bounce lighting and the local lighting + shadows comes from the dynamic light. Far away, the dynamic shadows are disabled and the lightmaps switch to baked versions. Is there a reason dual lightmaps don't work for you?

2) The specifics vary depending on a lot of specifics, but usually the main cost is the draw calls for all of the shadow casting objects. You basically have to have one draw call per shadow casting object per light source that casts shadows from that object. Directional light shadows use cascaded shadows which basically act like a unique shadow casting light source per shadow slice. Basically, the former is probably more CPU intensive while the latter is maybe more GPU intensive, but on most platforms CPU time is harder to come by than GPU time.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Shadows not being baked on static objects 0 Answers

Directional light shadows when lightmapping 0 Answers

Real time shadows in a lightmapped scene (Android) 2 Answers

How much data is it too much in lightmapping for Mobile? 0 Answers

Inconvenient splotchy lightmaps/ UV Overlap in URP 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