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

Lightmaps not baking to all objects

Discussion in 'Global Illumination' started by cgentry, Nov 9, 2017.

  1. cgentry

    cgentry

    Joined:
    Jan 19, 2017
    Posts:
    2
    *standard newb disclaimer: still learning the ropes here so apologize for the lack of understanding in what I'm dealing with as well as vagueness in trying to explain the issue.

    Using 2017.2

    I'm hoping this is a case of just needing to adjust resolution or texels? I've tweaked numbers but am seeing a quadrupling in render time so before I go that route I wanted to make sure there wasn't something less time consuming that I was overlooking.

    I'm not up to speed on translating the uv chart meanings but the one thing that stood out is that the grids of the object maps on the affected tables are much larger than the others....

    2017-11-08_14-44-05.jpg things tried so far:

    rebooting
    clearing gi cache
    static
    deleted and replaced affected instances
    different table models
    different textures
    different uvs
    baking only the tables and the room
    progressive mapping
    pounding on my desk
    prayers
     
  2. DougRichardson

    DougRichardson

    Joined:
    Oct 7, 2017
    Posts:
    74
    Also n00b here, but here's a list of things I'd do.

    Trying to Understand the Cause:
    • In Scene view, turn on Realtime GI > Directionality. Make sure all the table tops have the same color. If not, perhaps the surface normal isn't pointing straight up and the difference between light and dark tables is rotation. (Note: This assumes directionality is showing which way the normals of the surface are pointing, I don't actually know of this is what directionality does).
    • Capture a frame in Frame Debugger and then move forward and back until you see a table drawn correctly. Then find a table drawn incorrectly and see if you can determine the difference. This might be easier to do if you can replicate the problem in a scene with fewer objects.
    • Are the darker tables caused by a blocked light source?

    Random Ideas
    • Make sure bake has completed. In my limited experience, with large terrains this can take 20-30 minutes on a new desktop class machine.
    • Uncheck Mixed Lighting > Baked Global Illumination in the Lighting window and see if the problem happens with only Realtime Global Illumination.
    • Try placing reflection probes above the tables that are dark.

    Also, would you include a screenshot of the Lighting window (Main Menu > Window > Lighting > Settings)?
     
    cgentry likes this.
  3. cgentry

    cgentry

    Joined:
    Jan 19, 2017
    Posts:
    2
    KHAAAN!!!! (going to yell that out if this next render doesn't work)

    • Yes, I did notice earlier that the tables are darker on the directionality chart. The table are instances though so meshes and uvs are consistent.
    • The ceiling is just a cube with an emmisive material.
    • Just tried unchecking baked gi. Same problem.
    • There is a single reflection probe in the center of the room with the box encompassing the entire room.
    The ceiling is currently one rectangle with an emissive material set to 1.6 to provide room lighting. There are a couple of structural beams going across the ceiling that could be blocking light from the ceiling. Head scratcher though is that when I turned the beams off, the affected tables randomly changed!

    Turning the environment lighting intensity multiplier lightens up the dark tables but turning it up too far causes them to glow like they're emitting light?!?!

    I've now noticed that if I turn the ceiling off and and let the skybox light the interior, all the table seem to be evenly lit.

    I'm still curious as to why the object maps are different sized between the good and bad tables.

    unitygi.jpg





     
    Last edited: Nov 9, 2017
  4. DougRichardson

    DougRichardson

    Joined:
    Oct 7, 2017
    Posts:
    74
    I'm stumped but here are a two more ideas:
    1. I noticed you have "Auto-generate" lighting turned off. You have pressed the "Generate" button recently, I presume?
    2. Determine if it's an instanced object issue. Replace an object that's unexpectedly dark with a non-instanced object that otherwise has the same mesh and material settings. Does the problem still occur? If so, it's probably a generic lighting issue; if not, it's probably an instanced object issue.