Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Removing unwanted elements with a garbage mask

From: Maya Rendering for After Effects Composites

Video: Removing unwanted elements with a garbage mask

We have assembled the spaceship render passes inside our composition in After Effects, we also adjusted the various layers to improve the quality of the specularity in the reflection and also changed the color of the incandescence on the logo. We are now ready to take this composition and nest it into another one, so we can add the live-action background footage. So let me go straight to Composition > New Composition. I want to create new composition that matches the first one. In this case I need HD 1080, 24 frames per second, and a duration of 90 frames.

Removing unwanted elements with a garbage mask

We have assembled the spaceship render passes inside our composition in After Effects, we also adjusted the various layers to improve the quality of the specularity in the reflection and also changed the color of the incandescence on the logo. We are now ready to take this composition and nest it into another one, so we can add the live-action background footage. So let me go straight to Composition > New Composition. I want to create new composition that matches the first one. In this case I need HD 1080, 24 frames per second, and a duration of 90 frames.

So this is all correct. I can click OK now, and there is a new composition called Comp 1. Let me go ahead and grab the Shot2Ship composition and drop it in this one and therefore nest it. Now I want to see this in front of the live- action, so I'm going to go to Shot2 and pull that down and place it underneath. Now even though that's in the composition, I cannot see it in the viewer. That's because the Alpha around the spaceship is not correct, I do not have the transparency information to make that work. So what I can do though is use the matte trick or use the matte render pass as Alpha information and apply that to the ship.

So I'm going to drag this matte render pass down and place it on top. And once again, as a matte, it's whites or a black, so I can use this as Alpha information for the track matte feature. Now there is one issue with this. If I zoom back and play this back, you'll see that this render pass also traps the shadow on the building. Now we're going to be able to use that later, but I don't want it for this particular iteration of the matte layer, I want to cut this out and just use the matte on the ship. Well, how we do that? Well, a great way to get rid of something you don't want for a layer is to rotoscope.

In fact, when you rotoscope in order to get rid of something, it's often called creating a garbage mask or a garbage matte. So in order to create a garbage matte, what I can do is go back to the Pen tool in rotoscope and then change some settings on that mask to get rid of that section. Let's give that a try. I'll go to Pen tool and draw a loose mask around that shadow area. I just want to encompass it. I want to close the masked path, it's going to keep that area, now that's not good for our purpose of using a track matte, but just for now, I'm going to leave it set to that option so that we can see where it is.

What I do need to do though is animate this mask changing shape over time, because the shadow moves, and so does the ship. So let me go to the matte layer, expand it, expand the Mask section, and then beside Mask 1, expand that and then click on Mask Path to activate the keyframing, so there is the first keyframe. Now I can go to the timeline and adjust the shape of the mask so it continues to encompass the shadow, but I don't want it to touch the ship itself. So in order to change the mask shape, I can use Selection tool and click on or off the various mask points, and then move them to change the shape.

It's going to be a tight fit between the shadow and ship, there should be just enough room, so you don't cut into the ship. So I'm just scrolling through and try to find the palm areas, it looks pretty good. Again, I don't want to touch the ship itself, I just want to make sure I always encompass the shadow. Now that I have the shadow isolated with this mask, I need to invert the way it's operating. I want to give the rid of the shadow, but keep the ship matte. A quick way to do that is to go back down to Mask 1 and change its functionality. There is a mode menu right here that determines how that mask is going to operate.

If it's set to Add, which is the default, it's going to keep whatever is inside the mask. If I switch this over to Subtract, it's going to invert that, now the matte is kept. So now we can use this as a source of Alpha, so I'm going to collapse this. I want to hide that layer, I don't need to see it, go down to the ship layer, go to the track matte menu and switch this to Luma Matte. Luma Matte is going to take the luminance information or the brightness information from the layer above, in this case the matte layer and convert that the Alpha for the ship layer.

So there we go, the ship is now cut out, and I'm not going to see a shadow, we will return to the shadow later on. It will be a good time to play this back and see what the ship looks like over the background. As we play it back, we can see that the ship doesn't quite match the building, remember we created some planes inside Maya to cut the edge of the ship out. However, as the footage moves forward, I'll just zoom in here, you can see that that's edge drifts. That's where Motion Tracking comes into play. What we can do is motion track the ship so that that edge lines up with the building edge.

And the problem arises because the camera's zoomed quite a bit, not only in terms of left-right, up-down motion, but also some rotation on there where the camera tilts left and right. Now you may know ship also looks a little bit jaggy right now, that's just because we're zoomed out. If we zoom all the way in to 100%, you can see the edges are clean. So we have successfully cut out the ship with the track matte trick using the matte render paths. We have also placed it over the background, now we're ready to tackle the problem of the motion, a figure a way to motion track the ship to the original camera movement.

Show transcript

This video is part of

Image for Maya Rendering for After Effects Composites
Maya Rendering for After Effects Composites

34 video lessons · 5647 viewers

Lee Lanier
Author

 
Expand all | Collapse all
  1. 2m 0s
    1. Welcome
      47s
    2. Using the exercise files
      1m 13s
  2. 29m 49s
    1. Working with image sequences
      7m 24s
    2. Importing reference video as an image plane
      5m 13s
    3. Matching the 3D camera to the video footage
      4m 23s
    4. Lighting the model
      5m 35s
    5. Creating mattes and shadows in preparation for rendering
      7m 14s
  3. 15m 38s
    1. Using the Render Layer Editor
      4m 21s
    2. Splitting a scene into multiple render passes
      6m 6s
    3. Adding flexibility by assigning material and render overrides
      5m 11s
  4. 15m 2s
    1. Creating render passes using mental ray
      3m 50s
    2. Batch rendering render passes: Project one
      5m 24s
    3. Batch rendering render passes: Project two
      5m 48s
  5. 19m 4s
    1. Importing render passes into After Effects
      6m 25s
    2. Recombining render passes in a composition
      6m 31s
    3. Transforming multiple render passes as a single unit
      6m 8s
  6. 48m 7s
    1. Setting up a motion tracker
      5m 17s
    2. Using a tracker to analyze motion in footage
      3m 56s
    3. Adjusting tracker options for better results
      7m 2s
    4. Matching layer motion by applying tracker data
      6m 26s
    5. Refining a layer's transparency with rotoscoping
      6m 45s
    6. Improving layer movement with the Smoother tool
      5m 7s
    7. Improving the CG by adding blur and effects
      8m 7s
    8. Adding shadow to make the composite believable
      5m 27s
  7. 32m 36s
    1. Recombining render passes for project two
      5m 17s
    2. Removing unwanted elements with a garbage mask
      4m 57s
    3. Applying motion tracking data to a null layer
      6m 38s
    4. Adjusting shadows and matte edges
      8m 12s
    5. Using color correction to improve layer integration
      7m 32s
  8. 25m 46s
    1. Stabilizing shaky video with the Tracker
      8m 2s
    2. Tracking rectangular elements with the Perspective corner pin option
      5m 31s
    3. Adjusting corner pin points and paths
      6m 56s
    4. Applying corner pin data to multiple layers
      5m 17s
  9. 1m 16s
    1. Next steps
      1m 16s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Maya Rendering for After Effects Composites.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.