Previous topicNext topic

Fading though an image folder

Questions, comments, feedback, etc.
Post Reply
jameseye
Posts: 20
Joined: Sun Feb 07, 2016 5:22 pm

Fading though an image folder

Post 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!
Sadler
Posts: 1130
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Fading though an image folder

Post 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 2052 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.
jameseye
Posts: 20
Joined: Sun Feb 07, 2016 5:22 pm

Re: Fading though an image folder

Post 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!
Sadler
Posts: 1130
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Fading though an image folder

Post 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).
Post Reply