Announcement

Collapse
No announcement yet.

Separate light function for different material properties?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Separate light function for different material properties?

    I'd like to apply separate light functions to the different components of a light (especially ambient/indirect versus direct/specular/metallic.)
    Is there some way of achieving this?
    I've read this: https://docs.unrealengine.com/latest...ightFunctions/
    It seems to indicate that all light emitted by the light is scaled linearly.
    If I could build a light function that had a separate map output for each material property, that'd be perfect. Anyone done this?

    #2
    So .... I'm alone in this?

    Comment


      #3
      could you give a use case?
      Never say Never, Because Never comes too soon. - ryan20fun

      Frames Per Second is NOT a proper performance metric, You should use frame time. You can read this or this as to why.
      (Profiling) Tools: RenderDoc (UE4 Plugin), NVIDIA nSight, AMD GPU PerfStudio, CodeXL
      Good articles/Series: A trip through the Graphics Pipeline 2011

      Comment


        #4
        One use case is simulated shadowing or occlusion using features other than built-in shadow blockers.
        I'd like the light's contribution to global illumination / ambient to be full, but contribution to diffuse/specular to be shaded.

        Comment


          #5
          Originally posted by jwatte View Post
          I'd like the light's contribution to global illumination / ambient to be full, but contribution to diffuse/specular to be shaded.
          I think that would break it away from the PBR setup that UE4 is going for.

          Originally posted by jwatte View Post
          One use case is simulated shadowing or occlusion using features other than built-in shadow blockers.
          Do you have an example?
          Never say Never, Because Never comes too soon. - ryan20fun

          Frames Per Second is NOT a proper performance metric, You should use frame time. You can read this or this as to why.
          (Profiling) Tools: RenderDoc (UE4 Plugin), NVIDIA nSight, AMD GPU PerfStudio, CodeXL
          Good articles/Series: A trip through the Graphics Pipeline 2011

          Comment


            #6
            Originally posted by jwatte View Post
            One use case is simulated shadowing or occlusion using features other than built-in shadow blockers.
            I'd like the light's contribution to global illumination / ambient to be full, but contribution to diffuse/specular to be shaded.
            I think light functions does not affect Lightmass calculations in anyway.

            Comment


              #7
              I think that would break it away from the PBR setup that UE4 is going for.
              I don't think UE4 is going exclusively for PBR. There are plenty of "stylized" games and examples.

              Do you have an example?
              For example: Dimming unseen scenery in "fog of war" views.

              Comment


                #8
                There is currently no supported way of doing this. Light functions are just applied as an additional shadow term for the light there is no distinction of different light functions for different elements. Would require coding. Not a likely feature to get scheduled by us.
                Ryan Brucks
                Principal Technical Artist, Epic Games

                Comment


                  #9
                  Thanks, Ryan!
                  Is that a "we wouldn't merge that" or a "patches welcome!" ? :-)

                  Comment


                    #10
                    Hard for me to say for sure, but generally pull requests that are very complicated and very niche-market are not approved. In my opinion this would fall under that category but I have been wrong before.
                    Ryan Brucks
                    Principal Technical Artist, Epic Games

                    Comment

                    Working...
                    X