Page 1 of 1

Desaturate an image

Posted: Wed Aug 18, 2010 7:27 am
by JCook
Is there a way to desaturate an image in ASPro 7 and animate it? In other words, start with the image in color, and then gradually have it become a grayscale image. I can make a duplicate image in Photoshop and desaturate it there and then animate a dissolve between two image layers in ASPro, but I'm wondering if it can be done right in the program.

Using ASPro7 on OS 10.5.8.

thanks,
Jack

Posted: Wed Aug 18, 2010 7:47 am
by slowtiger
No, there's no option like that in AS.

Stuff like this normally would be done in a compositing program or a video editor. But if you don't have one of these and need the effect in animation, here's a trick:

Isolate the layer(s) you want to become grayscale and switch off visibility for everything else. Render this two times:
- one pass with PNG codec, millions+ colours - this will give you an alpha channel.
- second pass with PNG codec, 256 grays - this will give you the desaturated image.

Now toggle the visibility and render the other layers (in 2 portions if they are in front and behind the gray layer) with PNG codec, millions+ colours.

Import all those videos into a new AS project, put pass 1 and 2 into a group, and make pass 1 the mask of pass 2. Duplicate pass 1. Setup like this:

- foreground (colour)
- group (hide all)
- - pass 1 (don't mask) <-- this is the layer you animate the opacity to get the blend effect.
- - pass 2 (mask this)
- - pass 1 (add to mask, keep invisible)
- background (colour)

The same principle applies to other effects: isolate the FX layer, render several passes, and play with masks and opacity.

Posted: Wed Aug 18, 2010 8:21 am
by sbtamu
I have done this in the past. What I do is import an image then duplicate it then set both images to allow animated layer effects. Next, I set one image to 0 opacity at frame 0 and 100% at somewhere in the time line, then i set the other image to 100% opacity at frame 0 and 0 opacity at somewhere in the time line(make sure both images are at same point in the time line) You can use Toon/image setting to gray scale one of the images.

Make sure You do not translate any of the images.

I forgot to mention that with the Toon effect, the saturation can go in the negative. The image example I did below is 0 edge, 255 gray scale, 0 black and -150 saturation.

example

http://www.youtube.com/watch?v=8EysnuT4ASw

Posted: Wed Aug 18, 2010 11:27 am
by JCook
Thanks to both of you for the replies.

sbtamu, that works like a charm except that when applying the toon effect I lose the detail in the picture. It might just work anyway, as what I am doing is showing coral dying (I'm using photos for this). After turning gray it'll disappear, so the degradation of detail might work towards the effect.

Thanks for your help.
Jack

Posted: Wed Aug 18, 2010 12:02 pm
by sbtamu
As slowtiger stated above, I think using an editor will give much better results.

On this one I just took the image and imported to GIMP, selected Hue/saturation and set it to -100(make sure not to change the size of the image)and saved (took all of 30 seconds with free software.) Then I imported the new and old images to AS7 and followed my original opacity for each image. It give a much better result.

example 2

http://www.youtube.com/watch?v=rCxSNRHn39A

Stephen.

Posted: Wed Aug 18, 2010 1:44 pm
by Víctor Paredes
On the top of layer order, create a new layer with a black rectangle. Go to layer proprieties and select "Color" as blend mode.
Render a preview, your image will by on grayscale.

If you want an animated fade, simply play with layer opacity.

PD: On layer proprieties you can check "Hide in editing view" to work easily.

Posted: Thu Aug 19, 2010 1:14 am
by slowtiger
Selgin: muchas elegante! Much easier than my suggestion. I never used that layer mode anywhere.

Posted: Thu Aug 19, 2010 5:17 am
by JCook
Yes! That's it. Thank you, Selgin! I've never actually used the layer modes (because I don't really understand how they work), so this is a perfect solution. Since I'm graying out specific parts of the image and don't want a square to show, or the whole thing to turn gray I put everything in a group and made a mask. This works like a charm. I put the color image in the group just under the black rectangle, and it's fine. Keying the visibility of the black rectangle layer gives me the effect I want. Thank you so much, Selgin!

Jack

Posted: Thu Aug 19, 2010 7:56 am
by Víctor Paredes
Hehe, you are welcome :)
I discovered it some time ago by trial and error. I posted it on forum, but couldn't find it now.

PD: thank you for the effort, Slowtiger, but you actually said something like "a lot of elegant woman". But don't worry, I know you wanted to say "¡Muy elegante!" which is the more direct translation of "Very elegant", I think.
I suppose I make a lot of this kind of mistakes on all my posts, so I can forgive you if you do it too :roll:

Posted: Thu Aug 19, 2010 11:07 am
by slowtiger
Your english is definitely much better than my spanish, which consists of only some random words I picked up when I was in holiday in spain when I was 13 ...

Posted: Thu Aug 19, 2010 1:09 pm
by heyvern
The only Spanish I know was taught to me by coworkers when I was a teenager. I have discovered since then I can never ever ever repeat those phrases to anyone who understands Spanish. I made that mistake a few years back while at a resort in Mexico. :)

-vern

Posted: Thu Aug 19, 2010 2:08 pm
by sbtamu
I should be shamed of my self. I was born in Spain, my wife is Mexican, Ive lived In Texas for 30 years where Spanish is second nature to most and the only words I know are the ones my wife calls me when she is mad. :lol:

Posted: Fri Aug 20, 2010 5:40 am
by uddhava
Selgin, great tip. Thanks!

udd