A long time ago (around March; several March's ago, now) in a land far, far away (Los Angeles, California, USA), I got an email from a guy who actually thinks I know something. When you're considered an expert, there's a lot to live up to; so, I try to rise to the occasion as best I can. The guy was having a problem with animating ImageFX's Wave Distort effect. My overseas friend wanted to create waves that slowly appeared, but revealed another image as the wave dissipated. I put my thinking cap on and immediately ran to the manual. Always a good place to start.
The Still RippleThe ImageFX manual does a good job of explaining what every part of Wave Distort does. What's important is the relationship between the Wave Length, its Amplitude and how far out the wave goes - the Distance.
This effect works quite nicely with single images. Load up an image and copy it to Swap. Do something funky with one of the buffers, perhaps Solarize. Then apply the Wave Distort effect. You can set most settings however you like, but set Dissolve to around 50%. You'll probably want to turn on Stretch and AntiAlias, as well, to improve the effect. You get something like this:
Main | Swap | Wave Distort |
![]() |
![]() |
![]() |
So the Dissolve between Main and Swap buffers works just fine. But, how do we get this to work as an animation?
At first I suggested using EOT_PondRipple.ifx with AutoFX, because it will create a nice ripple over a sequence of frames. But, I soon discovered it can't wipe between two sequences! Bummer. Now what? I thought IMP might work, if he changed the Dampening and Distance values throughout the animation. But, at the time I didn't realize that there's something "funny" about this Wave Distort hook that needed to be addressed. I wasn't getting anywhere... fast!
Put the Thinking Cap OnSoon after, a job came up in which I was asked to make a wipe between two plates (a plate refers to shot footage used as a background on which additional effects and/or compositing are performed) using a watery ripple. Sound familiar? Now, I really had to solve this one!
Since my efforts with IMP went nowhere, I returned to EOT_PondRipple.ifx for inspiration. It makes such a lovely ripple, I was determined to figure out how to use this script. All it needed was the wipe.
So, I examined the script. I didn't really understand all that was going on there, but I've somehow managed to make scripts work even in this state of ignorance. The necessary option to get Wave Distort to wipe between Main and Swap is Dissolve. But it appeared nowhere in the EOT_PondRipple.ifx script. Ah, I thought, this is going to be easy - Just ADD it! (Famous last words). I figured I could use some basic algebra, since Dissolve is set as a percentage. I wanted it to be half dissolved at the middle of the animation, for example. So, if there was 30 frames total that would be 15 / 30 * 100 = 50. So I added this line "dis = (framenum / framemax) * 100" and added the variable to the other options in the hook call. Well, guess what! What a mess! It screwed up the ripple completely. It was doing a ripple every ten frames, and there wasn't even a wipe! What was going on here?
When I get desperate, I contact my own "experts". I thought this problem needed a programming solution, so I emailed one of my favorite problem solvers, Ron Jensen. One day later (it's ALWAYS one day later), Ron mentioned that Dissolve seemed to overwrite the ripple. Er, ah, ok? Then he said something about "OutRad", and lost me completely. But, he included the altered script I had sent him with the corrected "magic words". So I tried it and Voila! - it worked like a charm!
There was a little more emailing between us as I tried to understand what had happened. Had I lost my mind? Ron assured me that I wasn't nuts. You, of course, are welcome to disagree with his diagnosis. Meanwhile, my Amiga was happily humming, while the frames rendered away - and my overseas friend was also able to finish his project with this corrected script. Here is Ron's thoughts on it:
Clear as mud....;)"The thing I noticed about the Wave Distort hook is that it's dissolve function overwrote the wave effect it generated, because it happens after the wave effect is applied. It's almost a separate hook, and it was way too feathered for my tastes... So, I decided to do the wipe first, as a separate effect using a rub-through filled oval. If you comment the 'Hook Wave' call, you'll see a simple from-the-center round wipe.
Ola Eric Olsson (the original EOT_PondRipple.ifx author) used the variable "outrad" (for OuterRadius, perhaps?) to specify the distance the wavefront is from center, in pixels. He saved the center of the wave, in pixels in "xcen" and "ycen" (XCenter and YCenter).
I borrowed these three variables for the FilledOval call that generates the wipe. That, luckily, synchronized the two effects together. I also decided to set FillMode to Solid and DrawStyle to RubThrough in the script to wipe to the Swap buffer."
Ok, on second and third reading it's not quite mud, but the bottom line is...it Works! you too can ripple and wipe yer little hearts out. Feel free to examine the script and figure it out yourself or like me, throw your hands in the air, thank god there's someone like Ron to solve these problems, and use the script anytime you need a ripple wipe.
It's easy enough to set this up. First, download this tutorial file archive here: ripple.zip, unarchive it, and put the two provided scripts into ImageFX's rexx/AutoFX directory. Trust me, it won't work if you put them anywhere else; AutoFX requires all it's scripts to be in that directory. Then start the AutoFX hook.
You need two sequences of images to do this. So, if you haven't got them, you'll need to create those first.
If you just want to wipe between two stills, then you must create a sequence of duplicate images for each of the two stills. If you have earlier versions of ImageFX then AutoFX can help you do this. [Add File(s)] your first image in the Main Buffer list and then [Add Command...] the script "RenameOneForSequence.ifx" to the Operations list. Click [Begin] and AutoFX will take that image and copy it as many times as you tell it, numbering them all sequentially. It will only save it in the same format as the original, by the way. So if your image is a Targa file and you don't want to use a lot of storage space making copies I would suggest saving a version in another format before running this script. Create as many frames as you need for your animation. Then make another series with your other still.
If you have ImageFX 4.5 (and if you don't - WHAT are you waiting for???), then load your first still and in the Layer Manager access the menu. Pick [Create Frames]. A box comes up asking how many frames you want to add. Say you want 30 frames. Put the number "29" in the box. That's because "1" already exists. See? If you make too many frames you can always [Delete] any number of frames from the menu. Now use the [Save As Sequence] menu item. Repeat for the second sequence.
Now, that you have your two image sequences we can get to the good part. Start a new AutoFX
project.
Then, [Add File(s)] the first sequence into the Main Buffer file list, and add the second sequence
into
the Swap Buffer file list. [Add Command...] the "EOT_PondRippleWipe.ifx" script as well as one of the
"SaveBufferAs_" scripts, depending on what you need the frames saved
as. Then click [Begin]. When the requester comes up, you can try the following
numbers:
While testing, just use about 10 frames - it's faster and less painful.
No sweat.
At last!
Need help with this topic? Email Me