Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Lens Flares in URP are not affected by light intensity

Discussion in '2021.2 Beta' started by michalpiatek, Oct 4, 2021.

  1. michalpiatek

    michalpiatek

    Joined:
    Feb 26, 2021
    Posts:
    81
    New URP lens flare system seems to be quite cool but I don't understand why light flare intensity is not linked to light emission strength? I can make a script to sync both values but this surely should be a built-in option. I am not quite sure this is a bug, it seems more like an oversight which is why I created the thread. If this is a bug let me know and I'll make a new ticket.
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    Hi @michalpiatek_uw,

    I reached out to the devs and they confirmed that this is not a bug but more of a feature request. While the team is aware of the thread, it would also be very helpful if you could submit a brief request for this on their roadmap.
     
  3. michalpiatek

    michalpiatek

    Joined:
    Feb 26, 2021
    Posts:
    81
    Thanks for checking this. I'll fill out a feature request right away.
     
    LeonhardP likes this.
  4. Sean_R_P

    Sean_R_P

    Unity Technologies

    Joined:
    Mar 10, 2020
    Posts:
    4
    Hey @michalpiatek_uw,
    We have strong user signal for a feature like this.
    I'd love some more info on how you are using the feature in your workflow to help make sure we have the best solution in place.
    Or if you have any suggestions or comments about how it should be implemented I'd love to hear that also.
     
    LeonhardP likes this.
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I like the fact these can be used without linking with lights, in fact we don't use Unity's lights in these cases at all. There's a lot of stylish reasons to use these flares.

    I don't object to the features. You could have a couple of helper scripts in an optional samples package if you wanted to keep things trim yet be able to change things often.
     
  6. michalpiatek

    michalpiatek

    Joined:
    Feb 26, 2021
    Posts:
    81
    I don't see how adding this feature would prevent anyone from using Lens Flares without an attached light.

    The way I see it is, if you have a Light component and a Lens Flare component on the same game object you can enable an option, let's call it "Light Intensity Affects Flare Intensity".

    If it's enabled, Light Intensity of 1 would translate to 100% Lens Flare brightness.
    Light Intensity of 0.5 would translate to 50% Lens Flare brightness.
    Light Intensity of 2 would translate to 200% Lens Flare brightness.
    And so on.

    Additional parameter, called "Light to Flare brightness ratio" would remap influence the Light Intensity has on Flare Intensity

    Default Ratio of 1 would mean 1:1 (as explained above).
    Ratio of 2 would mean Light Intensity of 1 translates to 200% Lens Flare brightness
    Ratio of 0.5 wold mean Light Intensity of 1 translates to 50% Lens Flare brightness

    There might be a better remapping method but without seeing it in action I am not sure if this wouldn't be enough.

    While a helper script can easily achieve what I requested here I still strongly advise for this feature to be implemented for two reasons:
    • Artists often expect this type of workflow to be already implemented, it's a good quality of life feature to have
    • This would enable using Lens Flares on Shuriken particle Lights so that we could safely fade out flares by controlling Light intensity. (Just to clarify, as of today Lens Flares don't work at all with Shuriken Particle System but when this will be fixed the immediate problem will be that there won't be a way to control Flare intensity and with the API as it is today there would be no way to create additional helper script to achieve that. https://forum.unity.com/threads/urp-flares-dont-work-with-shuriken-light-module.1178278/ )
     
    hippocoder likes this.
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Soothe thy wacom gentle artist. Not saying it would not work without a light, only that even artists will want it to use it in stylised fashion.
     
  8. michalpiatek

    michalpiatek

    Joined:
    Feb 26, 2021
    Posts:
    81
    And I 100% agree with you. This is why I think binding light intensity to lens flare intensity should be an optional feature. If someone wants to use it without a light/disconnected from the light they will be able to do so.