Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Lightmapping and Baking lights not really working well for me.

Discussion in 'Editor & General Support' started by QuickiSticki, Mar 20, 2021.

  1. QuickiSticki

    QuickiSticki

    Joined:
    Nov 18, 2020
    Posts:
    26
    I am trying to do some lightmapping and baking to optimize my game a bit more, but I am not having any luck. First off, I have watched quite a few tutorials for lightmapping, and I am not sure what is going on for me. When I bake my lighting, my spot lights do not show on my terrain at all and my point lights just look crappy and don't cast shadows. I also have a few small problems, but those are the big ones.

    If any of you think you can give me any advice or help me resolve some of my issues, please let me know!

    Thank you all!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,519
    Well, we know light-baking works. Go back and work through the tutorials again: make sure the lights are set for baking, make sure the geometry you want to bake onto are set static lightmapping, stuff like that. The manual for lighting lists the very specific requirements before lighting will work.
     
  3. QuickiSticki

    QuickiSticki

    Joined:
    Nov 18, 2020
    Posts:
    26
    Thank you for the reply, Kurt. I actually purchased Bakery and RT Preview for Bakery. I have everything going good now except for my terrain, which I still cannot get to show baked lighting.
    1.PNG 2.PNG 3.PNG

    I do have Static checked and Contribute GI checked. Not sure what else to do. I have read that some people have problems with the resolution of their maps and size of their maps that can cause them to not bake. Not sure if you see anything.
     
  4. QuickiSticki

    QuickiSticki

    Joined:
    Nov 18, 2020
    Posts:
    26
    SOLVED:

    For anyone stumbling around trying to figure out why there lighting is not working when you bake it, you may have done the same thing as me. In realtime, my lights looked great and worked great. When I bake them, none of my spot lights were working, even though I checked the settings a hundred times. Turns out that the prefab I was using for my spot lights had the origin of the light inside of the model. For some reason, this looks good and works in realtime, but once baked, the light was not able to emit out through the mesh, and was contained inside of the model. All I had to do to fix it was move my light source down beneath my mesh model so the light could travel through empty space and emit.

    DON'T PUT YOUR LIGHT SOURCE INSIDE OF YOUR MODEL!!!

    Really frustrating problem, really easy solution. Hope it helps someone out there!
     
    hworld and typecarst like this.
  5. typecarst

    typecarst

    Joined:
    Jul 9, 2020
    Posts:
    1
    Just thanks! :D The lights were a tiny bit in the geometry and I went almost insane...