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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Realtime Lightmap generating black patches

Discussion in 'Global Illumination' started by aks_percept, Mar 24, 2015.

  1. aks_percept

    aks_percept

    Joined:
    Feb 24, 2015
    Posts:
    8
    Hi guys,
    We are working on a architecture visualisation project for large touch screens. We are having some trouble with realtime GI for interior. On some geometry, after precomputing the GI, it leaves black patches as you can see on the sofa.
    Has this been seen before? What shall we do in order to get it to work properly? Any help would be appreciated. Thank you!
    Untitled-1.jpg
     
  2. proandrius

    proandrius

    Unity Technologies

    Joined:
    Dec 4, 2012
    Posts:
    544
    Make sure that on the mesh object in the import settings "Generate Lightmaps UV" is checked.
     
  3. aks_percept

    aks_percept

    Joined:
    Feb 24, 2015
    Posts:
    8
    We do have that checked. That was the first thing we do when importing a mesh. Rather we use the asset importer script from unity itself to import the meshes. So we have the settings predefined.
     
  4. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Are you using directional specular, directional or non-directional mode?
     
  5. aks_percept

    aks_percept

    Joined:
    Feb 24, 2015
    Posts:
    8
    Directional specular
     
  6. aks_percept

    aks_percept

    Joined:
    Feb 24, 2015
    Posts:
    8
    @KEngelstoft : Are we missing anything obvious? Can you please help us solve the issue? I am a Unity evangelist through and through, but my boss is getting weary about the GI.:( I don't want to go UE. Please help me! :D
     
  7. proandrius

    proandrius

    Unity Technologies

    Joined:
    Dec 4, 2012
    Posts:
    544
    Maybe you should try increasing resolution?
     
  8. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    It would be interesting to know if the artifacts go away if you change to non-directional mode.
     
  9. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    In my case it has always been the geometry. Do your sofa cushions have backs/bottoms. Is there a bottom on the sofa?
     
  10. Phantomx

    Phantomx

    Joined:
    Oct 30, 2012
    Posts:
    202
    I'm also having some issues. As you can see, I have a couple of flat 3D geometry that are completely black for no reason. I tried to make my own lightmap UV but the problem is still there. I'm in Non Directional mode with baked GI only

     
  11. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    @Phantomx you issue looks unrelated to what @aks_percept is experiencing, and you should file a bug report about this blackness.
    @aks_percept you issue looks like invalid cluster centers that can show up in directional specular mode. Try non-directional mode and let me know if it helps.
     
  12. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    Hi try also bumping up Irradiance Budget (to middle of slider) and Irradiance Quality (to middle of slider) and ~drop~ Precomputed Realtime GI Resolution to 3. I'm getting some "patchiness" issues as well. Irradiance Budget and Quality without too high a Precompute Resolution makes things nice.
     
  13. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    Interesting. I may try that, but I want to "show off" my Realtime GI tests first. :)
     
  14. fueldown

    fueldown

    Joined:
    Aug 21, 2012
    Posts:
    15
    Hi, I work with @aks_percept as Unity developer. As we are making the realistic architecture visualisation to show off Unity against our rival company which uses UE, I would very much like to use the directional-specular mode as it is fantastic. Anyhow, I'd like to report that the black patches go away while using non-directional mode. BTW, I'd also like to report that we use directional-specular for our exterior scene and it doesn't show any patches on any of the meshes. So I am not sure what's the culprit here. Baffled at the moment. o_O
     
    KEngelstoft likes this.
  15. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    Getting some shadow "patchiness" with emissive-only lighting, even on "Non-Directional"?

     
  16. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    @aks_percept @fueldown If the problem is invalid cluster centers that can show up in directional specular mode, they can be worked around by moving geometry slightly or changing resolution so the cluster centers aren't obstructed. We are working on a solution for this problem but I can't give you an estimate for a solution yet. It might also be that the dominant light direction is changing very rapidly the places where your artefacts show up, maybe you can experiment a bit with a fill light to see if this is the case?
     
  17. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Please create a new thread when the subject isn't related, instead of hijacking existing threads. This looks like you should experiment with higher budget/quality settings in the Precomputed Realtime GI part of your custom Lightmap Parameters.
     
  18. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Please calm down... I agree it can be hard to distinguish noisy artifacts on a surface. I was just trying to help... It is easier to keep track of separate issues in separate threads, so we don't have to keep several concurrent conversations going and risk something falls through the cracks.
     
  19. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    Try checking Preserve UV's in the Lighting > Object panel. I had good results today doing that.
     
  20. aks_percept

    aks_percept

    Joined:
    Feb 24, 2015
    Posts:
    8
    @srmojuze : Dude! You need to take a chill pill. I have been watching @KEngelstoft and @Joachim_Ante since the beginning of the Unity 5 beta. I have been following their advice since the very start. They are here to help and that's for sure! He might not say it, but I am saying it to you on Unity's and the community's behalf to chill down.

    Just because you faced some issues, you can't take it out on Unity. Unity is doing some false advertisement? I think not. I have achieved some amazing things with Unity 5 so far which I wouldn't even dream with Unity 4. I am a game programmer as well, and I know how difficult it is to get everything right at the time of release, and my projects are tiny (6-8GB project sizes) compared to the codebase at Unity. There is no such thing as a perfect software. There will be bugs and it's not fair to shoot the messenger.

    You were not enslaved into testing Unity5. It was YOUR decision.I too lost a lot of time and money in Unity 5 as my project was supposed to be out by Jan and I am still working on it. But i don't regret a single bit to have moved to U5beta. It has been frustrating some times, but I learn so f**king much during this time! Thanks to that, I know a decent amount of Unity5 even before it came out. It's a privilege to be a part of community that is so thriving and active. If you don't feel the same way, may be you shouldn't have in the first place.

    I am not saying here that your question was illegitimate. Nor did KEngelstoft. He simply stated one of the unsaid rules of forum postings anywhere in the world. Don't hijack the unrelated thread. My post was related to Real-time GI, not baked. And KEngelstoft did revert with a suggestion too. And instead of thanking him, you are bitching about how his comment was not polite and he should improve his customer skills? Are you for real? Are you a delusional princess of some faraway land? Stop whining. The content is the king and not the tool. Create something good with whatever Unity5 provides. It will most definitely be better than Unity4.

    This wasn't to insult you in any ways, so I won't matter what you reply to this. Just open your eyes and be grateful. That's all. ;)
     
  21. aks_percept

    aks_percept

    Joined:
    Feb 24, 2015
    Posts:
    8
    @topofsteel : I tried doing that as well, but there wasn't any particular improvement with directional specular lightmaps even with the uv's are preserved.
     
  22. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    Really? I've had great success using Preserve UV's. I'm re-building my whole project now. Unfortunately, we're unable to publish Directional Specular content. But if I shoot for that now, i'll be there when we can. If you want, PM me, I'll take a shot at it.
     
  23. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    Thank you for your patience. I have calmed down, deleting my post, I know I need to work with Unity community (company and developers) accordingly.

    I apologise if I was hurtful and/or abusive.
     
    Last edited: Apr 3, 2015
    topofsteel likes this.
  24. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    My screenshot above was related to realtime, not baked. So I am in the realtime area.

    But OK, I agree, let's trace the problems separately so everything doesn't get muddled.

    Visual artifacts may appear similar or different and they may or may not be related to the same underlying cause.

    I don't know, I sometimes just ain't good on the social media stuff as opposed to in real life.

    I have liased with several Unity Technologies in the past few years but not @KEngelstoft until on this section of the forum.

    Not sure why I blew up at him.

    You are right, there are frustrations, but I have, as we have, decided to use this software for our purposes, to realise our own goals, etc.

    Thank you everyone for your patience and understanding.

    I apologise if I offended anyone and hurt anyone's feelings.

    Regards,
    srmojuze.
     
    Last edited: Apr 3, 2015
    SpiriTx and topofsteel like this.
  25. newmonuments

    newmonuments

    Joined:
    Oct 21, 2014
    Posts:
    15
    switching from directional spec to just directional mode may solve your issue, but then you won't have specular info.... This is a bug I believe
     
  26. tobl

    tobl

    Joined:
    Sep 7, 2015
    Posts:
    1
    I have a similar problem. Black patches with "precomputed realtime GI" - Realtime Resolution: 4 - Non Directional:
    Black_Patch_1.jpg

    And here: using Directional Mode: "Directional"
    Black_Patch_2.jpg

    Somehow there seems to be a bug. When viewing the generated Map, some parts of the object are placed on holes on the Map:
    Black_Patch_4.jpg

    When using Preserve UVs, the object is placed correctly on the Lightmap:
    Black_Patch_5.jpg

    Another way to solve the problem was, to change the Realtime-Resolution to 3:
    In this case, the object was placed on a different location on the Lightmap:
    Black_Patch_6.jpg

    This problem occurs on different objects in my project. When new geometry is imported, those artifacts can sometimes disappear from one object an appear somewhere else.
    I hope this helps to localize the problem somehow.
     
  27. Jesper-Mortensen

    Jesper-Mortensen

    Unity Technologies

    Joined:
    Mar 15, 2013
    Posts:
    231
    Hi @tobl

    I'd like a copy of that scene if you are able to reproduce this solidly. Which version are you on?