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?

2 Likes

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!

1 Like

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.

2 Likes

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.