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. Dismiss Notice

"Reduced additional punctual light shadows resolution" message after Upgrading to 2021.1.15

Discussion in 'Universal Render Pipeline' started by Xtro, Aug 28, 2021.

  1. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    551
    Hi guys.

    After I upgraded my URP project from 2020.1.15 to 2021.1.15, Unity started to spam the console with this message.

    Reduced additional punctual light shadows resolution by 4 to make 6 shadow maps fit in the 512x512 shadow atlas. To avoid this, increase shadow atlas size, decrease big shadow resolutions, or reduce the number of shadow maps active in the same frame


    Does anyone know how to get rid of this problem?
     
    lacas8282, Ghosthowl and Katrina99 like this.
  2. notagame

    notagame

    Joined:
    Sep 17, 2017
    Posts:
    17
    I have the same thing... Super annoying. You can go to the URP asset and increase the shadow map to 4096 and dial down the shadow resolutions, but it won't fix the problem totally. If you have a big scene, it still won't fit. And I don't care, if I can't fix it, don't dump this message into the console. And one message would really suffice, but no this is a constant spam that makes the console totally unusable.
     
  3. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    551
    Well said.
     
    Immersive-Matthew and Katrina99 like this.
  4. yarilo

    yarilo

    Joined:
    Dec 14, 2012
    Posts:
    5
    Also there is option "debug level" in universal render pipeline which I set to disabled. Seems like it is totally ignored.
     
    Last edited: Sep 22, 2021
    Katrina99 likes this.
  5. zackblack

    zackblack

    Joined:
    May 17, 2015
    Posts:
    73
    Anyone find a solution to this?
     
    Katrina99 likes this.
  6. artificialstupidity

    artificialstupidity

    Joined:
    Dec 29, 2018
    Posts:
    4
    It seems like you have to lower the High Tier to fit with the Atlas Resolution. I set my Atlas to 4096 and the High Tier to 1024 and the error stopped popping up.

    - nevermind, that didn't last very long lol
     
    ClearRoseOfWar and vikta5kozlova like this.
  7. Tiberius1701

    Tiberius1701

    Joined:
    Sep 16, 2014
    Posts:
    68
    This is super annoying, and have tried lots of settings to fix. Sure would be nice to know how to at least turn the message off.
     
  8. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,268
    This limitation flabbergasts me. It's yet another limitation that builtin does not have. Shadowmaps are already very limited, being only up to 4k. Limiting to a single shadowmap for all lights is crazy.

    At least add the option to allow for more than one shadowmap, with the option disabled by default. We know our game more than unity does, and we should have the freedom to decide the number of shadowmaps we want.

    OR Allow us to go beyond 4k. That's a totally valid option as well. In fact this would be by far the most logical reason, since it doesn't require much dev time compared to adding support for multiple textures...
     
    Last edited: Nov 28, 2021
  9. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,120
    I completely agree. It's such a crazy limitation to have.
     
    Filip8429, Katrina99 and joshcamas like this.
  10. Haapavuo

    Haapavuo

    Joined:
    Sep 19, 2015
    Posts:
    95
    Seems like there is still no fix for this. Come on Unity! Do something!
     
  11. G_Trex

    G_Trex

    Joined:
    Apr 20, 2013
    Posts:
    97
    Getting this error on 2021.2.5f1.

    Can anyone tell me where this "debug level" option is? I can't seem to spot it anywhere.
     
    KasiAsa and AliceWasNeverHere like this.
  12. fero_gg

    fero_gg

    Joined:
    Sep 9, 2019
    Posts:
    6
    Also having this issue, really annoying when trying to read my own debugs and they're getting lost in these constant messages!
     
  13. Crodax

    Crodax

    Joined:
    Nov 21, 2018
    Posts:
    3
    My issue was caused because of the particle system's light module. I changed the 'Shadow Type' parameter to 'No Shadows' in my point light and this error stopped for now.
     
    gareth_untether likes this.
  14. G_Trex

    G_Trex

    Joined:
    Apr 20, 2013
    Posts:
    97
    Success! (I think).

    Open up AdditionalLightsShadowCasterPass.cs. If you just double click the error message in the console, Visual Studio may just open it for you (worked for me). Alternatively, search for it in your project folder.

    Find the lines that tell the message to play and delete them. They should say something like "Debug log : Reduced additional punctual light shadows resolution by 4 to make 6 shadow maps fit in the 512x512 shadow atlas." etc

    I found six and deleted them all.

    They were lines :

    224
    249
    408
    414
    594
    648

    The error should now be gone.
     
  15. samochreno

    samochreno

    Joined:
    Feb 4, 2021
    Posts:
    14
    in my case it just added them back after saving
     
  16. G_Trex

    G_Trex

    Joined:
    Apr 20, 2013
    Posts:
    97
    I had a similar issue initially. The problem was that I was using // to remove the lines rather than fully deleting them.

    Does this help you?
     
  17. Filip8429

    Filip8429

    Joined:
    Dec 16, 2018
    Posts:
    17
    Are there any known plans to fix this in future versions? Are there any workarounds? I reduced the high tier to 512 but I still get this message.
     
  18. gareth_untether

    gareth_untether

    Joined:
    Jan 5, 2018
    Posts:
    63
    I set all my point lights to Shadows/Realtime Shadows/Resolution/Low.

    Fixed the issue for now. I don't have many lights in my scene though.

    upload_2022-1-12_12-50-42.png
     
    Rakun1, Xiaozo, Vaupell and 4 others like this.
  19. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    228
    I have 15 point lights which isn't even a dent on the total I want and still have the issue after doing this for all lights and making a custom pipeline asset and setting the shadow resolution to 256.

    I guess for now I will use Screen Space Shadows only.
     
  20. Sky77

    Sky77

    Joined:
    Jan 30, 2014
    Posts:
    171
    15 point lights with real time shadows is a lot, it'll impact your performances heavily aside from shadow resolution...
     
  21. NikH

    NikH

    Joined:
    Dec 24, 2013
    Posts:
    14
    Nice - making point lights low resolution stopped those logs for me straight away!
     
    Xiaozo and Erzats like this.
  22. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    234
    But your shadows have all been decimated. This isn't a solution.
     
  23. SMoresRUs

    SMoresRUs

    Joined:
    Jul 2, 2019
    Posts:
    1
    I just commented out the debug.log, also not a fix, but it'll have to do for now.
    (Double clicking on the notification in the console will bring you into the script, if you didn't know)
     
  24. Mjeno

    Mjeno

    Joined:
    Apr 7, 2016
    Posts:
    5
    This is really annoying and even happens with a handful of lights in the scene. I'm not even sure what the message is for (much less why it's constantly being spammed) because the lighting looks fine and performance is great as well. The error message itself is the only problem, it makes the console unusable.
     
    Gravesend and MuntyMcFly like this.
  25. DeveloperJake

    DeveloperJake

    Joined:
    May 25, 2020
    Posts:
    13
    Turn this message off by double clicking the debug statement, which will open AdditionalLightsShadowCasterPass.cs at line 421. Delete that line.

    Edit: Oops, nevermind. I should've tested it. Apparently unity literally overrides the script, so you can't remove the Debug.Log call. How annoying.
     
  26. greebo3

    greebo3

    Joined:
    Mar 5, 2021
    Posts:
    4
    Still going one year later. They even make it so you can't even collapse them because it's a "Different" error message each time.

    There is kinda a fix, just turn off the print messages and for yourself use Debug.LogWarning.
     
    Gravesend and way3edgy like this.
  27. xofreshxo

    xofreshxo

    Joined:
    Apr 12, 2017
    Posts:
    68
    Easy fix for getting rid of the messages. Didn't notice a difference in our scenes.
     
  28. theCodeHermit

    theCodeHermit

    Joined:
    Sep 20, 2018
    Posts:
    39
    I expanded a little bit on your idea. I commented out the debug.log and set the entire file as read only. So far the message is gone.
     
    Last edited: May 11, 2022
    zackblack likes this.
  29. ypanos

    ypanos

    Joined:
    May 5, 2014
    Posts:
    4
    Just go to the URP render profile and increase the shadow tile resolution .
     
  30. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    234
    4096 is as high as it goes, and that was the shadow resolution I was using PER SHADOW about a decade ago.
     
  31. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    466
    Point shadows work differently, they are not directional shadows. Point light shadows use cubemap rendering with 6 sides. By default, it used 128-512 pixels per side. (relative to quality) in standard rendering.
    URP uses atlas for point lights shadows, instead of cubemaps.
    with 4k resolution atlas you can use 10 point light shadows with ultra quality in near the camera. Or 42 shadow lights with resolution 256 (middle quality).
    In reality, the farther away the light source, the lower the resolution of the shadow map. So you can render even more light sources into the atlas.
    8k resolution is a waste of resources and memory (512 mb ram) and no one will see the difference in the quality of point shadows.
    It's bad design, if you need to use 10+ realtime shadows in ultra quality.
     
    Deleted User, TomTrottel and P_Jong like this.
  32. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    234
    512 pixels for a point light side? I'm sorry, what year is it again? Not acceptable.
     
  33. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    466
    It acceptable.
    Standard rendering. Very high resolution point light.
    See the resolution of the shadowmap. (512 pixels)
    upload_2022-5-24_8-8-45.png

    You are confusing how directional light shadows and point light shadows rendered. This is a completely different rendering.
    For dir light (in typical case) we can use up to 4k texture (which include 4 cascades), where the first cascade takes max 2048 pixels.
    See the difference between dir light hard shadow (4k resolution, 1km) vs point light hard shadow (256 pixels).

    For the point light source shadow: the quality of the shadow depends on the distance of the light from the object.
    For the directional light : is always equidistant from the object and its shadows are always of the worst quality.
    Point light source requires 6 sides, for example 512 x 512 x 6 = ~1,5 millions pixels
    Dir light per cascade 2048*2048 = ~4 millions pixels

    But directional shadows are always worse, because for 1 km (as example and) it takes ~55/45/13/8 pixels per meters for 4 cascades.
    Point light shadow a couple of meters from the light source can have up to 512 pixels per meter.
    I hope you understand the difference?
    512 (or 1024 in some cases) pixels is enough for any point light in any games and engines.


    upload_2022-5-24_8-29-11.png
     
  34. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,077
    If this is still bugging anybody then you can fix it by taking a local copy of the package before commenting out the warnings described by @G_Trex (https://forum.unity.com/threads/red...-upgrading-to-2021-1-15.1162880/#post-7750170)

    Copy the folder '\Library\PackageCache\com.unity.render-pipelines.universal@xx.xx.xx' into your 'Packages' folder. This means it's now a local package that you can modify without losing any changes. The downside is that it's no longer part of the Unity package system and can't be updated unless you do it manually.
     
    MarkHelsinki and PutridEx like this.
  35. P_Jong

    P_Jong

    Joined:
    Jun 14, 2017
    Posts:
    58
    This worked for me in Unity 2021.3.4 LTS. I set all my realtime point lights to soft shadows and low resolution and then re-generated the lightmaps. The waring went away. Thanks!

    Also, thanks to @kripto289 for the detailed discussion on directional light shadows and point light shadows rendered. This was some good information and helped me understand the differences.
     
    gareth_untether likes this.
  36. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    234

    This is a bizarre and unwanted defense of a very poor quality system. I get it, you don't mind S***ty looking shadows in your games. I do.
     
  37. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    466
    did you just ignore my message?
    You get sharp shadows with point light sources even with 512 pixels. Why do you need a resolution greater than 1024 pixels? Even ue5 uses less resolution for point lights.
    Probably you have a better game than the unreal engine 5 demo? Am I right?

    1024 resolution in point lights != 1024 resolution of directional shadows.
    Point shadows always take up 6 times more space on the shadow map and have greater quality.
     
    EnigmaFactory and wwWwwwW1 like this.
  38. Deceleris

    Deceleris

    Joined:
    Jan 3, 2018
    Posts:
    21
    This is dumb as hell, why they not just put that mesage as a warning
     
  39. y4my4m

    y4my4m

    Joined:
    Jul 30, 2014
    Posts:
    7
    This thread is being ignored by the staff or what?
    Ridiculous and annoying issue
     
  40. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    926
    This needs a fix and a user-setting
     
  41. gnovos

    gnovos

    Joined:
    Apr 29, 2020
    Posts:
    21
    Dear Unity, PLEASE make this `LogWarning` instead of info, then I can at least filter it out in the console! This is a serious impediment to reading console logs which is making development a nightmare.
     
    ClearRoseOfWar likes this.
  42. zackblack

    zackblack

    Joined:
    May 17, 2015
    Posts:
    73
    So a year later and still no fix... absurd. :-(
     
  43. zackblack

    zackblack

    Joined:
    May 17, 2015
    Posts:
    73
    OK, anyone still looking for a DIY solution, this is it! ^
     
  44. seyidovahid

    seyidovahid

    Joined:
    May 29, 2022
    Posts:
    1
    It works, Thanks!
     
  45. Tovey-Ansell

    Tovey-Ansell

    Joined:
    Jul 8, 2015
    Posts:
    149
    Removing or commenting those debug lines isn't doing it for me, Unity just resets the file, even if I mark the file as readonly...

    Super frustrating that Unity spams that console with all these errors, rather than just letting them collapse into one, I'm really not trying to do anything crazy, I only have like 3/4 light sources in my scene...

    Where do you actually go to change the shadow atlas size?

    Edit: It's in the URP Asset itself, to find it go Edit -> Project Settings -> Quality, it should be in the field under Rendering -> Render Pipeline Asset. Double click it to go to the asset itself, then you find the shadow atlas resolution setting under "Lighting", NOT under "Shadows"
     
    Last edited: Aug 2, 2022
  46. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,077
  47. Maximon9

    Maximon9

    Joined:
    May 26, 2022
    Posts:
    8
  48. oliver_unity892

    oliver_unity892

    Joined:
    Oct 28, 2019
    Posts:
    91
    Hi all. I'm getting this error as well in 2022.1.19f1.

    I've implemented the commenting and read only fix above, which is fine and that works, but I'm concerned that having a read only file may cause issues in the future.

    Also, I have zero realtime lights in my scenes. It's all baked. But reading through the above it seems that people are seeing this with realtime lighting and the official fix relates to realtime shadow resolution. Is that right or am I misreading this?
     
  49. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,891
    Also getting this a lot lately, hopefully will be addressed soon
     
  50. MarkHelsinki

    MarkHelsinki

    Joined:
    Jul 14, 2021
    Posts:
    23
    I'm curious how some folks managed to make their file readonly.

    I've fixed this issue to date by setting resolution on point light shadows to low.