masking in after effects

Tutorials and guides or links covering software discussed in these forums.

Moderators: Admin, Moderator Team

User avatar
justsomeguy
Posting Freak
Posting Freak
Posts: 425
Joined: Sat Jan 10, 2004 7:22 pm
Location: CA, USA

masking in after effects

Post by justsomeguy »

i just got after effects and so far im completely confused, it took me forever just to figure out how to play the video. but what i really wnat to know how to do is mask, like have a still of the backround and then have another video playing and it would remove the backround in the video. i guess that kinda makes sense.
Baggage:::: www.criticalcows.ne1.net
New episode coming by the end of the month!
User avatar
AA
Member
Member
Posts: 56
Joined: Wed May 19, 2004 1:52 am
Location: Los Angeles

Post by AA »

To make a mask in AE you use the pen tool. you select the tool from the tool panel,
and trace a shape around whatever you want to mask. Once you have drawn a shape all the way around your object, select the clip in your timeline and press the M key.
this will open up the mask properties. You can select whether the mask is an add mask
or a subtract mask, you can add somefeathering to the mask to soften the edge, etc.
Also, the mask shape can be key framed. So if you want the mask to change shape over time, here's how to do that. Start at the begining of the time code 0:00 and draw
the mask around the subject. Next to the property "mask shape" click on the little stop watch icon. That sets a keyframe. Now move the timeline marker to another point in the timeline, say 10 seconds. Change the shape of the mask using your arrow tool.
You will see another keyframe appear in the timeline.
Drag the timeline marker back to zero, press play and you will see your mask change shape.
I hope this isn't too confusing, Check AE help as well.
User avatar
justsomeguy
Posting Freak
Posting Freak
Posts: 425
Joined: Sat Jan 10, 2004 7:22 pm
Location: CA, USA

Post by justsomeguy »

okaaaaay. but is it possible to do something like this

--------------
l-------------l
backgroundl still pic ofthe background of the video
l-------------l
--------------

--------------
l------------l
l-video-----l
l------------l video, has same background as above except has guy
--------------

then take take that and remove the background from the video using the background as the mask and be left with just the guy walking past.

sorry if that makes no snse at all
Baggage:::: www.criticalcows.ne1.net
New episode coming by the end of the month!
User avatar
AA
Member
Member
Posts: 56
Joined: Wed May 19, 2004 1:52 am
Location: Los Angeles

Post by AA »

Okay
I understand what you're saying. I have never tried to do what you're asking,
but it is called a difference mask. Which means that only the thing that is different will remain in the picture. Your background plate and video have to be exactly the same for it to work.
The hard way to do it, is to draw a mask around the guy, keyframe the shape
every couple of frames as he moves. It is sort of like roto scoping
It works, I do it alot, but it is time consuming.
Look up how to do difference masks in AE help and try it. Let me know if it works
I am curious!
User avatar
justsomeguy
Posting Freak
Posting Freak
Posts: 425
Joined: Sat Jan 10, 2004 7:22 pm
Location: CA, USA

Post by justsomeguy »

i looked in the help file and searched on google but couldnt find anything really. all i kept finding was the difference compositing thing, i dunno what its called
Baggage:::: www.criticalcows.ne1.net
New episode coming by the end of the month!
User avatar
Syras
Posting Freak
Posting Freak
Posts: 380
Joined: Sat Nov 15, 2003 3:00 am
Contact:

Post by Syras »

in the keying section of after effects there is an option called a difference matte - this is exactly what you want. to use it save a still frame from your scene without the guy in it and do the following:

1. import your background & video files and put them into the comp with the background behind the video
2. with the video layer selected go effects > keying > difference matte (4th option down)
3. a window will open and the second option is "difference layer". set this as your background layer
4. in the timeline window click the eye on the background layer to make it invisible (this will let you see the man without the background)
5. play with the tolerances (how similar the image has to be to be made transparent) until you get the effect you want
6. import the new background you want for the scene and place it behind both the old background and the video layers

if you have any problems with this let me know
User avatar
Syras
Posting Freak
Posting Freak
Posts: 380
Joined: Sat Nov 15, 2003 3:00 am
Contact:

Post by Syras »

does anyone know why i cant reshape the points on my masks to animate them? all i can do is stretch and distort it
Vamp
Forum Addict
Forum Addict
Posts: 941
Joined: Mon Dec 01, 2003 4:49 pm

Post by Vamp »

So that's basically like blue-screening, except using a real background that gets totally keyed out, and then you can put the video of the guy against another background, right?
www.neverdead.co.nr
User avatar
AA
Member
Member
Posts: 56
Joined: Wed May 19, 2004 1:52 am
Location: Los Angeles

Post by AA »

Yes difference Matte, sorry about that. I gave you the wrong name.
Have you tried it? In theory it should work like blue or green screening,
It is just a different way to key something out.
Syras, to reshape or animate masks, see my first post above regarding
setting keyframes in the "mask Shape" properties
User avatar
AA
Member
Member
Posts: 56
Joined: Wed May 19, 2004 1:52 am
Location: Los Angeles

Post by AA »

Syras
Just to follow up Vamps question. Have you done alot of work with difference
mattes? It seems to me that it would be preferable to green screening because the
colors are always greenish when you key something out using green or blue screen.
SpecialFX
Senior Member
Senior Member
Posts: 109
Joined: Mon Apr 26, 2004 10:43 pm
Contact:

Post by SpecialFX »

i just got AE also and i made a set and put a green screen background and wanted to put in a cg background how would i go about doing this?
User avatar
justsomeguy
Posting Freak
Posting Freak
Posts: 425
Joined: Sat Jan 10, 2004 7:22 pm
Location: CA, USA

Post by justsomeguy »

Have you tried it?
no but ill try it right away, didnt know i got a response right away.
So that's basically like blue-screening, except using a real background that gets totally keyed out, and then you can put the video of the guy against another background, right?
i thought about that later, it makes snese i guess.
thanks for your help, i cant wait to try it out

EDIT: okay itried it and it worked better than anything before but still didnt turn out right. btw im trying to make it so that i have the guy walking past be in color and the background be b&w. it kept taking out a lot of the guy and not taking out much of the background at times. a couple frames it looked almost perfect. one thing i added to it though was a mask so i would only have to worry about a small area around the guy. another thing i changed was i had to have the new backgrouynd (the b&w one) in between the video and the still. that was the only way it got close to working, maybe that screwed it up.

EDIT 2: also how do you export a single frame in AE? i ended up exporting the whole thing as a image sequence and taking out the one i wanted and deleting the rest

EDIT 3:
4. in the timeline window click the eye on the background layer to make it invisible (this will let you see the man without the background)
oh thats why i thought you had to have it behind it. this takes up alot of comp memory, i have 1 gig and it uses up all but 200mb; also 1.7 gb pagefile usage
Baggage:::: www.criticalcows.ne1.net
New episode coming by the end of the month!
User avatar
AA
Member
Member
Posts: 56
Joined: Wed May 19, 2004 1:52 am
Location: Los Angeles

Post by AA »

When you go to render a movie, look for the option "Save Frame as"
in stead of making the whole movie. Make sure the time marker is set to the frame you want to export, and that it is with in your work area.
It will export a frame that you can open in photoshop.

I am glad the difference matte sort of worked. Sounds like it takes some practice.
User avatar
AA
Member
Member
Posts: 56
Joined: Wed May 19, 2004 1:52 am
Location: Los Angeles

Post by AA »

SpecialFX wrote:i just got AE also and i made a set and put a green screen background and wanted to put in a cg background how would i go about doing this?
The Keying controls are in the Effects panel. Select the clip you want to key, then go to Effects > Keying
you should have an option for green or blue screen, or use the "color Key"
option, you use an eye dropper tool to select the color you want to key out.
Put the new background in the timeline under the layer that has been
keyed out.
User avatar
justsomeguy
Posting Freak
Posting Freak
Posts: 425
Joined: Sat Jan 10, 2004 7:22 pm
Location: CA, USA

Post by justsomeguy »

When you go to render a movie, look for the option "Save Frame as"
is that under "export"? cuase thats what i use but i know you can select something like "make movie"
Baggage:::: www.criticalcows.ne1.net
New episode coming by the end of the month!
User avatar
AA
Member
Member
Posts: 56
Joined: Wed May 19, 2004 1:52 am
Location: Los Angeles

Post by AA »

Yes
Save frame as
is the choice either below or above "Make Movie"
User avatar
justsomeguy
Posting Freak
Posting Freak
Posts: 425
Joined: Sat Jan 10, 2004 7:22 pm
Location: CA, USA

Post by justsomeguy »

ok i was looking in the wrong place, i think i know now how to fix the problems i had. i made the mask much much smaller and then that helped a lot but i noticed the black and white part wasnt the right brightness and you could easily see the box i had made for the mask. so im gonna simply adjust the settgins of where i amde it b&w and all should be ok. if i get around to it. ill post a video of it when im done
Baggage:::: www.criticalcows.ne1.net
New episode coming by the end of the month!
User avatar
AA
Member
Member
Posts: 56
Joined: Wed May 19, 2004 1:52 am
Location: Los Angeles

Post by AA »

OK
I'd like to see it.
User avatar
justsomeguy
Posting Freak
Posting Freak
Posts: 425
Joined: Sat Jan 10, 2004 7:22 pm
Location: CA, USA

Post by justsomeguy »

im gonna do a whole other clip though cause the video i was working with had me walking by on the carpet and my shawdow really screwed things up but i think the ffect is good for short clips. once i get the new clip i post it on my soon-to-be site (actually its been up for awhile but ive completely redone everything i just have to finish and uplaod it) so probably by this weekend
Baggage:::: www.criticalcows.ne1.net
New episode coming by the end of the month!
SpecialFX
Senior Member
Senior Member
Posts: 109
Joined: Mon Apr 26, 2004 10:43 pm
Contact:

Post by SpecialFX »

i tried put an exlosion from detonation films in a clip but when its goes off the blue around it shows up.what did i do wrong?
User avatar
justsomeguy
Posting Freak
Posting Freak
Posts: 425
Joined: Sat Jan 10, 2004 7:22 pm
Location: CA, USA

Post by justsomeguy »

you mean after the clip is over? then you can just take out the end
Baggage:::: www.criticalcows.ne1.net
New episode coming by the end of the month!
User avatar
Syras
Posting Freak
Posting Freak
Posts: 380
Joined: Sat Nov 15, 2003 3:00 am
Contact:

Post by Syras »

yeh i do a fair bit of work with difference mattes and they are no substitute for a properly lit greenscreen. I have found it takes quite a bit of work with different mattes to get the perfect effect. As for the animated masks thing i can only stretch them to a different size but cant move the points themselves. This is with keyframes on and everything mentioned in your lil tutorial. Weird coz i do so much after effects this basic thing shouldnt be hard :(
User avatar
justsomeguy
Posting Freak
Posting Freak
Posts: 425
Joined: Sat Jan 10, 2004 7:22 pm
Location: CA, USA

Post by justsomeguy »

i can only stretch them to a different size but cant move the points themselves.
try double-clicking one the lines of the mask i think, that usually makes it so you can resize it but maybe itll work the other way around.
yeh i do a fair bit of work with difference mattes and they are no substitute for a properly lit greenscreen. I have found it takes quite a bit of work with different mattes to get the perfect effect.
i agree, for me you almost have to have the perfect shot for the differnce matte to work, and it has to be a pretty short clip. but a greenscreen has alwqays worked well for me. but ithink im going to do a lot more work with difference matttes.

EDIT: ok i got it to work much much better, you have to also use the simple choker effect and the matte choker effect and it will owrk way better
Baggage:::: www.criticalcows.ne1.net
New episode coming by the end of the month!
User avatar
AA
Member
Member
Posts: 56
Joined: Wed May 19, 2004 1:52 am
Location: Los Angeles

Post by AA »

It is strange that you can't animate masks. I don't have any other ideas.
What AE are you using? I think I have 5.5
Just some guy, it seems like you're figuring it out, good work
User avatar
justsomeguy
Posting Freak
Posting Freak
Posts: 425
Joined: Sat Jan 10, 2004 7:22 pm
Location: CA, USA

Post by justsomeguy »

cant animate masks? what do you mean? if youre talking about keyframing them to move and stuff, of course you can do that. you just make the mask and im not sure i think you open up the masks window or something. i have AE 6 pro. ill post a tutorial for the b&w thing up on my site eventually.
www.trp.ne1.net
theres isnt much on their, cause ive been busy with the sript and all, but soon im gonna put a bunch opf tutorials on their. i have one tutorial but its something really obvious and simlpe and it doesnt even really involve video. btw sorry about the pics on my site i didnt know they had to be smaller than that.
im glad i had this challenge cause before i started i knew nothing about AE, now i feel much more comfortable with it
Last edited by justsomeguy on Sat Sep 11, 2004 1:45 am, edited 1 time in total.
Baggage:::: www.criticalcows.ne1.net
New episode coming by the end of the month!
Post Reply