I'm working on a knob with some LEDs around it. When the knob is all the way at 0-position only the top and bottom LEDs are on and when all the way to the right 100% all the LEDs will be on.

(the LEDs are just an image texture with some bump. With one node of a turned-off LED and one node of a LED material that is glowing.)

The way I'm planning on animating this effect is to have a Gradient node controlling the mix fac of a Mix node. My question is how do I get the gradient "butterfly pattern" of the mix fac?

• Pic 1, the knob at 0, top and bottom LEDs are on
• Pic 2, the knob at 50%
• Pic 3, the way the knob looks.

• I think with the gradient texure and some math you should be able to do it. Did you tried that? Commented Mar 6, 2021 at 19:33
• Do you want your LEDs to light up one at a time, or do you want the fade? Commented Mar 6, 2021 at 21:54
• Hello and welcome. Please don't write in all caps, it is the online equivalent of shouting, is harder to read and is considered rude Commented Mar 7, 2021 at 0:12
• didn't mean to offend anyone with capital letters, will only use small caps from now on. :)
– Rock
Commented Mar 7, 2021 at 20:28

Not sure if i understood the request correctly, but that's the result (don't know if I'm allowed to post gifs):

And that's the nodes:

• As you can see top two rows are almost identical except X and Y are multiplied by -1. Maybe there's a more beautiful way how to reach the symmetry, but I'm lazy :) Commented Mar 6, 2021 at 19:36
• Thank you very much, this look perfect, will try it and let you know how it goes.
– Rock
Commented Mar 6, 2021 at 19:54
• This node setup works beautifully but is there a way to get a sire gradient from black to white? right now each led light up, but with a larger gradient I think I could get a more feathered look where the surrounding led of the active led is also slightly affected by the light. which of the math nodes do I use to control that?
– Rock
Commented Mar 6, 2021 at 20:31
• Looks like you should change subtraction node to power: i.sstatic.net/XTRCZ.png And by the way, you can get rid of multiplication of X and Y by -1 with using vector absolute Commented Mar 6, 2021 at 21:13
• thank you once again, you are the man!
– Rock
Commented Mar 6, 2021 at 21:18

You can get a gradient in all quarters, from 0.75 at North and South, to 0.5 at East and West, by using the absolute of X and Y as the texture-space for a Gradient > Radial node. And you can map that to something more convenient using a Map Range node.

Here, the range is used to produce a basic mask, whose extent is driven by the Z rotation of another object. You could multiply the mask with whatever color-gradient you wanted to put in it.

• Could I be so lazy to request a "Download the blend"? Commented Mar 7, 2021 at 12:32
• @batFINGER .... Done. Commented Mar 7, 2021 at 17:01
• Wow that's clever! Thank you guys
– Rock
Commented Mar 7, 2021 at 17:37