Desaturate an image

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
JCook
Posts: 392
Joined: Wed Aug 04, 2004 1:28 pm
Location: Cape Cod, MA

Desaturate an image

Post 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
User avatar
slowtiger
Posts: 6257
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post 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.
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Post 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
Sorry for bad animation

http://www.youtube.com/user/sbtamu
JCook
Posts: 392
Joined: Wed Aug 04, 2004 1:28 pm
Location: Cape Cod, MA

Post 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
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Post 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.
Sorry for bad animation

http://www.youtube.com/user/sbtamu
User avatar
Víctor Paredes
Site Admin
Posts: 5818
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post 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.
Image Image Image Image Image Image
Moho co-owner

Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
User avatar
slowtiger
Posts: 6257
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Selgin: muchas elegante! Much easier than my suggestion. I never used that layer mode anywhere.
JCook
Posts: 392
Joined: Wed Aug 04, 2004 1:28 pm
Location: Cape Cod, MA

Post 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
User avatar
Víctor Paredes
Site Admin
Posts: 5818
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post 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:
Image Image Image Image Image Image
Moho co-owner

Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
User avatar
slowtiger
Posts: 6257
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post 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 ...
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post 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
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Post 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:
Sorry for bad animation

http://www.youtube.com/user/sbtamu
User avatar
uddhava
Posts: 318
Joined: Tue Nov 04, 2008 7:24 pm
Location: American back in Hungary

Post by uddhava »

Selgin, great tip. Thanks!

udd
Post Reply