Download

Implementing emissive LEDs

Hi guys,

I have a model with a number of LEDs that are lit depending on the external situation (alarm, reload etc.).
mot_leds_issue.jpg
The is a variable designating which sector of a LEDs circle is lit. Say, for the red circle, 0 means all LEDs are off, 3 - the half and 7 - the full circle is lit.
The first thing that comes to my mind is creating a separate channel for each state for the emissive component of the material, but it would be a waste of memory (24 channels total). That is the only idea that comes to my new-to-UE4 mind.
Any ideas?

I would use a gradient texture for the circle where each section of LEDs is a solid grey value and each section steps up a few shades from black to white. Then use Floor, Ceil, Clamp and/or whatever works to clamp the gradient so that you get a black and white mask to use with a lerp.
Perhaps a Multiply node of 8 -> Add node w/ scalar parameter controlled by blueprint -> Clamp node -> Lerp node. (I really don’t know if that would work cause I’m not in the editor atm, and I suck at math.

Brilliant! Thank you a lot for this bright idea!