Search Unity

lightmap in assetbundle became dark

Discussion in 'Global Illumination' started by unitymatrix, Aug 14, 2018.

  1. unitymatrix

    unitymatrix

    Joined:
    Dec 29, 2009
    Posts:
    120
    hello everybody, I've load lightmap serveral months ago,which is refering to: https://forum.unity.com/threads/problems-with-instantiating-baked-prefabs.324514/

    and my new problem is that the light is quite dark than the orginal.
    this is original:


    this is loaded :



    by the way, I found the value of m_Lightmaps2 is always to be empty,so I changed the line 73 to
    "
    newLightmapData.lightmapDir = lightmaps;
    "
    otherwise, the scene will be like this:




    I don't know what's wrong with it,any help will be appreciated.
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,735
    Submit a bug report?
     
  3. unitymatrix

    unitymatrix

    Joined:
    Dec 29, 2009
    Posts:
    120
    there is not any bug shows
     
  4. unitymatrix

    unitymatrix

    Joined:
    Dec 29, 2009
    Posts:
    120
    I found it relate to LightingData.
    When I load the scene from assetbundle, Lighting Data Asset is null
    upload_2018-8-14_16-16-2.png

    even I have right lightmap index,color and dir,lightmap is still wrong.

    When I drag the LightingData manually to "Lighting Data Asset", light shows correctly.

    While the question is When I build it into assetbundle, the Lightingdata could only be access from editor,how could I fix everything to run normally?
     
  5. unitymatrix

    unitymatrix

    Joined:
    Dec 29, 2009
    Posts:
    120
    "Lighting Data Asset" is null

    upload_2018-8-14_16-22-1.png


    not null:

    upload_2018-8-14_16-23-13.png
     
  6. mariakysliakova

    mariakysliakova

    Joined:
    May 4, 2018
    Posts:
    1
    So, did anyone find a solution? o_O
     
  7. tiancaiwrk

    tiancaiwrk

    Joined:
    Nov 23, 2017
    Posts:
    35
    Same Problem Happend! in Unity 2017.3 How to deal with it?
     
    MNNoxMortem likes this.
  8. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723