It’s the time of the year to do another Blinking Lights setup. I made this one for an online client and I will explain how its done.
This method of blinking works on the luminosity and glow channels of textures.
So lets start with 3 identical textures.
Drag them into the xpresso editor like this. And open the Enable Glow and Enable Luminosity ports.
Now add a user-data slider on the xpresso tag, call it SPEED, set it to output “reals” from 1 to 100 (not 0). This user-data will set the speed of the blinking in frames per light. Drag the xpresso tag into the xpresso editor and open de “SPEED” user data-port.
OK? Lets start with the xpresso thing that does the work.
We need a Time node set to Frame. Then a Math node set to divide. Connect the Time(frame) and the Speed(user data) to the divide.
Then add a Math node set to Modulo with a value of 3 (the number of lights) and set it to output in INTEGERS (This is crucial).
Then add 3 compare nodes set to == , the first has a value of 0, the second of 1 and the third of 2.
(side note: if you want more than 3 lights set the modulo to the value of the number of lights, make more textures and more compare nodes)
Now connect the output of the 3 compare nodes to the Enable Glow/Luminosity of the texture nodes.
That is it, make as many instances of the object containing the texture as you want.