Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. 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

Unity 2D Lights Streamline - Tell us your thoughts!

Discussion in '2D' started by rustum, Sep 24, 2020.

  1. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    122
    As part of the ongoing design work to improve workflows and performance in 2D Rendering we are planning to streamline the 2D Lights.

    We plan to:
    • Replace the Parametric Light and with preconfigured Freeform Lights shapes for: Triangle, Square, Hexagon and Circle.
    • Remove the Falloff Offset parameter as this is vestigial functionality from the development of the lights.
    • Remove the Sprite Cookie from the Point Light 2D
    We want your feedback to help guide this refinement process:

    Parametric Light 2D
    1. Are you using the Parametric Light 2D component?
    2. If so, how are you using it? What problem are you solving using Parametric Light 2D?
    3. If we removed the Parametric Light 2D, how would this impact your productions?
    4. If we provided preconfigured Freeform Lights for commonly used shapes such as Triangle, Square, Hexagon and Circle, would that minimise that impact?
    5. What other preconfigured Freeform Lights shapes would you probably find useful?
    Falloff Offset parameter
    1. Are you using the Falloff Offset parameter on any of the 2D lights?
    2. If so, how are you using it? What problem are you solving using the Falloff Offset parameter?
    3. If we removed the Falloff Offset parameter, how would this impact your productions?
    Sprite Cookie on Point Light 2D
    1. Are you using the Sprite Cookie from the Point Light 2D, parameter on any of the 2D lights?
    2. If so, how are you using it? What problem are you solving using the Sprite Cookie from the Point Light 2D?
    3. If we removed the Sprite Cookie from the Point Light 2D, how would this impact your productions?
    If you would rather answer these questions in private, please follow this link to answer a short survey.
    https://forms.gle/YtKapQ5tAGzfCV5k6

    We're looking forward to hearing from all of you!
     
    GliderGuy likes this.
  2. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    675
    Parametric Light 2D
    1. Are you using the Parametric Light 2D component? No, using Sprite Light nearly exclusively.
    2. If so, how are you using it? What problem are you solving using Parametric Light 2D? N/A.
    3. If we removed the Parametric Light 2D, how would this impact your productions? None.
    4. If we provided preconfigured Freeform Lights for commonly used shapes such as Triangle, Square, Hexagon and Circle, would that minimise that impact? N/A.
    5. What other preconfigured Freeform Lights shapes would you probably find useful? N/A.
    Falloff Offset parameter
    1. Are you using the Falloff Offset parameter on any of the 2D lights? No.
    2. If so, how are you using it? What problem are you solving using the Falloff Offset parameter? N/A.
    3. If we removed the Falloff Offset parameter, how would this impact your productions? I would hold candlelight vigil but move on quickly.
    Sprite Cookie on Point Light 2D
    1. Are you using the Sprite Cookie from the Point Light 2D, parameter on any of the 2D lights? No, it seemed redundant with Sprite light, so just used Sprite light.
    2. If so, how are you using it? What problem are you solving using the Sprite Cookie from the Point Light 2D? N/A.
    3. If we removed the Sprite Cookie from the Point Light 2D, how would this impact your productions? None.
     
    rustum and xiangtingsu like this.
  3. AzureMasters

    AzureMasters

    Joined:
    Dec 2, 2016
    Posts:
    3
    Parametric Light 2D
    1. Are you using the Parametric Light 2D component? No.
    2. If so, how are you using it? What problem are you solving using Parametric Light 2D? N/A.
    3. If we removed the Parametric Light 2D, how would this impact your productions? At the moment it won't impact.
    4. If we provided preconfigured Freeform Lights for commonly used shapes such as Triangle, Square, Hexagon and Circle, would that minimise that impact? I think it would.
    5. What other preconfigured Freeform Lights shapes would you probably find useful? N/A.
    Falloff Offset parameter
    1. Are you using the Falloff Offset parameter on any of the 2D lights? Yes.
    2. If so, how are you using it? What problem are you solving using the Falloff Offset parameter? I'm using it to create a flickering effect.
    3. If we removed the Falloff Offset parameter, how would this impact your productions? I would try to find an alternative.
    Sprite Cookie on Point Light 2D
    1. Are you using the Sprite Cookie from the Point Light 2D, parameter on any of the 2D lights? No.
    2. If so, how are you using it? What problem are you solving using the Sprite Cookie from the Point Light 2D? N/A.
    3. If we removed the Sprite Cookie from the Point Light 2D, how would this impact your productions? None.
     
    rustum and xiangtingsu like this.
  4. Starsmiao

    Starsmiao

    Joined:
    Aug 14, 2019
    Posts:
    9
    Parametric Light 2D
    1. Are you using the Parametric Light 2D component? No.
    2. If so, how are you using it? What problem are you solving using Parametric Light 2D? N/A.
    3. If we removed the Parametric Light 2D, how would this impact your productions? N/A.
    4. If we provided preconfigured Freeform Lights for commonly used shapes such as Triangle, Square, Hexagon and Circle, would that minimise that impact? Yes.
    5. What other preconfigured Freeform Lights shapes would you probably find useful? N/A.
    Falloff Offset parameter
    1. Are you using the Falloff Offset parameter on any of the 2D lights? NO.
    2. If so, how are you using it? What problem are you solving using the Falloff Offset parameter? N/A.
    3. If we removed the Falloff Offset parameter, how would this impact your productions? N/A.
    Sprite Cookie on Point Light 2D
    1. Are you using the Sprite Cookie from the Point Light 2D, parameter on any of the 2D lights? Yes.
    2. If so, how are you using it? What problem are you solving using the Sprite Cookie from the Point Light 2D? Using it like a projector.
    3. If we removed the Sprite Cookie from the Point Light 2D, how would this impact your productions? Can‘t easily make a complicated shape of light.
     
    rustum and xiangtingsu like this.
  5. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    122
    Hi @Starsmiao! Thanks for the feedback. Could I get a visual of what this looks like? It might be possible to do it with other features.
     
  6. Starsmiao

    Starsmiao

    Joined:
    Aug 14, 2019
    Posts:
    9
    Yes,some time I would use Sprite Light2D for a big shape like a big paper cut. I use to make a fire spark with Point Light2D and cookie because I can control the angle and radius. I would like to remove cookie and get better performance.
     
  7. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    122
    Thanks for the additional info. It would very helpful to see how controlling the angle and radius of the Point Light helps with a fire spark. Would it be possible to share an image of this?
    I'd also like to understand why you want to remove the cookie for the fire spark. How would you make it look like fire without a cookie?
    Sprite Light 2D certainly sounds like the right kind of light for what you are describing.
     
  8. Saeglopur1992

    Saeglopur1992

    Joined:
    Jul 11, 2020
    Posts:
    1
    I am getting a black screen in my WebGL build after implementing 2D lights. Help.
     
  9. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    467
    The 2D team need to figure out where 2D features live. I missed this post due to the fact that I don't check the 2D forums since 2D lighting is an experimental feature and thus I figured would be asked in the 2D preview forums.
    Parametric Light2D
    1. Are you using the Parametric Light 2D component? No, we use freeform lights when we need a shape.
    2. If so, how are you using it? What problem are you solving using Parametric Light 2D? N/A
    3. If we removed the Parametric Light 2D, how would this impact your productions? N/A
    4. If we provided preconfigured Freeform Lights for commonly used shapes such as Triangle, Square, Hexagon and Circle, would that minimise that impact? N/A
    5. What other preconfigured Freeform Lights shapes would you probably find useful? We feel freeform lights supersede all behaviors of the parametric light and parametric can be removed.
    Falloff Offset parameter
    1. Are you using the Falloff Offset parameter on any of the 2D lights? Yes!
    2. If so, how are you using it? What problem are you solving using the Falloff Offset parameter? We primarily are using it as a way to control light direction of freeform lights. This can represent of day light shifting of the 2D light. So that as the time moves during the day the lights will shift their offset to simulate light shafts at specific angles.
    3. If we removed the Falloff Offset parameter, how would this impact your productions? We'd probably need to have unique shafts for every time of day. This would affect our workflows fairly considerably and increase the amount of time it would take to handle these types of lights.
    Sprite Cookie on Point Light 2D
    1. Are you using the Sprite Cookie from the Point Light 2D, parameter on any of the 2D lights? No
    2. If so, how are you using it? What problem are you solving using the Sprite Cookie from the Point Light 2D? Although we don't use it in our current project. I could see this being useful to reuse a cookie at particular angles of light. Sure you could make a custom sprite light for every use case to achieve a similar result, but at a cost of needing to have custom light textures/sprites in memory. I feel you should keep the point light cookie around unless it has a perf impact.
    3. If we removed the Sprite Cookie from the Point Light 2D, how would this impact your productions? N/A
     
    xiangtingsu and GliderGuy like this.
  10. ThundThund

    ThundThund

    Joined:
    Feb 7, 2017
    Posts:
    107
    Falloff Offset parameter
    This is how I'm using the Falloff Offset with the Freeform lights to simulate a fluorescent lamp. It helps to control the end of the light falloff and soften the borders of the shape:



    If you remove it without any alternative, I would have to redo all my lights.
    I've neither used Parametric lights nor Sprite Cookies yet.
     
    nb109, GliderGuy and xiangtingsu like this.
  11. kdrago

    kdrago

    Joined:
    Oct 27, 2018
    Posts:
    19
    Parametric Light 2D
    1. Are you using the Parametric Light 2D component? No
    2. If so, how are you using it? What problem are you solving using Parametric Light 2D? N/A
    3. If we removed the Parametric Light 2D, how would this impact your productions? N/A
    4. If we provided preconfigured Freeform Lights for commonly used shapes such as Triangle, Square, Hexagon and Circle, would that minimise that impact? N/A
    5. What other preconfigured Freeform Lights shapes would you probably find useful? N/A
    Falloff Offset parameter
    1. Are you using the Falloff Offset parameter on any of the 2D lights? Yes
    2. If so, how are you using it? What problem are you solving using the Falloff Offset parameter? Preventing hard edges between lights, which important.
    3. If we removed the Falloff Offset parameter, how would this impact your productions? Yes, it would have a significant impact on the lighting since it is used extensively, unless there is another manner of achieving the same effect. In any event, it is likely to require a lot of work,
    Sprite Cookie on Point Light 2D
    1. Are you using the Sprite Cookie from the Point Light 2D, parameter on any of the 2D lights? yes.
    2. If so, how are you using it? What problem are you solving using the Sprite Cookie from the Point Light 2D? Cookies being used to create shadows that are important for the look of the game.
    3. If we removed the Sprite Cookie from the Point Light 2D, how would this impact your productions? Yes, unless a viable alternative is provided.
     
    xiangtingsu likes this.
  12. xiangtingsu

    xiangtingsu

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    52
    Thank you all in helping us to understand how you guys have been using the 2D Lights, in particular, the Falloff Offset parameter. We are in the midst of jamming alternative ways to help achieve those mentioned outcomes.:)

    We thought we would also mention that the soft edges of the lights could be controlled via the Falloff and Falloff Intensity parameters which you guys have demonstrated and both these parameters are here to stay.

    @Ferazel, yours is an interesting use case which we would really like to understand it correctly.
    Could you help to elaborate a little on how you use the Falloff Set parameter to achieve the daylight shifting effect?

    It would be super helpful if you could provide any screenshot(s) to help us accurately understand your desired process or even the outcome. Thank you!
     
    GliderGuy likes this.
  13. xiangtingsu

    xiangtingsu

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    52
    Welcome to the forum @Saeglopur1992! Thank you for joining the community!

    Perhaps if you were to start a separate new thread and provide more details on your issue, it would be easier to understand and to assist you. Like what were you tweaking before it stopped working.
     
  14. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    467
    Basically, it's a poor man's light shaft. For tall windows that bleed light in the mornings, vs sunset we can use the same light but animate the offset to fake it like a window that is facing north an example could be.
    Morning/Noon/Sunset
    upload_2021-1-28_11-49-55.png upload_2021-1-28_11-50-35.png upload_2021-1-28_11-51-3.png
     
    hawken, honey-l and JoNax97 like this.
  15. honey-l

    honey-l

    Joined:
    Jan 24, 2015
    Posts:
    2
    Not sure if this is the right place, but have you considered introducing 2D directional light and something like shadow falloff/cookie?

    Let me explain the question/use case:

    Right now, all the lights basically behave like point lights when it comes to normal mapping and shadows. Even freeform light shines from pivot spot, so that the shadow has always the direction from pivot of the light to shadow caster (though extended further from shadowcaster), wherever it might be. That doesn't feel very well when it comes to natural light sources which are supposed to be so far away that the shadow casting angle is basically constant, just like 3D directional light works. The same goes for the normals, which are lit from the direction of the pivot spot of the light. So currently there's no way to apply "daylight" on your normal mapped sprites, at least without excessive use of unnecessary amount of lights :)

    The shadow falloff/cookie is meant especially for top-down projects where you can use them as sort of drop shadows extended from shadowcaster, but not for the whole length of the light, but just for preset amount. Or is there any dedicated drop shadow system for top-down projects in development?

    Thanks in advance!
     
    MrPaparoz likes this.
  16. MrPaparoz

    MrPaparoz

    Joined:
    Apr 14, 2018
    Posts:
    153
    This is a must-have feature for me.
     
    honey-l likes this.
  17. ThundThund

    ThundThund

    Joined:
    Feb 7, 2017
    Posts:
    107
    It has been requested here too.

    https://forum.unity.com/threads/current-2d-renderers-missing-core-features.1023772
     
    honey-l likes this.
  18. honey-l

    honey-l

    Joined:
    Jan 24, 2015
    Posts:
    2
unityunity