Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

HDRP - lights only working in sample scene

Discussion in 'General Graphics' started by Nailer, Apr 28, 2019.

  1. Nailer

    Nailer

    Joined:
    Jan 29, 2014
    Posts:
    3
    Hi!

    I'm relatively new to Unity, and I'm having trouble with my scene lighting in HDRP.
    The HDRP project comes with a pre-built sample scene with in which all types of lights work just fine.

    When I created my own new scene, only one directional light would work. No point lights or spots would affect any of the scene.

    I first assumed this might have had something to do with the rendering settings and post processing settings. So I opened up a separate instance of unity, with a fresh HDRP project showing the sample scene. I went on to copy all rendering settings and parameters manually to see if anything would make lights work in my scene.
    (Is there an easier way to transfer settings? Can I just copy asset files in the scene catalog?)
    All to no avail.

    I created new projects using the old pipeline, and point lights would work immediately with no further setup.

    Any help or hints is greatly appreciated.
     
    racarate likes this.
  2. ankurrastogi

    ankurrastogi

    Joined:
    Dec 24, 2018
    Posts:
    7
    Ymmersive likes this.
  3. Nailer

    Nailer

    Joined:
    Jan 29, 2014
    Posts:
    3
    Thank you for your response! I'll check it out.


    EDIT: Hm. Yeah, I've read these articles before, but they don't hint to anything that might be causing my problems. I have a feeling it's supposed to work out of the box, but isn't.
     
    Last edited: Apr 30, 2019
  4. Takamba

    Takamba

    Joined:
    Jan 11, 2018
    Posts:
    25
    With the actual Unity Version 2019.1.0f2 this works just fine.

    Which version do you use?
     
    HAlisavakis likes this.
  5. ElliottMallard

    ElliottMallard

    Joined:
    Jul 2, 2015
    Posts:
    18
    I get this when creating a new scene by using File > New Scene. No lights or lightbaking will work as intended in that scene. HOWEVER if i right click in the project and create a new scene that way the scene behaves much more predictably.

    It's hard to know if this is a bug, or whether the File > New Scene contains preset settings which need to be tweaked in order for lighting to work as expected.

    Elliott
     
    racarate likes this.
  6. racarate

    racarate

    Joined:
    Jul 14, 2012
    Posts:
    62
    I'm also seeing point lights not working at all when I start with the sample scene. Area and spot lights don't work either -- only directional lights.

    Thanks for the File => New Scene workaround.
     
  7. ElliottMallard

    ElliottMallard

    Joined:
    Jul 2, 2015
    Posts:
    18
    No problem! My collegue actually found this. It seems like quite a serious bug - right? Hard to imagine we are the only ones experiencing this...
     
  8. Varesian

    Varesian

    Joined:
    Jul 19, 2012
    Posts:
    14
    I get the same issue. Lights only work in sample scene. When creating a new one using File => New Scene, no lights work: no point, directional, anything.
     
  9. Varesian

    Varesian

    Joined:
    Jul 19, 2012
    Posts:
    14
    I was able to get both directional and spot lights working. I'd set the directional light to 128,000 lux, or about as bright as the sun. It didn't work. When I set it to 100,000 lux it started working. When I set it back to 128,000 lux it still worked. For the spot light, I could see a faint highlight at 128,000. Setting the spotlights lux value literally to the brightness of 1000 suns, I could see it on a sphere about 1 meter away.
     
  10. Drumstig

    Drumstig

    Joined:
    Oct 28, 2017
    Posts:
    1
    i also required an insanely high lux value to get a slight highlight
    setting the exposure in default post-process to fixed seemed to fix it, still experimenting with other values
     
  11. jpleroux

    jpleroux

    Unity Technologies

    Joined:
    Jun 29, 2017
    Posts:
    5
    Working In physical value can be really hard to grasp at first.
    Light intensity can be describe in EV, to gain one EV, you need to double your light intensity.
    The Lighting setup that come with the sample scene do not have the physically correct lighting value.
    The directional is set to 500 lux giving you a exposure of EV5
    If you set your sun to 128 000 lux like you said, you will reach a EV of 13. That is physically correct
    For a punctual light source to outpower the sun you will need a very high number
    Let's take a point that is visible in the sample scene. It's value is 600 lumen. To keep it at the same ratio form EV5 to EV13 you need to double it's value 8 time
    That bring you from 600 lumen to 153 600 lumen
    If big number are hard to grasp, your punctual light can be set in EV. This way you can manage the intensity in a linear fashion instead of a exponential one.
     
  12. aneeshsharma15

    aneeshsharma15

    Joined:
    Jul 23, 2017
    Posts:
    3
    I have tried both ways by creating a scene from project manager as well as from the `File>New Scene`. But nothing seems to work. Emissive materials don't work. Other types of lights neither. Even lighmapping doesn't work.Nothing except directional lights work. Has anyone found any solutions?

    I am using Unity 2019.1
     
    elZach and chrysu76 like this.
  13. GopaGames

    GopaGames

    Joined:
    Dec 16, 2016
    Posts:
    1
    2019.3.0f5 i get the same problem, no lights are working except directional, but everything works fine on samplescene with examples.
     
  14. SinDeSiecle

    SinDeSiecle

    Joined:
    Sep 30, 2017
    Posts:
    66
    same problem here. only directional light is illuminating objects. point light does not, no matter how high the intensity value. In addition, I tried to enable and disable the light layers a few times to see if anything changes. Now, directional light is also broken. It illuminates the scene by gradually increasing the intensity over time at the start, and ends up with a visual with a very high gamma (as it feels). Now, my entire project's lighting is broken. I removed HDRP and now am re-installing it. But, other than that, I don't have any idea about what to do.

    UPDATE: re-installing HDRP did not work.

    UPDATE: I found a previous version of the project. Unzipped it. Works great. Now, light layers are already enabled. Selected my only directional light. I clicked on details button while it was showing light layers drop down. Then, clicked that button again to have the drop down visible. lighting is broken again.
     
    Last edited: Jun 20, 2020
  15. SinDeSiecle

    SinDeSiecle

    Joined:
    Sep 30, 2017
    Posts:
    66
    I accidentally found out that if your cam is within a defined value of distance to the origin, the point light work as intended. If you go out that limit, the objects turn completely in black, although the point light intensity and range settings are ok. The effect can be seen in both main camera in play mode and editor camera. Also, another weird effect: when you are within the visible area, as go further, the light of the far objects dims out gradually. None of the objects are moving except the camera, but the light intensity on the objects changes as you fly far away from the objects. For example, put a point light at the origin. Put a sphere at 0,0,1000 and another at 0,0,-10000. Set your light range to 9999999, intensity to a really high number. Set your cam's far clipping plane to 9999999. Write a standard motion script for camera. Both in editor and in game mode, try flying away from the origin by looking at the objects. You will experience the effects described above.

    This setup was for a space game, and, unfortunately, I will not be able to use that point light for the scene.

    NOTE: Applying a floating origin script does not change the outcome.
     
  16. AscendanceGames

    AscendanceGames

    Joined:
    Jul 25, 2016
    Posts:
    8
    Hey everyone, there is only one slightly annoying fix I have had to do. There is nothing that will make the imported lights work that i have found. The only fix I have seen is to simply recreate the light. A simple copy paste and delete the old light and you will likely be up and running. A little work yes, but in the big scheme of things your lights should now render.
     
  17. SinDeSiecle

    SinDeSiecle

    Joined:
    Sep 30, 2017
    Posts:
    66
    I reported the bug with a sample project but I can not share the project here because of the file size limit. Here is how to reproduce it in Unity 2020.2.0b2. It is the same in Unity 2019.4 and upper release versions.

    The point light is at 0,0,0. The first sphere is at 0,0,10000. point light has an intensity of 1200000 lux and range of 999999. Set camera position close to the sphere. Now, move the camera (or editor camera by AWSD keys) in positive Z direction (simply, move around towards the dark side of the sphere). As you move' you will see the illumination of the spheres will decrease against physics laws.

    This is the final bug. Another bug is seen when preparing the scene: Open new hdrp project. Delete all but camera and the 2 volume settings game objects. Place a point light at 0,0,0. Give it an intensity of 120000 lux and a range of 9999999. Put a sphere at 0,0,10000. Set its scale to 1000,1000,1000. Observe it does not illuminate. Now, select sky and fog volume game object. Disable fog component in the inspector. Observe it starts working. But, then, the bug in the previous paragraph does exist. Additionally, duplicate the sphere and send it really far away, like 10000,0,50000. Observe that second sphere is not illuminated.
     
  18. Lionious

    Lionious

    Joined:
    Apr 19, 2013
    Posts:
    44
    this bug is in 2020.2.b4 hdrp too , the lights not working and only work in sample scene
     
  19. Ramezov

    Ramezov

    Joined:
    May 2, 2017
    Posts:
    16
    I have same bug, lights not working in 2020.1.6f1 HDRP project.
     
  20. Piko-Island-Studios

    Piko-Island-Studios

    Joined:
    Nov 30, 2013
    Posts:
    6
    LOL

    Same issue, no new lights work in projects. Using 2019.4.13f hdrp.
     
  21. markasuter

    markasuter

    Joined:
    May 20, 2019
    Posts:
    12
    My Solution: Go to the "SampleScene" and copy the object in the hierarchy called "Post Process Volume", go to my problem scene and paste. Now the directional light appears and reacts as I expect!
    Before & After
    before.PNG after.PNG
     
  22. Havok_ZA

    Havok_ZA

    Joined:
    Jul 27, 2016
    Posts:
    56
    Not sure if people are still experiencing this but, set your light units to EV 100. If you still don't se much then crank it all the way up.
     
  23. donnotron666

    donnotron666

    Joined:
    Dec 3, 2015
    Posts:
    1
    oh my god, just finding this thread describing the reverse of my problem and I'm kind of shocked that a serious lighting bug still exists in hdrp after this long without a fix. My problem is similar, but directional lights don't work at all and point lights do. Unity 2020.2.1f1, HDRP 10.2.2.
     
  24. burtles

    burtles

    Joined:
    Dec 23, 2016
    Posts:
    7
    HDRP 2020.3.1f1 and no lights work in a brand new scene except the directional light it starts with. No values create any light at all.
     
  25. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,062
    Finding proper light intensity in HDRP is very very very hard task ...
    Everything works on physically correct values in the real life camera system

    So you must find balanced intensity values between :
    - Sky light intensity (volume)
    - Directional light intensity (scene)
    - Spot and point light intensity(scene)
    - Exposure effect intensity(volume)

    https://forum.unity.com/threads/light-exposure-adjusting-automatically-solved.1070444

    It's not an easy task even you are an expert in lighting ...
     
unityunity