Announcement

Collapse
No announcement yet.

Measuring light intensity in apoint

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

    Measuring light intensity in apoint

    Hello!
    I'd like to be able to measure the current light intensity in somepoint of the map. For example, I want to know how dark is it around the character right now. Is there a way to do that with blueprints or with C++?

    #2
    There's no built-in photometric function but you can sort of fake your own.

    Maybe something like this - when you want to sample light intensity, do a sphere trace at the location and search for lights. For each one you find, do a line trace from the location to the light. If the light is not occluded, get the light brightness and distance from the point. You're going to have to make up your own math for this, but this information can help you figure out how intense light SHOULD be under normal conditions.
    Procedural, modular, on-the-fly animation - iTween For UE4
    - Actors - Components - UMG - Ease In - Ease Out - Path-constrained Animation - $0

    Runtime Datatable
    -All the fun of DataTables dynamically loaded from text or Google Sheets while your game is running!

    Comment


      #3
      Thanksfor the reply, Jared, but it's not that easy. You can have light-emissinve materials and particle systems, reflections from mirrors and white walls, all these things do affect the light intensity at the point.
      Probably I can put a small white sphere in the pointand get its surface color? I tried to find a way to do that, still no luck.
      Last edited by Flidster; 10-01-2016, 12:55 PM.

      Comment

      Working...
      X