• 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 jnt · Mar 11, 2015 at 02:53 AM · lightmappingload levelloadleveladditive

How to load enlighten lightmaps correctly at runtime?

We are attempting to make a game that will consist of an "endless world" of sections that are loaded at runtime.

Each section will be contained in a scene with it's own lightmaps. Currently we are using the LoadLevelAdditiveAsync method to test loading the scenes into an empty 'loading' scene. First we load the scenes, then we load the baked lightmaps from each scene into the LightmapData array, then we assign each renderer in the scene to look at it's corresponding lightmapIndex, and we set the lightmapScaleOffset back to it's original value.

Here is a video of the one time that I actually managed to get it working... but I haven't been able to get it to work since.

http://youtu.be/E5jdWa2ydmA

Here is a video using another scene with my own meshes. (to test that UV mapping of unity primitives wasn't the problem). The first part shows the scenes with their lightmaps perfectly applied - no lights in the scene. The next part shows the loading scene with the scenes loaded side by side and lightmaps applied. As you can see, the lightmaps come in at the wrong scale and placement.

http://youtu.be/YS9A_WO8-NA

There are a couple of t$$anonymous$$ngs I have noticed that I'd like someone to please explain to me or give me some insight on:

  1. No matter what value we set the lightmapScaleOffset value to, it doesn't change how the lightmap is loaded onto the renderers. So then my question is, what does the lightmapScaleOffset actually do?

  2. When I place a Lightmap Snapshot from one of the lightmapped scenes into the Lightmaps section of the 'loading" scene, the scene that the snapshot came from loads correctly.

  3. I opened the LightmapSnapshot.asset file as text, and I noticed that there are some promising looking attributes in Enlighten System Information: rendererIndex, rendererSize, atlasIndex, atlasOffsetX, atlasOffsetY. Would it be at all possible to use the attributes to set up our loaded lightmaps correctly?

Any insight or solutions to t$$anonymous$$s problem would be much appreciated ;)

Comment
Add comment · Show 2
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 JanusMirith · Mar 12, 2015 at 12:46 AM 1
Share
avatar image jnt · Mar 12, 2015 at 09:11 AM 0
Share
lightmapscaleoffset.png (313.2 kB)

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by JanusMirith · Mar 12, 2015 at 12:45 AM

Turns out it is a bug:

Unity bug tracker http://issuetracker.unity3d.com/issues/gi-is-broken-if-loadleveladditive-is-used

Forum post http://forum.unity3d.com/threads/gi-and-additive-scene-loading.286807/

I t$$anonymous$$nk the only way to fix t$$anonymous$$s is to Vote for the bug, I am surprised that there is so few votes on it so far.

If anyone manages to get a fix please share, at the moment my only options are to go through all of my scenes and strip every light or push the minimum requirements up to that of a supercomputer.

Comment
Add comment · Show 2 · 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 jnt · Mar 12, 2015 at 08:47 AM 0
Share
avatar image JanusMirith · Mar 13, 2015 at 12:16 AM 0
Share
avatar image
0

Answer by DarekLosu · May 20, 2015 at 11:14 AM

I've also had similar issue, but found a way around it. Try assigning lightmapScaeOffset and realtimeLightmapScaleOffset.

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 robstardotstar · Jul 13, 2016 at 04:46 PM 0
Share

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Why do my lightmaps have "stains" on them? (4.6) 0 Answers

Unity Error : Mounting archive file system for lightmap snapshot failed! 3 Answers

Lightmap artifacts bug 0 Answers

Strange Unity GI issue 0 Answers

Lightmaps is very bright on iOS (inconsistent with result in Editor) 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