I want to create random flashing Christmas lights but I am a newbie in shading. I already have modeled my little light bulbs in my scene. What would be the next steps?
HI Marie delama ,
There are countless ways of doing that.
Here's an example of a simple Shader that does that (all Lights use the same Material):
Graph Editor uses T > Linear Interpolation and SHIFT+E > Linear Extrapolation and then a Stepped Interpolation Modifier.
I think the rest is clear, but feel free to ask if you have any questions left.
Dear Martin Bergwerf: first, thank you for your help. I hope you are a patient person, because I have many questions...!
My project is an animated Christmas card. I modeled my cat (who is always the theme of my annual card ☺️), put a fir texture on it and I want to «wrap» him with little flashing white lights, like if he was the Christmas tree.
I followed your «recipe» of nodes (you can see that it is in French; it wasn't easy for me to translate...) and for the color, I chose white, but I am not sure if it's ok.
I have a problem with the Graph Editor: I don't see my bulb (which is selected) in the left box. By the way: I notice that some bulbs are grey and some are black: what does that mean? They are supposed to be similar. 🤔
Maybe I don't see my bulb in the Graph Editor because there is a filter, but I'm not at ease with that. Here are some captures.
"[...] I don't see my bulb (which is selected) in the left box [...]"
You might need to Select the Node, that has the animated Value (in my case the White Noise Texture) in the Shader Editor. Alternatively, you can disable the little arrow icon:
A white color for the Lights is fine. When some lights are grey, that could be the intensity of the Lights (Strength in the Emission Shader, or the Value in the Multiply Node). I also changed the View Transform in the Color Management to Khronos, but that is optional.
And I Added a glow in the Compositor, as you can see , but that is also optional, of course.
I deselected the arrow. I select the bulb in the 3D Viewer and the node White Noise Texture (even if it doesn't look «selected») but I still don't see the bulb in the Graph Editor... 😕
I switched to the timeline and it looks like this:
Why are there these yellow marks at that image???
The yellow marks are the Keyframes (clés).
But you can't change the Interpolation and extrapolation there, nor can you add any Modifiers there (like the Stepped Interpolation).
I wonder why the White Noise Node doesn't look Selected...that might have something to do with why you can't see anything in the Graph Editor...
Also, make sure all your bulbs have the same Material.
I know the yellow marks are keyframes. But why are they there?
I checked: all my bulbs have the same Material.
You put it in French: so kind! I have three more items than you: is a problem?
Hum... How do I do that? When I touch the W and type I, it writes I in the value!
Oh oh oh! I just hover (?) the W and... tadam!!!
What do I have to do next???
It works!!! But it's very frenetic. (But you've already answered to that.) Also, there is at least one or two bulbs which don't work even if they have the same material.
And if you're not tired of me (!), I would like more subtility. I think you explained before.
If some bulbs don't work, that might be, that they coincidentally get a 0 all the time, that should change if you let the blinking run longer.
Also, maybe your computer can't render the changes fast enough (try looking at them frame by frame, see if the light up then).
I you need it more subtle (if I understand that correctly), apart from changing the speed, you could also try another 4D Texture and play with the Settings (specifically the "échelle"):
When you say « that should change if you let the blinking run longer», do you mean that I should maybe make it run for, let's say, 300 images?
I checked each image and that bulb (which is the last, number 23) doesn't light. Maybe if I create another one and change it (like if it was «toasted»)???
I will try another 4D Texture. But the Glow you showed earlier is interesting: to which node do I have to connect that?
Yes, that's what I meant, let it run longer (maybe even 500 Frames).
You could definitely try creating a new one, that often fixes things that are misbehaving.
The Glow is 1 Node in the Compositor. If you want to see it in the 3d View as well, you'll have to enable the Compositor there as well, like this: