Three Blinking Lights

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.

xmasblink

Follow up:

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.

drag-texture

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.

Blink-user-data

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.
blink-xpresso

That is it, make as many instances of the object containing the texture as you want.

and enjoy!

xmasblink


13 comments

Comment from: Dmm [Visitor] : 2007-12-19 @ 18:49
Hehe in the 2nd picture you make the orange *drag and drop*arrow from "MATERIAL[Light B]" to "Light A".... but its cool :P
Comment from: base80 [Member] Email : 2007-12-19 @ 19:02
The material is actually called LightA, B and C. So no error there.
Comment from: c2 [Visitor] : 2007-12-24 @ 00:36
Merci Base80 pour ton site
et Joyeux Noël à toi aussi!!!
Comment from: Knoxel [Visitor] : 2008-09-30 @ 07:49
I'm confused. I don't get where you set the values on the math nodes or how to link all 3 textures to one object.
Comment from: Knoxel [Visitor] : 2008-09-30 @ 07:52
Do you have the scene file?
Comment from: base80 [Member] Email : 2008-09-30 @ 20:39
I will not post files. The tutorial is adequate for intermediate xpresso users
Comment from: movecraft [Visitor] · http://www.movecraft.com : 2008-11-20 @ 01:52
modulus is cool. Very useful, thanks!
Comment from: I3D [Visitor] Email : 2008-12-23 @ 13:26
***--
I know it`s for itermediate but you could explain it a little better (like where to find XPresso tag w/ speed) so anybody could follow it.. Thnaks for the tut !
Comment from: base80 [Member] Email : 2008-12-23 @ 13:29
..."Now add a user-data slider in reals from 1 to 100 (not 0). This user-data will set the speed of the blinking in frames per light"...
This one is called SPEED (sorry for not mentioning that)
Comment from: steve [Visitor] · http://steveostudios.tv : 2009-02-20 @ 21:46
*****
Awesome tutorial! There is one thing that I must be doing wrong. On mine, all of the materials are changing to the same material at the same time, not marqueeing like your example...Any ideas on what I'm missing?
Comment from: Archery Lover [Visitor] : 2010-01-30 @ 22:19
*****
Great blog! This is really going to help me out. And great pointers too! Thanks so much
for this. Love it!
Comment from: Paradox [Visitor] : 2011-06-20 @ 22:32
*****
Great tip! My flux capacitor is operational!
Thank you ;)
Comment from: Paul Turcott [Visitor] : 2011-11-17 @ 04:41
*****
This is fantastic stuff!! I live in Seattle, Washington in the States. Cinema 4D is not well known over here but it's my favorite.

I have a tutorial suggestion: How to do a pop up book animation, Similar to this one.>

http://www.youtube.com/watch?v=-g4kO9cEvUQ

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)