Page 1 of 1

Creating custom transitions using mask image [Solved]

Posted: Sat Nov 12, 2011 7:50 am
by Strum
Is it possible to create our own transitions using a mask image? Like a black and white mask image where the white portion of the mask shows the old scene and the black portion shows the new scene. To help visualize what I'm trying to achieve please take a look at the attached images. One is the image mask, and the other is the result of using the mask. Thanks in advance.

Oh, I should add that in this example, I wish to move the mask image from left to right so that the new scene will cover the old scene.

Re: Creating custom transitions using mask image

Posted: Sun Nov 13, 2011 4:51 am
by Soraminako
While it is possible to do something like that with the following code, the result is unfortunately nowhere near the gorgeous example you gave. :(

Code: Select all

    $ customdissolve01 = ImageDissolve(im.Tile("TransMask.jpg"), 2.0, 1)    
I'm hoping we can find a better way to do it. I also love transitions with image masks, so I'll try again when I have more time. It would be great if it could be done smoothly and beautifully like in your example image.

Re: Creating custom transitions using mask image

Posted: Sun Nov 13, 2011 4:13 pm
by Strum
That's a brilliant idea, to dissolve an image starting from the brightest area first. I never thought of doing things that way. After a bit of messing around with some numbers I finally achieved the custom transition I was looking for. Thanks for the help.

Re: Creating custom transitions using mask image [Solved]

Posted: Sun Nov 13, 2011 11:39 pm
by PyTom
Playing with the ramplen parameter to ImageDissolve will help smooth out the rough dissolves.

Re: Creating custom transitions using mask image [Solved]

Posted: Sun Nov 13, 2011 11:58 pm
by Soraminako
Uhm, if either of you could share the code to get such things smooth, I'd be so glad to have it too. ;___;

Like I said, I love such transitions, have been trying to do it for a while, and don't know how to do it quite right. :( So uhm, please share that knowledge so the rest of us forum dwellers can do it too? ^^;

Re: Creating custom transitions using mask image [Solved]

Posted: Mon Nov 14, 2011 12:04 am
by PyTom
Instead of 1, make the last parameter (the ramplen parameter) a larger number. Valid values are the powers of 2 less than or equal to 256: 1, 2, 4, 8, 16, 32, 64, 128, and 256.

In the example above, it looks like the overlap might be a quarter of the screen. So try 64.

Re: Creating custom transitions using mask image [Solved]

Posted: Mon Nov 14, 2011 2:52 am
by Soraminako
Thank you so much! It works indeed perfectly now! :D