Search Unity

2D point lights create a thin dark line [BUG]

Discussion in 'Universal Render Pipeline' started by JUSTCAMH, Aug 29, 2019.

  1. JUSTCAMH

    JUSTCAMH

    Joined:
    Dec 8, 2018
    Posts:
    18
    2D Point lights using LWRP 2019.2 have a very small line where light is not projected, pointing straight down (When rotation is 0). This is due to the inner and outer angle of the light. In my test case, both of these angles have been set to 360, however changing these values increases the size of the black line. This black line is small to the point of almost being unnoticable and you need to zoom right in to see the line, however it can occassionally be seen in the game view.

    I know that this issue is due to the 2D lights, and I have been able to reproduce this problem in an empty project.

    How can I remove this small black line? The problem seems to only be for point lights, so is there another light with the same function and flexibility of a point light that will do the same thing?

    The first image shows the line in the editor, in a otherwise blank project, and the right screenshot shows a game view of the light, with a few darkened pixels not affected by the light. If I turned up the quality even further, then this would be a very thin line. If global lighting is used instead of point lighting, this problem goes away.
    Darkened Line Editor.PNG Light Bug Game View.PNG
     
    DavidZobrist likes this.
  2. Mickplouffe

    Mickplouffe

    Joined:
    Aug 30, 2019
    Posts:
    3
    Hello! I do have a pretty similar problem as you.

    The line is not visible all the time. All depend the position of the camera from the 2D light.

    Mind if I add these:



    Mickplouffe, a newcomer to Game Dev with too much in head and to less done, because of OCD :p
     
    DavidZobrist likes this.
  3. JUSTCAMH

    JUSTCAMH

    Joined:
    Dec 8, 2018
    Posts:
    18
    This is there at all times in my game and scene view, you just need to zoom in or increase the resolution far enough to see it.
     
  4. Mickplouffe

    Mickplouffe

    Joined:
    Aug 30, 2019
    Posts:
    3
    Yes, but if the Camera mouves and zoom the line will be present even when builded.
     
  5. Sharpin

    Sharpin

    Joined:
    May 26, 2019
    Posts:
    10
    Have same problem :/ Have anyone a solution or some tricky way to avoid it?
     
  6. schwollie

    schwollie

    Joined:
    Sep 1, 2018
    Posts:
    1
    Well you could use a Parametric light and set its side count to a high number.
     
    DJD1892 likes this.
  7. DavidZobrist

    DavidZobrist

    Joined:
    Sep 3, 2017
    Posts:
    234
    Yes is there an issue report for this yet?
     
  8. conziztent

    conziztent

    Joined:
    Aug 13, 2019
    Posts:
    4
    Same here.

    I found that you can configure the Parametric light to work almost the same as a Point light. Set the "Sides" to 10+ depending on your need, then the "Radius" and "Falloff" fields will be equivalent to the "Inner Radius" and "Outer Radius" of the Point light.
     
  9. yuanxing_cai

    yuanxing_cai

    Unity Technologies

    Joined:
    Sep 26, 2014
    Posts:
    335
    This bug has been fixed. The fix should be available in 2019.3.
     
    DavidZobrist, JUSTCAMH and shoonkin like this.
  10. ForTimeBeing

    ForTimeBeing

    Joined:
    Dec 6, 2019
    Posts:
    1
    I feel like this is the same bug I am still getting currently I am using Unity 2019.2.15f1 as well. It appears at the bottom of my sprite and even adding more point lights do not fix it so I know it isn't a shadow. The object the line is attached to spins in a 360 direction which causes the line to spin as well exactly from the bottom. It did not appear until I swapped to the lightweight render pipeline. I changed all the rendering properties in the RPL asset and it did not solve the problem. The more you zoom in the more you see the line/the bigger it is. But it is ALWAYS visible. This is what it looks like: https://gyazo.com/520d0e73b07f85ab12c49c58df388841

    Edit: I did not see it was fixed for unity 2019.3, I just saw the post was in sep and figured it was fixed already.
     
    Last edited: Dec 6, 2019
  11. Mat_os

    Mat_os

    Joined:
    May 11, 2018
    Posts:
    4
    You can fix this by using "Parametric" light with 48 Sides.
    It is work like "Point" light, but without this strange bug.
     
  12. bookmak123

    bookmak123

    Joined:
    Sep 16, 2015
    Posts:
    2
    i am using unity 2023 and i have this bug
     
  13. zippomode

    zippomode

    Joined:
    Mar 10, 2021
    Posts:
    12
    same, blinking.
    2023.
    how to fix -- recreate light