5
$\begingroup$

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.

enter image description here

$\endgroup$
4
  • 1
    $\begingroup$ I think with the gradient texure and some math you should be able to do it. Did you tried that? $\endgroup$
    – Carlo
    Commented Mar 6, 2021 at 19:33
  • $\begingroup$ Do you want your LEDs to light up one at a time, or do you want the fade? $\endgroup$
    – Robin Betts
    Commented Mar 6, 2021 at 21:54
  • 1
    $\begingroup$ 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 $\endgroup$ Commented Mar 7, 2021 at 0:12
  • $\begingroup$ didn't mean to offend anyone with capital letters, will only use small caps from now on. :) $\endgroup$
    – Rock
    Commented Mar 7, 2021 at 20:28

2 Answers 2

6
$\begingroup$

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

enter image description here

And that's the nodes: enter image description here

$\endgroup$
6
  • 1
    $\begingroup$ 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 :) $\endgroup$
    – Zubmariner
    Commented Mar 6, 2021 at 19:36
  • $\begingroup$ Thank you very much, this look perfect, will try it and let you know how it goes. $\endgroup$
    – Rock
    Commented Mar 6, 2021 at 19:54
  • $\begingroup$ 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? $\endgroup$
    – Rock
    Commented Mar 6, 2021 at 20:31
  • $\begingroup$ 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 $\endgroup$
    – Zubmariner
    Commented Mar 6, 2021 at 21:13
  • $\begingroup$ thank you once again, you are the man! $\endgroup$
    – Rock
    Commented Mar 6, 2021 at 21:18
6
$\begingroup$

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.

enter image description here

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .