Prompt First, Examples second, and Usecase Last
This is a specific question for Roblox Engineers; as transparency in the graphics calculations for this may prove useful to a niche set of developers (which is why its a question as opposed to a Feature Request for an API addition)
In This post right here (Video Below as well)
We have a case where a developer wants to know if a user is being hit by a light-source. If you look to the sides of the light-source in the thumbnail you might notice the light tapers off into darkness according to the Range and Brightness properties of the given light source.
Generally speaking, the closest terms I can think of to match this are found in the image below:
If a developer wanted to calculate what brightness levels of an object they would have to sort of âtinkerâ around with home-brewed math.
Can we get an answer as to how we should be properly calculating the Color/Brightness values of a light sourceâs Umbra/Penumbra?
Use cases:
- Adjusting PostFX properties according to the lighting situation the Players-Camera finds itself in
- NPCâs can have a better handle on visibility of Players/Objects in a unlit scene
- Color Correction for UI can take place according to a players Camera view in a given scene
EDIT: I used this diagram and these terms to separate the ideas for the different zones of Brightness/color
EDIT 2: SurfaceLights and SpotLights were my main concern here
EDIT 3: For this post, I suppose Umbra refers to the âbrightest thresholdâ area of a light source