Page 1 of 1

Fading though an image folder

Posted: Tue Aug 30, 2022 10:55 pm
by jameseye
This is one that I have actually solved before -- like a year ago -- and I was happy with my final elegant solution.
(I had tried finding various solutions for a few weeks before one came to me in-a-flash...)

BUT, damn, I forgot how I did it and I cant find my magic file! :[

Goal: I have a JpegFolder thingy.... aiming at a folder with 10 images. and it is set to use an Index based on an "increase" parameter (so, it is spitting out image1... then image2... etc)

I want to fade from one image to the next.... and cycle back around when I get to the end.
So, image 1 fades to 2, 2 fades to 3..... , 9 fades to 10, 10 fades to 1....

I have tried a multimix getting input from two (essentially duplicate) JpegFolders [with the second one having an "offset" of 1]....
And I have tried playing around with the various timings (in the JpegFolders and the MultiMix).

But, no luck....
Anyone have any elegant ways?
Thanks!

Re: Fading though an image folder

Posted: Wed Aug 31, 2022 9:17 pm
by Sadler
This setup will always ensure your images will sync. Have a global to control the looping with just an oscillator (or a ramp!) to drive 3 nodes: 2 JpegFolders and the Mix node. The expression in one JppegFolder tests for when the oscillator is close to 1, the other tests for when it is close to zero.
mix-jpeg-folder.png
mix-jpeg-folder.png (58.42 KiB) Viewed 2408 times
If you want to have oscillators quicker or slower you might have to adjust the tests at either end so that the trigger triggers.

Re: Fading though an image folder

Posted: Sun Sep 04, 2022 12:42 am
by jameseye
Thanks SO much! Awesome!
But, I have an embarrassing question: what is inside the two expressions? I can see just the start.... if (X<0.0,...)?
Sorry -- I tried a few things and I cant get it figured out. Thanks!

Re: Fading though an image folder

Posted: Sun Sep 04, 2022 7:46 am
by Sadler
The first one is a test for when the oscillator is close to 1, something like: if (x>0.99, 1, 0). This means, when the input value is greater than 0.99, output 1 (to trigger the image change for this parameter), otherwise output 0.

Similarly for the second one, though this time you're checking close to zero, so: if (x<0.01,1,0).