Search Unity

"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. MarkHelsinki

    MarkHelsinki

    Joined:
    Jul 14, 2021
    Posts:
    23
    This worked for me. I was a bit confused because there were no other packages in the folder and I didn't have a universal renderer folder, just the standard. But copied this com.unity.renderpipeliines.... to Packages inside the Project folder and lo and behold, my commenting out the Debug messages now works and isn't getting overridden. I now have a functioning console again. Thanks!.
     
    tonemcbride likes this.
  2. vTimePawel

    vTimePawel

    Joined:
    Aug 1, 2017
    Posts:
    32
    Just started getting these errors out of the blue in the game.
    Debugging package code suggests URP is trying to calculate shadow information for all lights, including baked ones, even when additional lights and shadows are disabled across the board in all tickboxes possible.
    Which seems weird to me...
    Code (CSharp):
    1.   AdditionalLightsShadowCasterPass.IsValidShadowCastingLight
    doesn't take any of those into consideration and just slaps all lights into atlas calculations blindly inside the
    Code (CSharp):
    1.     for (int visibleLightIndex = 0; visibleLightIndex < visibleLights.Length; ++visibleLightIndex)
    Loop around line 540 in AdditionalLightsShadowCasterPass.cs
    I'll test fixing in by moving URP out of packages and editing that code manually to not bother certain types of lights.
    I have re-written the code roughly to
    Code (CSharp):
    1.  
    2.         bool IsValidShadowCastingLight(ref LightData lightData, int i)
    3.         {
    4.             if (i == lightData.mainLightIndex)
    5.                 return false;
    6.             else if(!lightData.supportsAdditionalLights)
    7.                 return false;
    8.  
    9.             VisibleLight shadowLight = lightData.visibleLights[i];
    10.            
    11.             // Directional and light shadows are not supported in the shadow map atlas
    12.             if (shadowLight.lightType == LightType.Directional)
    13.                 return false;
    14.  
    15.             Light light = shadowLight.light;
    16.            
    17.             if(light.lightmapBakeType == LightmapBakeType.Baked)
    18.                 return false;
    19.  
    20.             if(!light.enabled)
    21.                 return false;
    22.  
    23.             return light != null && light.shadows != LightShadows.None && !Mathf.Approximately(light.shadowStrength, 0.0f);
    24.         }
    And it's no longer throwing errors for my case. Is that a valid change tho? No sure.
     
  3. vTimePawel

    vTimePawel

    Joined:
    Aug 1, 2017
    Posts:
    32
    Bump. And I'll keep bumping this until Unity Staff wakes up.

    I don't understand why this thread, despite a page of answers over a period of a year is getting zero attention from Unity Devs.

    We're currently running a fully-baked environment with no realtime shadows, all Cameras' RenderShadows ticked off, ShadowDistance of 0 and URP asset setup like so:
    upload_2022-11-3_9-21-12.png
    And yet my in my profiler I can see triggers to various 'Additional Shadow' pass functions and get spam in Logs about reducting shadows resolutions.
    upload_2022-11-3_9-25-28.png

    upload_2022-11-3_9-26-1.png
    What shadows?! What resolution?! There's nothing to render, there's nothing to reduce or calculate. Cull this out. What's the point of running this (& blocking the Main thread) code? seems like this is an If statement away from being fixed, but I can't do anything about it becuase it's package'd code.

    @dnach - @ING you because you were the 1st one I've seen browsing sticky'd topics that was recently online, soz for spam
     
  4. vTimePawel

    vTimePawel

    Joined:
    Aug 1, 2017
    Posts:
    32
    It's been another week with no replies from anyone, how hard can it be to read a forum post and at least acknowledge its existence unity team??
     
  5. broido

    broido

    Joined:
    Feb 21, 2021
    Posts:
    1
    bumping this thread. have the same problem
     
  6. Alexiosiko

    Alexiosiko

    Joined:
    Aug 23, 2019
    Posts:
    1
    You could ignore the problem by double clicking the error and commenting the debug.log() line that outputs the error, I don't know how to solve the problem tho
     
  7. vTimePawel

    vTimePawel

    Joined:
    Aug 1, 2017
    Posts:
    32
    This doesn't solve the problem as URP Package re-import or upgrade tend to overwrite files, reversing that change.
    We need a Unity-side fix.

    Also, an official acknowledgement of a year-old issue with 2 page long thread would be appreciated. EA has better customer support than this.
     
  8. KineticBen

    KineticBen

    Joined:
    Jul 19, 2021
    Posts:
    10
    Bump. Same problem here. About to push URP update soon to Phasmophobia, and our support team will have to manually go through and delete these logs.
     
  9. Vanz

    Vanz

    Joined:
    Nov 19, 2013
    Posts:
    374
    Bump. Same problem here.... still no fix??
     
  10. Johane

    Johane

    Joined:
    Jan 30, 2016
    Posts:
    19
    Just bumping because this is too annoying.
     
  11. braur

    braur

    Joined:
    Jan 7, 2018
    Posts:
    7
    only one directional light in the scene with realtime soft shadows. Getting info about additional light shadows...what additional light shadows? All my additional lights in the scene have turned off shadows...still getting the msg
     
  12. JulianJarecki-flyingshapes

    JulianJarecki-flyingshapes

    Joined:
    Nov 30, 2022
    Posts:
    3
    what is the current workaround to get rid of these messages?
     
  13. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    I know this is necroing the thread, but the reason for this is that you are editing it in Library/PackageCache. If you wanna edit any package copy it from Library/PackageCache to Packages. I find it best to rename them not to have the version on the directory name, as that way any updates you do don't need fancy detect renames etc. in version control.
     
  14. vTimePawel

    vTimePawel

    Joined:
    Aug 1, 2017
    Posts:
    32
    Not really necroing a thread if it's for an active issue that got no resolution or recognition still ;/
     
  15. KingLord

    KingLord

    Joined:
    Mar 21, 2015
    Posts:
    4
    Going to throw one more stick on the pile hoping that at some point it gets some attention. I understand all the general concepts at play here but some of these limitations seem insane given modern rendering techniques. I have the following scenario:
    1 Large low poly scene
    1 Mixed Directional Light with no shadows
    2 Low Poly Objects
    4096 Max Shadow Map resolution

    As soon as I add 1 non-directional light with shadows, even at 128 texture size, this error starts popping up. I either can decide to have shadows on a directional light that I don't want to have, or nothing unless I reduce my scene size. In 2023. Some people here might think this is OK, I personally strongly disagree and would really like to see Unity do something, or at least SAY something.
     
  16. Jaccohero

    Jaccohero

    Joined:
    Aug 31, 2022
    Posts:
    3
    Totally helpfull for me! Great job thanks.
     
  17. Mackas84

    Mackas84

    Joined:
    Feb 12, 2022
    Posts:
    2
    BUMP!
    the same thing happens in version 2021.3.6f1, after switching to version 2021.3.19f1 the problem disappears, but you can't build because the textures and lighting don't work...
     
  18. mat108

    mat108

    Joined:
    Aug 24, 2018
    Posts:
    133
    What a S***show unity is atm
     
  19. itskuza

    itskuza

    Joined:
    Jan 10, 2022
    Posts:
    1
    is there a fix now ? This issue is bugging me
     
  20. TrentSterling

    TrentSterling

    Joined:
    Jan 4, 2013
    Posts:
    99
    Ran into this with a totally baked scene and the latest 2021.3 doesn't make any sense at all!
     
  21. EgoJacky

    EgoJacky

    Joined:
    Aug 15, 2017
    Posts:
    28
    Bump
    getting this error in
    Unity 2021.3.14f1
     
  22. Draconem603

    Draconem603

    Joined:
    Aug 9, 2021
    Posts:
    2
    Here is how I fixed this error:

    All you have to do is go inside your URP asset and check the "cast shadow" option, then change the shadow atlas resolution as your shadow resolution. Hope this helps.
    upload_2023-7-6_11-17-46.png
     
    SuspecM likes this.
  23. G_Trex

    G_Trex

    Joined:
    Apr 20, 2013
    Posts:
    98
    Interesting. I still get the error with this fix, but only once instead of it spamming the console.
     
  24. SuspecM

    SuspecM

    Joined:
    Jul 27, 2021
    Posts:
    37
    So I have been toying a bit with this issue and wanted to provide an answer that is neither "muh shadows" nor "yall insanse for wanting this much shadows".

    First of all, there is no magic combination of settings for this. If you cranked up the Shadow Atlas Resolution to max and you still get this issue, you straight up have too many shadow casters. Period. The only thing you can do is reduce shadow resolutions to low or medium (trust me, it won't destroy your shadows, the worst it does is make them less pronounced/strong). If that does not help, your only solution is go trough every light one by one and decide which one you can get away with not casting shadows with. If you put in some effort you'd be surprised how few shadow casters you actually need to make your scenes look really good. Also keep ambient occlusion on. It helps you get away with a lot. It's essentially a game of whack-a-mole where you are trying to find the maximum number of shadow casters you can get away with.

    There is a very good reason that out of all warnings Unity could spam endlessly, it's this one. It's a not so subtle hint that you should think twice about shadow casters. It's really annoying that it essentially offers no real solutions and it has seemingly no real consiquences (I mean the warning itself basically tells you that there is this issue that Unity already fixed?) but I assume it's a complex problem which has no simple answers unfortunately.
     
  25. baggyg

    baggyg

    Joined:
    Nov 21, 2013
    Posts:
    30
    Not sure if this was mentioned but its pretty easy to set the Shadowmap resolution via reflection to get higher values. I'm using 16.384 even on a PS5 / PSVR 2 and it works fine (and actually has much better performance then constant downscaling calculations).