Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Problem with lightmap.

Discussion in 'Unity 5 Pre-order Beta' started by Yalfbal, Feb 17, 2015.

  1. Yalfbal

    Yalfbal

    Joined:
    Nov 20, 2012
    Posts:
    23
    Hi,

    What am I doing bad here with the lightmap?


    Realtime:
    Screen3.jpg

    Baked:
    Screen2.jpg
     
    Last edited: Feb 17, 2015
  2. SAOTA

    SAOTA

    Joined:
    Feb 9, 2015
    Posts:
    220
    Make sure Continuous Baking is enabled at the bottom of the screen.
     
  3. Yalfbal

    Yalfbal

    Joined:
    Nov 20, 2012
    Posts:
    23
    Done, but it doesn't change anything.
     
  4. SAOTA

    SAOTA

    Joined:
    Feb 9, 2015
    Posts:
    220
    Also Baked Skylight needs to be set to realtime.
     
  5. Yalfbal

    Yalfbal

    Joined:
    Nov 20, 2012
    Posts:
    23
    Thanks Saota, but it doesn't change anything either.
     
  6. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Is all your geometry set to static?
     
  7. Yalfbal

    Yalfbal

    Joined:
    Nov 20, 2012
    Posts:
    23
  8. Roni92

    Roni92

    Joined:
    Nov 29, 2013
    Posts:
    225
    Posting thread with screen, but without explaining problem.
     
  9. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    663
    Is your player setting set to Deffered? (Camera as well). And light at mixed or baked.
     
  10. KickBack

    KickBack

    Joined:
    Nov 18, 2014
    Posts:
    10
    You are not using an RC, are you? Update your unity.
     
  11. Yalfbal

    Yalfbal

    Joined:
    Nov 20, 2012
    Posts:
    23
    I didn't explain the problem because I thought that the scene was really simple. The problem is all those big black pixels in the lightmap.

    Player settings set to Deferred and the light at baked.

    I updated Unity and the problem persist:
    Screen2.jpg
     
  12. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    663
    Wait, what's the problem? i think i do see shadows.
    If it's about those red and green pixels it's something i noticed on my mac with an intel HD chip.
     
  13. Yalfbal

    Yalfbal

    Joined:
    Nov 20, 2012
    Posts:
    23
    This is the scene in realtime:
    Screen3.jpg

    But when I build a lightmap the result is full of dark pixels.
     
  14. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    663
    Try to put your atlas size to 2048. it's a wild stab in the dark.
     
  15. Yalfbal

    Yalfbal

    Joined:
    Nov 20, 2012
    Posts:
    23
    Nothing changed.
     
  16. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    Some random ideas...
    Does the mesh have lightmap UVs?
    Are the UVs non-overlapping and in 0 to 1 space?
    Is the mesh clean (no duplicate faces on top of each other)?
    Are there any invisible polys in the mesh that might be affecting the bake?
     
  17. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    Shadow bias?
     
  18. Yalfbal

    Yalfbal

    Joined:
    Nov 20, 2012
    Posts:
    23
    I think that is a problem with the model, downloaded from evermotion. I'll try it with others models.

    Thanks guys!
     
  19. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    904
    Or can you just turn on "Generate Lightmap UVs" in the model's import settings, if not? This seems to no longer be the default, but things without it still get lightmapped (incorrectly). Worth checking.
     
    Marc-Saubion likes this.
  20. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    655
    I agree, i've had something similar on a model I forget to use "Generate Lightmap UVs" on.

    It never is. Hard to know what's wrong without knowing what you expected.
     
  21. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    The output looks like "Generate Lightmap UVs" checkbox wasn't checked.
     
  22. Yalfbal

    Yalfbal

    Joined:
    Nov 20, 2012
    Posts:
    23
    Hi,

    I checked it, and the problem was fixed with others models, but not with this one, as I said this model seems to have some errors.