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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question How do I enable Lights Use Linear Intensity and Lights Use Color Temperature?

Discussion in 'Universal Render Pipeline' started by Munkey, Sep 9, 2022.

  1. Munkey

    Munkey

    Joined:
    Oct 26, 2013
    Posts:
    21
    My project originally started as a 2D project using the built in renderer, but over the years it has morphed into 3D and then started utilizing URP. I noticed that when starting a new project using the 3D URP template my directional lights have a Color Temperature option, but this option is not available in my main project that's been updated to use URP.

    How can an existing project enable Lights Use Linear Intensity and Lights Use Color Temperature settings?

    I found this article but the information seems outdated, as there is currently no way to enable debugging for the Project Settings>Graphics tab:
    https://kpprt.de/tutorial/enable-co...9f17d97e963b933b70649b1997b08d#comment-139764

    I even tried setting these options to True via a script but noticed no difference.

    The Unity Docs seem to suggest it's possible to turn these options on, but I have no idea where: https://docs.unity3d.com/ScriptReference/Rendering.GraphicsSettings-lightsUseLinearIntensity.html

    Please help.
     
  2. Kyriakos80

    Kyriakos80

    Joined:
    Sep 30, 2017
    Posts:
    49
    You can get Kelvin to RGB through Mathf.CorrelatedColorTemperatureToRGB(value), is this what you want?
     
  3. Munkey

    Munkey

    Joined:
    Oct 26, 2013
    Posts:
    21
    No I'd like to actually enable the Lights Use Linear Intensity and Lights Use Color Temperature settings. Here is an image of my scene in 2 different projects. On the left, the project was initialized with the 2D Built-In Renderer template and then was upgraded to use URP while the right was initialized with the 3D URP template. You can see that the lighting is behaving very differently in the 2 projects even though they are both displaying the same imported assets.
    lighting 2d vs 3d.png

    While I cannot be 100% sure at this time that those 2 settings are to blame, it's the only thing I have to go on in terms of what could be different between these 2 projects.
     
  4. Kyriakos80

    Kyriakos80

    Joined:
    Sep 30, 2017
    Posts:
    49
    Have you enabled tonemapping in the PP effects by any chance?

    Also you can toggle temperature off from the light appearance dropdown.
     
  5. Munkey

    Munkey

    Joined:
    Oct 26, 2013
    Posts:
    21
    I have a Global Volume in both projects with a Tonemapping property, but it is disabled in both projects as well.

    Where can I find this light appearance drop down?
     
  6. Kyriakos80

    Kyriakos80

    Joined:
    Sep 30, 2017
    Posts:
    49
    In your light settings under emission, it's just above the light colour.
     
  7. Munkey

    Munkey

    Joined:
    Oct 26, 2013
    Posts:
    21
    Ah yes, it is there in the 3D URP project, it can be seen in the screen shot above. But you can also see that the drop down is not available in the project on the left.

    Really mainly interested in how to turn on Lights Use Linear Intensity and Lights Use Color Temperature without having to start a brand new project.
     
  8. Munkey

    Munkey

    Joined:
    Oct 26, 2013
    Posts:
    21
    Could really need some insight from anyone knowledgeable about these settings, please
     
  9. Kyriakos80

    Kyriakos80

    Joined:
    Sep 30, 2017
    Posts:
    49
    It needs to be enabled by script apparently as there's no UI toggle for it.

    So try...
    GraphicsSettings.lightsUseLinearIntensity = true;
    GraphicsSettings.lightsUseColorTemperature = true;

    Have in mind that it could still be a little different as it's a different renderer but give it a shot.
     
  10. Andre-Odendaal

    Andre-Odendaal

    Joined:
    Jul 4, 2012
    Posts:
    3
    Go to Project Setting > Player > Other Settings > Rendering and change Color Space from Gamma to Linear