Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Large Scale Lighting Noise

Discussion in 'Global Illumination' started by serverguy, Mar 26, 2015.

  1. serverguy

    serverguy

    Joined:
    Oct 28, 2014
    Posts:
    11
    So, I am working on a project that uses very large scales and I am having some issues when objects get over a certain threshold with unity5 (p2). I was hoping someone could help or point me in the right direction? It used to be fine in Beast :/

    Basically I get very "dirty" lighting with artifacts. Its actually really bad in my project but I can demonstrate it to a lesser degree with a very simple process:

    1) create a new project
    2) change the following lighting settings (to reflect the large scales). Leave everything else as default:
    a) turn off continuous baking
    b) turn off Precomputed Realtime GI (otherwise this will take a while!)
    c) Set baked resolution to 1
    d) Turn off compression (otherwise its even worse)
    e) set indirect resolution to 0.001
    3) add a cube and make it 10,000 x 10,000 and make it static.
    4) in the lighting panel, sent the objects scale in lightmap to 0.04 (so it will fit in the lightmap)
    5) now bake.

    You should get this result:
    Capture.PNG

    I have objects that are up to 25,000m in size and need to work out how to bake these without any noise.

    Here is another simple mesh (14,000m wide) in the same scene which shows it much worse:

    Capturea.PNG

    Any ideas?
     
  2. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Do you supply lightmap UVs generated in a DDC tool or are you letting Unity generate them for you?
     
  3. serverguy

    serverguy

    Joined:
    Oct 28, 2014
    Posts:
    11
    I let Unity handle it. That cube was a standard Cube from Unity. Not imported.

    If I make the cube 1000 x 1000 x 1000 it looks great.
     
  4. serverguy

    serverguy

    Joined:
    Oct 28, 2014
    Posts:
    11
    In fact, after experimenting with the simple cube example, it looks fine at 2,000m and at 2,500m they start to appear. If you lower the default ambient light it becomes very pronounced.
    Capture.PNG
     
  5. serverguy

    serverguy

    Joined:
    Oct 28, 2014
    Posts:
    11
    Here is the lightmap. The noise only relates to the directional light it appears (not the ambient)
    Capture.PNG
     
  6. serverguy

    serverguy

    Joined:
    Oct 28, 2014
    Posts:
    11
    Can anyone else replicate this? Is this only me?
     
  7. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    Emission lighting creates "spotty" "patchy" stuff on Unity cube primitive at normal scale.

     
  8. serverguy

    serverguy

    Joined:
    Oct 28, 2014
    Posts:
    11
    looks similar, but I am not using any emissive materials. I only have a single directional light source (the standard one). At lower scales my lighting works fine. You may need to increase the Baked and indirect resolution at your scale.
     
  9. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Hi serverguy! I have reproduced this and filed a bug report, case number 685375.
     
  10. serverguy

    serverguy

    Joined:
    Oct 28, 2014
    Posts:
    11
    Thanks!
     
  11. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Hi! Assign a custom LightmapParameters with a higher pushoff value, that should fix this.
    You are on the limits of what floating point precision can represent though, so consider scaling down you scene (if you are using centimeters, try using meters if possible).
     
  12. serverguy

    serverguy

    Joined:
    Oct 28, 2014
    Posts:
    11
    Unfortunately I do need to run the game at large scales (Its a large scale VR project).

    Pushoff seems to do it! Thanks!
     
  13. Welby2

    Welby2

    Joined:
    Feb 5, 2014
    Posts:
    33
    Pushoff seems to have improved a bit the artifact but it's definitely still there for me..