Search Unity

URP dynamic lighting: odd culling and object illumination

Discussion in 'Universal Render Pipeline' started by GetMeSomeGames, Dec 17, 2020.

  1. GetMeSomeGames

    GetMeSomeGames

    Joined:
    Dec 17, 2020
    Posts:
    2
    I have been tinkering with procedural map generation using the URP and am stuck when it comes to lighting. Since the procedurally generated meshes are small, I can not make use of baked light-maps and have to use dynamic lights.

    In my test setup (https://imgur.com/a/Tl6A1sp), I just made a square 45x45 unit room, in which each 15x15 block has its own mesh object. I then put roughly 20 point lights (render mode: important, range: 9) and positioned them to make sure that no more than 8 of these lights 'hit' the same mesh (which should work according to the URP additional light limit)


    However, when walking through the room, I see lights appear and disappear constantly. Some only disappear when I look at them directly. Not only that, but from a distance (~30 units) lights will often only 'hit' some of the objects close to them, but not others, even when these objects are closer to the camera than the ones that are do get 'hit'. This can all be seen in the test setup in the link above.

    Does anyone know how to fix this, or at what other settings I could still look at? Maybe there is another approach to lighting such a procedural scene?
     
  2. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    400
    I suspect that light influence check not as sphere-polygon, but as boundbox-boundbox.
     
  3. GetMeSomeGames

    GetMeSomeGames

    Joined:
    Dec 17, 2020
    Posts:
    2
    What do you mean exactly? Where can I find this option?