Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Indirect lighting wrong on one mesh

Discussion in 'Global Illumination' started by HemiMG, Jul 26, 2015.

  1. HemiMG

    HemiMG

    Joined:
    Jan 17, 2014
    Posts:
    911
    I just finished solving a problem with reflection probes causing seams everywhere, only to discover that there are still two areas with a problem. One is shown in the picture below. You can see that middle column of a modular level is not getting the same indirect lighting as the rest of the scene. There are actually two corner pieces making up that improperly lit area, so they are lit the same, they just don't match the scene. Turning indirect lighting down to 0 solves the problem, but is clearly not the desired solution.

    The strange thing is, being a modular scene, there are several other instances of that exact same mesh set up and only one other seems to have the problem. Everything in the scene is static, and there are no baked lights. So I guess it is a precomputed GI problem.

    Possibly related to the problem is the fact that anytime lighting needs to get rebaked, I get an error that says "Failed opening GI file." Actually, I get 11 of them. I tried clearing the GI cache in the hopes that it solved that error (and with it the lighting problem) but that didn't do any good.

    Any ideas would be great. I tried searching and couldn't find an answer. But all I've done for that past two days is search for answers regarding lighting this scene, so it's entirely possible I'm just fatigued and missed something.

    GIProblem.png
     
  2. HemiMG

    HemiMG

    Joined:
    Jan 17, 2014
    Posts:
    911
    Hmm. Well, I fixed the problem in the image when I added a door frame to the end of the hallway. I have no clue why that fixed it, and I suspect it just masked it. The problem still exists in a similar way over on the other side of the hall. Adding a door frame to that end didn't fix it.

    I also discovered that the clock in one of the six rooms doesn't go dark when all the lights are out. The clock is exactly the same as all of the other clocks, they are made from the same prefab. So I have no idea what is going on there. I also discovered a similar problem at the bottom of one of my walls. Oddly, that was fixed just by flipping the model around 180 degrees. Which makes no sense whatsoever because the model is perfectly symmetrical and the pivot point is smack dab in the center. Flipping it had zero effect on the geometry being presented to the system.

    I've looked over and read everything there is to find about the new lighting system, but I'm convinced it's just pure voodoo. The results seem entirely random without any basis in logic. Finishing an entire level with things going wrong for no apparent reason at every corner is going to be a nightmare. If anyone has any clues as to what to look for in tracking down these issues, I would really appreciate it.
     
  3. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Sounds like realtime GI isn't stiching the charts. Have a look at the charting view and check if the objects are getting stiched or if they have separate atlases. You can use the Auto UV settings to make the charts stitch.
     
  4. HemiMG

    HemiMG

    Joined:
    Jan 17, 2014
    Posts:
    911
    Sorry, I just came back to this problem after getting a bunch of modelling and texturing done. As you can see from the image, they certainly aren't getting stitched together, but nothing I change in the lightmap parameters or UV generation settings will make them stitch. On top of that I'm getting constant errors about GI files failing to open, occasional errors about failing to load geometry or meshes not having albedo UV's when I know full well that they all do. Sometimes when I bake and turn out the lights, it gets dark as it should. Other times there is strange, and very bright ambient light everywhere. Simply rebaking fixes that. There are just a massive, massive amount of issues with Enlighten that seem to need to be addressed. And I don't know if they are on my end, or Unity's end.

    All I know is that I need to get this project done, and I have no clue whether I am better off trying to get Unity to work right, or switching to another engine. I don't want to have wasted 4 weeks worth of work, but I don't want to waste another 10 trying to get this scene properly lit. It seems like Unity isn't capable of making modular scenes. I'm sure that's not true. But I have no clue how to make it work, and it is frustrating me to no end.

    Screenshot (27).png