Search Unity

Using Beast lightmaps from another project

Discussion in 'Editor & General Support' started by chester8885, Nov 9, 2011.

  1. chester8885

    chester8885

    Joined:
    Apr 20, 2011
    Posts:
    7
    Hi.

    We have just encountered a weird (?) problem. Two level-designers are working on two different scenes on two different computers. Both finished their levels and baked Beast lightmaps. Now, we would like to put both levels into the same project, so we could make a final build. Sounds pretty easy, but it's not.

    Simply copying scene along with lightmaps to another project doesn't work. First of all lightmaps are not assigned when the scene is loaded. When we try to set them up manually objects get extremely bright. almost white actually.

    I made a copy of entire project and calculated different lightmaps. Then I compared both projects' contents and found out that much more than just scene and lightmaps has changed. Library\cache, metdadata, previews, assetDatabase3, guidmapper etc.

    Only if I copy all of those files, then the lightmaps work correctly. (After some testing I found out that Library\previews are not required). assetDatabase3 and guidmapper seem to contain all used assets. Overwriting them just doesn't seem to be a good idea. And they tend to change even when you just load a scene and close it without saving.

    How do I get around this? How do you get around this? What if I had tens of people working on many more levels? Are we really supposed to bake all lightmaps on one machine? We'll be grateful for any kind of help. We're really stuck with this issue.
     
  2. NTDC-DEV

    NTDC-DEV

    Joined:
    Jul 22, 2010
    Posts:
    593
    Because you can't have artists work on the same scene, one solution was to loadAdditive the scene. Basically merge both scenes.

    It's a bit more management in the back-end sure, but it does give you more flexibility for packaging if you do your scenes right such as export to assetBundles.

    ** Important note; It has to be the same project across every dev. A way to help with this is to use the Asset Server, if you can afford it of course. Unless you go with assetBundles; then it should work if you don't have links to scripts in your gameobject that are not in the project. (1)

    1; can someone confirm that one can load an asset bundle from another project? (does it mean, in terms of security that it's THAT easy to steal assets from others?)

    *Edit; There is also http://forum.unity3d.com/threads/94...imated-Lightmaps-per-object-baking-and-saving . No idea if it could help though..
     
    Last edited: Nov 9, 2011
  3. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,657
    Have you checked that the Texture Type setting for the lightmaps in the importer is set to 'Lightmap' and not 'Texture' ?
     
  4. chester8885

    chester8885

    Joined:
    Apr 20, 2011
    Posts:
    7
    That's it! Thank you! I can't believe it was that simple. I should have thought of that, especially when not-dds normal maps require the same tweak.
     
    Last edited: Nov 10, 2011
  5. Sondre-S

    Sondre-S

    Joined:
    Jun 29, 2013
    Posts:
    54
    @superpig

    I have the same issue(type is set to Lightmap, of course), seems like it's because of the lights?? When baking a LM the lights affecting those objects are not rendered anymore, but when you set a lightmap manually the lights are still rendered giving the object twice the illumination? right?

    There's definitely some information there, besides the LM texture and tillling/offset that is created with Bake and destroyed with Clear.... Aren't you supposed to be able to use light maps created outside Unity?
     
    Last edited: Nov 27, 2017
  6. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,657
    It's been ages since I've looked at the lightmapping stuff (this is a very old thread, as you can see - long before I started working for Unity).

    Under Unity 4, there was a flag called something like 'Actually Lightmapped' on the Light component itself - it was only visible in the Debug inspector, but it would stop the lighting system from rendering the light twice if it had already been baked into the lightmap. However, I don't see this flag any more in Unity 5, so I guess they changed it.

    If you're talking Unity 2017 or Unity 5, I'm afraid that someone familiar with our current GI systems will have to help you, cos I know very little about them :)
     
  7. Sondre-S

    Sondre-S

    Joined:
    Jun 29, 2013
    Posts:
    54
    .
     
    Last edited: Dec 18, 2017
  8. Sondre-S

    Sondre-S

    Joined:
    Jun 29, 2013
    Posts:
    54
    I guess this is only and issue if you use single maps. Im gonna go with dual maps so that's okay.
     
    Last edited: Dec 18, 2017