How to make christmas lights blink

Hi. I have a material I’ve created for christmas lights. It uses the random setting to pick from one of 4 colors. I have that part working now I would like to be able to have the lights blink on and off but not all at the same time.

I need a little help with ideas to accomplish this.

Here is my material so far.


just as you use the ‘object::random’ as input for the colors, you can use some animated ‘input>>value’ node to drive the emission strength. (the modulo function of the math can be used as a repeater)

Thanks Secrop. I figured I could use the random and the modulo function but I was having trouble getting it to count the frames.

I tried to use the #frame driver in the math node as well as in the value node but it did not work.

So I ended up using the particle input node and the age value counts the frames since the animation starts.

I got it working at least. Thanks for your help. I will post an image of the node tree later. Perhaps someone can suggest a more elegant solution.

Here’s an example:

The material is to be used with particles (I think that’s what you’re using too).
I don’t know which kind of pattern you want to turn the lights on/off. Right now, the particles just blink in sequence, but the math can be changed to create different patterns.

The ‘Animate here’ node is just a Value node with keyframed values.

Yes I’m using a particle system to distribute the lights. I like your solution its lots less messy than mine.

I have a test render up here using the method I cam up with.


Thanks I will try your method in the future.

can you elaborate and explain how to set up
the Driver for the value nodes
and how to use particles m for the lights

happy bl

I don’t know how tomtuko did it.

In my example, I haven’t use drivers, just created a keyframe (I key) in the value node, change frame and add a different keyframe to the node. About using the particle index, the modulo(4)>>lessthan(1) makes every particle with index 4,8,12,(…) to light up because their modulo(4) is 0, which is less than 1 (resulting in a 0,0,0,1,… pattern). Adding a number to the index will just shift the output. if the particles are on the vertices of a edgecurve, they will light as moving dot.

I mean we are talking about lamps with color here!
so you add a line of verts and particles system or a planet ?
or use object may be!

happy bl

here’s the file I made. it’s very simple.