Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Transfer Lightmaps?

Discussion in 'Global Illumination' started by Vibs_appit, Mar 17, 2015.

  1. Vibs_appit

    Vibs_appit

    Joined:
    Feb 16, 2014
    Posts:
    53
    Hey guys,

    This might be trivial, but since I haven't tried it before, I don't know if it's possible. The thing is, our artist has a pc with decent specs. I (programmer) on the other hand, work on a mac mini (intel i5, 2.5GHz with intel hd 4000 graphics). As you can imagine, I can't bake my scenes on my mac, I put them to bake on our artist's pc by creating a clone of my project. Now, the scene in question has not at all changed after I cloned it and I want to use the baked lightmaps on my mac mini.
    I tried importing the lightmap by copying it from the artist's pc along with the lightmap snapshot into my own project, and changing the import settings from texture to lightmap. I assigned the lightmap snapshot in lightmaps tab under lighting window and restarted Unity in hope that it would work. No dice! Now I can't see any of my meshes, but if I click in the scene, the outlines are there, so it's a rendering problem. I have no idea whether i have done something wrong, but have any of you guys did this with Enlighten? Unlike in Beast, Enlighten lightmaps slots are not accessible to me in order to assign the lightmaps manually to the objects.
    Any help is appreciated. Below screenshots show my scene before and after I apply the lightmaps generated on artist's pc.
     

    Attached Files:

  2. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    My first guess is that your Shaded mode is set to something other than Shaded. Something you don't have in your model, possibly baked? But your interface is cropped off.
     
  3. Vibs_appit

    Vibs_appit

    Joined:
    Feb 16, 2014
    Posts:
    53
    The shaded mode is shaded. I don't think I have anything weird in my model, as the lightmaps work just fine in exact clone on another pc where they are baked. My question was, how do I get the lightmaps baked there to work on my mac (exact copy of the scene)?
     
  4. Kuba

    Kuba

    Unity Technologies

    Joined:
    Jan 13, 2009
    Posts:
    416
    The data from the lightmap data asset (currently named LightmapSnapshot.asset) is used to resolve the mapping between the calculated GI and scene objects. It's only done when the scene is loaded in the Editor. That info is then serialized only when the scene is being built (and that's how it's accessible in the player).

    So if you have the exact same scene on both machines, then you bake on one machine and move the LightmapSnapshot.asset file (and all the other files from that folder) to the other machine, assign the reference to it in the scene, save the scene and reopen it -- it should work.

    When moving files you need to remember to move matching .meta files as well, otherwise references to lightmaps in the LightmapSnapshot.asset file won't work.
    Best would be to just commit those generated assets to your VCS (as that implies that either you have the meta files and naturally need to commit them or that you're using the Asset Server, in which case the meta files business is done behind the scenes).
     
  5. Vibs_appit

    Vibs_appit

    Joined:
    Feb 16, 2014
    Posts:
    53
    Thank you, Kuba! That did it. I forgot all about the meta files as they are generally hidden in Mac (stupid Apple). I hate working on Mac.. Anyways, I am gonna take your advice about VCS. It's much better approach and I don't have to worry about the meta files anymore. I am just waiting for Perforce to publish their client/plugin with 64bit Unity support.
    Thanks again.
     
  6. Kuba

    Kuba

    Unity Technologies

    Joined:
    Jan 13, 2009
    Posts:
    416
    Great! :)