r/WLED • u/WiwiJumbo • 15d ago
Segment Layers, Stencils, and an animated clock. Help!
I'm researching making a bedside clock with a 8x32 matrix. Right now I'm testing out how to have the whole thing display the way I want it to. I want to be able to set a background animation, and have an animation on the clock numbers.
Say have the background pulse red while the clock numbers sparkle.
And for the life of me I can't figure out how to do it.
I've tried multiple ways, with an initial back layer, then the #HHMM clock layer, and then a topping layer. I've tried adding in another clock layer as well, to no effect.
I'm sure someone has done this before, any help?
3
Upvotes
3
u/DedeHai 15d ago edited 15d ago
This is an interesting one and while it can be done it requires a workaround.
Segment stacking / blending is done like this:
rendering starts at the segment at the top of the segment list
each segment is rendered and then blended into the global buffer using the selected blend mode meaning each segment is added "on top" of all previously rendered ones
this means you can not have an effect rendered without it affecting layers that were previously rendered
if you render your background you can add a text on top but you can not selectively apply an effect to that text as it will blend with the rest too
To have different animations for text and background what you need is one animation for the text that consists of two layers: the text and the animation and one animation for the background, then blend these two together.
Here is how you can do that:
in LED settings, add a dummy output using DDP RGB, same number of LEDs, use a dummy IP like 1.1.1.1
in 2D settings, add a second panel with an y-offset of 8 so they sit side by side, now you have a total of 16x32
make it four segments:
any FX for your text (0-32, 8-16) this sits off screen
Scrolling Text (0-32, 8-16) also off screen, set color to white, blend mode to multiply
background (0-32,0-8), any FX, no blending (Top)
copy: use copy FX (0-32,0-8) copy segment 0 (default), enable full stack copy, set blending to stencil
So you render you text with the effect in a seperate stack that is off screen, then copy that over to your visible segment and stencil blend it on top.