Search Unity

Question URP Lighting: Do lights fade over a distance? Is There light LOD?

Discussion in 'General Graphics' started by ClearRoseOfWar, Nov 28, 2022.

  1. ClearRoseOfWar

    ClearRoseOfWar

    Joined:
    Sep 6, 2015
    Posts:
    89
    Hello,

    I'm making a large overworld with URP and I tried to do some research before writing this, (I'm surprised that this question is hard to find an answer to), but:


    A. Do lights fade with distance?
    - Naturally, the further away I get from the light the less visible it becomes, but when the light reaches a certain point, does it fade out? or is it always lit? I assume that the engine is rendering it regardless of distance? I'm looking for the more or less technical side of this.

    B. Is there an LOD for lights?
    - As you may know, the LOD system enables and disables renderers. This means that objects with LOD's can't have lights parented to their specific LOD stage because all stages will display the light..
    - That said, I found this: https://github.com/JulienHeijmans/E.../Scripts/Utility/Editor/LODExtendedUtility.cs which is an LOD extension, but the methods don't seem to run efficiently enough.. they seem to create a lag when I enable and disable the lights using these extensions in an if statement.. (Unless its just the enabling and disabling that does causes the lag)..
    TLDR For B: What's the best way to make an LOD system for lights? Each light could have different quality settings and so on... or is that something I need to create myself (if so no problem, but maybe there is something better out there already?)

    Thank you for reading
     
  2. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,749
    Search on the Asset Store, i remember seeing an asset that LODs lights.
     
  3. ClearRoseOfWar

    ClearRoseOfWar

    Joined:
    Sep 6, 2015
    Posts:
    89
    I ended up making my own solution, but for whatever reason the lights only update ingame perfectly, otherwise in editor mode, it only updates the lights range if I have gizmos toggled on. Is there a way around this?

    Any thoughts why this might be? [ExecuteInEditorMode] is assigned.
     
    Last edited: Nov 30, 2022