Search Unity

[SOLVED] Baked Lighting No Shadows

Discussion in 'Global Illumination' started by TaleOf4Gamers, May 27, 2017.

  1. TaleOf4Gamers

    TaleOf4Gamers

    Joined:
    Nov 15, 2013
    Posts:
    825
    Hey,
    I have never really tinkered with the lighting system before but with a current project we need to bake the lighting for performance reasons. My issue is that after setting everything as suggested and baking, there are no shadows.
    I have one error which is "Mesh doesnt have albedo UVs. Please Create Them in your modelling package".
    I dont know whether it is related.

    All of the Saloon child Meshes are Static as well as the terrain being Static by default.

    My Saloon Import Settings:


    Directional Light Settings:


    Lighting Window Settings:


    Realtime Lighting:


    Baked Lighting:
     
  2. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    Is your model unwrapped at all? It needs UV coordinates (as the error suggests).
     
  3. TaleOf4Gamers

    TaleOf4Gamers

    Joined:
    Nov 15, 2013
    Posts:
    825
    Nope, I kept that in mind but was unsure as realtime lighting works fine. ahhhhhhh.
    MID TYPE EDIT:
    It bakes the lighting into textures which is why it needs to be unwrapped.
    Silly, silly me.

    I will contact my artist and get back to you.
     
  4. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    Exactly :) Let your artist fix that and lightmapping should work just fine.
     
  5. TaleOf4Gamers

    TaleOf4Gamers

    Joined:
    Nov 15, 2013
    Posts:
    825
    Thanks, we did a quick test and it works great. He now has to unwrap a couple hundred objects :p
     
  6. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    Well... lesson learned, I guess?! :p
     
  7. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Still kinda bother me though, since in the import setting "Generate lightmap uv" are checked, which mean lightmap uv should be created automatically
     
  8. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    Hm, Documentation says "Unity can unwrap your mesh for you to generate lightmap UVs. Just use the Generate Lightmap UVs setting in Mesh Import Settings".

    Maybe it's a bug then?
     
  9. Flexyke

    Flexyke

    Joined:
    Oct 14, 2016
    Posts:
    11
    No, I believe there is a difference between unwrapping and lightmap uvs.
     
  10. MahrCheen

    MahrCheen

    Joined:
    Oct 27, 2016
    Posts:
    3
    As I managed to experience in perfect situation there are 2 UV channels which artist make for every asset. The first is for materials and second for the light. There is an option to swap lightmap UV when you want to use material UV for the lightmap. The Autogeneration of lightmap UV is lacking as it makes islands based on face angles so a round object often has dumb jagged lightmaps.
     
    TaleOf4Gamers likes this.