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

Baking light is only baking objects I recently added.

Discussion in 'General Graphics' started by radiantboy, Feb 26, 2021.

  1. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Something went weird in my unity, it only seems to bake things that were added in the last few days, it will end and they're baked nothign else is. The lights outside of that area seem to act as realtime ones, theyre there but not baked (and flickering due to pixel light count). The "baked lightmap" view shows only the new areas baked.

    Now I did try "Bakery" which may have adjusted some uvs (and maybe that did it???), but I spoke to author and baked in a way to fix them (supposedly), yet it is still happening. So im wondering has anyone seen this before? And how to fix... I hope to god ive not wrecked my scene smoehow, been a while since a back up ;-/
     
  2. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Ok this was down to bakery, it set every mesh's scale in lightmap to 0 because it crashed and didnt restore them. I wrote a script to fix that. Also the problem of lighting vanishing when you hit play, also bakery, it copies old lightmaps over the top of new ones even when you think you have cleared them. I noticed this by pure chance (bakery has an option in tools/utilities or something just called clear baked data or similar, I deleted them by hand as im not sure this really works). The bakery author helped me with the scale one. Basically if you have light issues your first thought should be, have I ever used bakery? Also by using linear and not gamma things changed A LOT.. lights actually look good. I also moved to defferred rendering (not sure how much that did but looks ok still, supposedly it is faster with realtime lights so now I can drop in a handful of realtime lights to get back some of that goodness on top of my baked ones). After many years I think my light woes are over. May still try bakery again with this understanding, but for now I am just happy to have light. Also note bakery can readjust uvs during a render you need to re-render with that option set to remove what it did. To avoid bakery crashes turn off the vram optimisation, use sane texels (maybe 10 or less if its a big scene).