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. Dismiss Notice

lightmap issue - "Nothing to bake"

Discussion in 'Editor & General Support' started by tibbittsjim, May 29, 2013.

  1. tibbittsjim

    tibbittsjim

    Joined:
    Jul 4, 2012
    Posts:
    4
    Hello, I am a new user.
    I am building a test level and tried to bake lightmaps.
    All my meshes are marked as Static but I am getting a message that says:
    "Nothing to bake. None of the selected Mesh Renderers or Terrains in the scene are marked as static. Only static objects will be lightmapped."
    Please let me know if there is a fix for this.
    I assume it is something simple that I need to do.
     
  2. iossif

    iossif

    Joined:
    Mar 4, 2011
    Posts:
    332
    did you select the items you want to bake in the object tab of the lightmap settings?
     
  3. tibbittsjim

    tibbittsjim

    Joined:
    Jul 4, 2012
    Posts:
    4
    Yes, I selected all the meshes in my scene under the object tab of the lightmap settings. Still getting the error message.
     
  4. RobH2

    RobH2

    Joined:
    Jul 12, 2013
    Posts:
    8
    Did you ever solve this? I'm having the same issue. I have a room with a desk. They are both 'Static' yet only the desk will 'Lightmap.' I can can't get the room to Lightmap. I've unchecked 'Static' and then re-checked it and I still get the error message.
     
  5. WheresMommy

    WheresMommy

    Joined:
    Oct 4, 2012
    Posts:
    890
    Did you set your objects as static? If there is nothing to bake, there could be no light that gives you the shadows you want or there is no object that receives shadows for example
     
  6. RobH2

    RobH2

    Joined:
    Jul 12, 2013
    Posts:
    8
    I couldn't get past the error message so I rebuilt all of the objects and imported them again. That solved the problem. Not sure what became corrupt because the original meshes did work for lightmapping initially. But, after some tweaks they just couldn't be recognized as 'static' anymore even though the switch was checked. I guess it's a random anomaly. I hope it doesn't happen frequently as rebuilding takes a lot of time. I'll update this post if the problem comes back.
     
  7. standardcombo

    standardcombo

    Joined:
    Jun 28, 2012
    Posts:
    19
    I'm having the same problem. All objects are marked as static but I get this error and there is no bake.
     
  8. RobH2

    RobH2

    Joined:
    Jul 12, 2013
    Posts:
    8
    The only way I could solve it was to build it all again. Something gets corrupt.
     
  9. myertveho

    myertveho

    Joined:
    Nov 2, 2010
    Posts:
    20
    I managed to fix this by making sure Lightmap UV's were generated in the asset import settings.
     
  10. RobH2

    RobH2

    Joined:
    Jul 12, 2013
    Posts:
    8
    Thanks myertveho, I'll give that a try. Much appreciated.
     
  11. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    You guys have any luck with this?
     
  12. RobH2

    RobH2

    Joined:
    Jul 12, 2013
    Posts:
    8
    Sorry but I can't confirm if the UV trick works or not. I hired a guy to finish the project and haven't touched Unity since then. Next time I use it, if I get the error, I will remember to try this though.
     
  13. vanderFeest

    vanderFeest

    Guest

    I can confirm that for me, this issue could indeed be solved in the import settings:
    By enabling light map UV generation, as well as disabling any rigs/animations. (The imported model will not have an Animator, which also seems to help)
     
  14. pnyx

    pnyx

    Joined:
    Apr 13, 2014
    Posts:
    8
    In case anyone else has the issue:
    I just found that a model I had problems with had uvs outside the 0-1 range. I also got the rather unhelpful error that there are no static objects to bake in this case. So if your using your own second uv channel, make sure everything is withing the 0-1 square.
     
  15. daprato

    daprato

    Joined:
    Sep 25, 2013
    Posts:
    31
    Thx, that was helpful. :mrgreen:
     
  16. niraj

    niraj

    Joined:
    Feb 14, 2013
    Posts:
    56
    @VanderFeest : Fantastic, it worked. By enabling light map UV generation :)
     
  17. johanf

    johanf

    Joined:
    Apr 12, 2014
    Posts:
    2
    The reason "enable lightmap UV generation" works is because the UV's from your 3D package goes beyond the 0-to-1 UV space. If you don't make your own lightmap and leave the autoUV unchecked, it will use your primary UVs for lightmaps as well. Wether you use that, or make a dedicated lightmap UV set in the second UV set, make sure there are no UV's creeping across the 0-to1 UV space. Beast doesn't like that (I assume since its UV packing algorithm seems pretty simplistic, just square bounding boxes stacked. Maybe it just grabs your 0-to-1 UV space and uses that as a bounding box).