Fade transitions

Are there any plans to implement fade transitions between patterns? Sometimes, when running through a playlist, it can be pretty jarring when a new pattern comes on.

Unless there’s some way to achieve that already?


It is on my list of things to do for sure!

Currently the way around that is to combine everything in one pattern and do some manual transitions via code. @jeff put together some good example patterns:

Crossfading.epe (11.7 KB)

Shimmer Crossfade 2D.epe (14.6 KB)

The shimmer effect is really nice!


Idea for you - would it be significantly easier to start by only offering fade-through-black? Then you wouldn’t have to worry about blending or computation overhead.


That… is a really good idea!

How possible is it to run the calculations on two patterns simultaneously, and only output one? Could you do like a PWM transition? Like if there are 100 degrees of transition, then it starts with displaying 1 frame of pattern B for every 99 frames of pattern A, and increase the ratio until there are 99 B frames and 1 A frame, then end the transition and continue playing pattern B.

I can imagine one problem with this is that the Pixelblaze does not have a set framerate, rather it cranks out frames as fast as it can calculate them. So transitioning between patterns of varying complexity using that algorithm will take different amounts of time, and the fade won’t be perfectly consistent. But it’s where I would start if I were to do it.

That is kind of what shimmer crossfade pattern does (though random for noise instead of PWM). It looks pretty good, I think PWM could look too much like a strobe light.

I do plan on having proper crossfade at some point, which would mean running two patterns per frame. It would reduce the frame rate of both, so the animations wouldn’t desync, but it could cause choppiness. That might be something I could dual render across both cores on V3.

1 Like

And a proper crossfade would be like a per-pixel HSV blending?

1 Like

Yep, probably linear RGB under the hood, HSV or RGB calls end up as RGB, which is easy to use for blending.

I’d second this simple method. With parameters for time, and min volume… Doesn’t have to go pure black, just fade out enough to cut the jarring bit.

i.e. 1/2 second time and min volume 25%. If volume was 80, then fade from 80 → 25 over 1/4 second, then 25 → 80 with the new pattern over the next 1/4 second.