ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Red color (Infinity) must be in range [0;1].
UnityEngine.Experimental.GlobalIllumination.LinearColor.set_red (System.Single value) (at <2e6610ed29844f85a37924f81509fe5d>:0)
Any idea what causes this error? Happens after upgrading to 2020.1.
Disabling deprecated light probes doesn’t solve the issue. Why does it say experimental global illumination?
Hi,
Does this happen only on a specific project, or on new, blank projects as well?
Which OS are you on?
If you could post a repro project, that would be very helpful, and the fastest way to find the root cause.
It does only happen on a specific project. I’m on windows.
Project is quite complex with many plugins and shaders, so finding a cause is a nightmare. Also the error doesn’t repeat itself at all times, rather every few minutes for about 100~150 frames. It does not seem to be correlated to enabling / disabling ( I could be wrong, but couldn’t find any pattern) some features at runtime.
Could it be related to lux etc shaders, since I’m unsure of their linear / gamma conversion part. Project is using gamma color space. Anyhow, if it is unrelated to base unity, will have to go the hard way of finding the source
I suspect it might be related to color temperature calculations, maybe try messing around with the color temperature settings on your lights. Without more information though, it’s hard to say.
ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Red color (Infinity) must be in range [0;1].
UnityEngine.Experimental.GlobalIllumination.LinearColor.set_red (System.Single value) (at <49f4e7e791cc4fffacd88f729e2b1e4c>:0)
UnityEngine.Experimental.GlobalIllumination.LightmapperUtils.ApplyColorTemperature (UnityEngine.Color cct, UnityEngine.Experimental.GlobalIllumination.LinearColor& lightColor) (at <49f4e7e791cc4fffacd88f729e2b1e4c>:0)
UnityEngine.Experimental.GlobalIllumination.LightmapperUtils.Extract (UnityEngine.Light l, UnityEngine.Experimental.GlobalIllumination.SpotLight& spot) (at <49f4e7e791cc4fffacd88f729e2b1e4c>:0)
Does indeed say it’s trying to use spot light color temperature, but none of the spotlights in the project use color temperature nor any code sets it at runtime.
both GraphicsSettings.lightsUseLinearIntensity and GraphicsSettings.lightsUseColorTemperature are set to false
Hmm, that is interesting, I’ll try taking a look at that part of the code.
Could you open the spotlight in the inspector and enabled debug mode (button next to the padlock icon, in the top right). That should reveal some new settings, including a “Use Color Temperature” toggle and a “Color Temperature” setting. I’m curious about what these are set to.
I included some screenshots for clarification.
I think I solved the issue. Does not seem to throw the error during little testing that I did.
It happens because I set light intensity to ridiculously low value such as: 7.320962E-39, while transtioning intensity from 8 to 0 exponentially. Rounding that value up to something more reasonable fixed it. Could it be the case? Something with floating point precision? Though strangely it didn’t always throw the error on those values.