6 Replies Latest reply on Apr 20, 2016 11:52 AM by chrisw44157881

    Key out white background and motion track 3d

    justins25110601

      This is actually two questions, so if I need to split it up into 2 posts, I can do that.

       

      First, I have my talents on a white background (due to the green in the costume) and I want to put a background behind them that is a picture of a track or stadium (see the second screen shot). I originally did this by going into AE and making two copies of the clip. Then I used the HUE/SATURATION effect to make the top copy B/W, and then LEVELS to make it very contrasted. Then I set it as a Luma (Inverted) Matte on the bottom copy. That worked pretty good, at least better than Ultra Key or Luma Key, which both left quite a bit of white around the edges of the subjects. Still, you can see a white edge around the subjects now, albeit it a smaller one than with the keying effects. Does anyone know a better way to remove the white background so there is no white edge around the subjects?

       

      Second, you can see the mic has a green cover. I need to put our logo in place of the green and make it match perspective and rotation. I thought of motion tracking with a corner pin effect, but because of the rotation, I am not sure if this will work. As the talent moves the mic around, the green box changes angle and rotation, as well as position. What do you recommend I use to match my logo (seen in the second screen shot) to the mic?

       

      Joe_SS_2.png

      Screen shot of clip with white background

       

      Joe_SS_1.png

      Screen shot of clip with white background removed (notice white edge) and logo to replace green box on mic

        • 1. Re: Key out white background and motion track 3d
          Mylenium Most Valuable Participant

          Does anyone know a better way to remove the white background so there is no white edge around the subjects?

           

          There's no "better" way, you just need to put in a lot more work with additional effects like the Matte Choker, Refine Edges and whatnot. That aside, the actual keying fringe is just one problem. You will also have to do something about the white bleeding in everywhere on the clothes and face.

           

          Second, you can see the mic has a green cover. I need to put our logo in place of the green and make it match perspective and rotation. I thought of motion tracking with a corner pin effect, but because of the rotation, I am not sure if this will work.

           

          Without actually seeing the footage in motion, nobody can tell you much. It may in fact be super-simple to replicate using a few hand-keyframed elements, a 3D comp with collapsed transformations and proper placement of the anchor point. Peopel always tend to over-complicate such stuff because they think tracking is magic...

           

          Mylenium

          • 2. Re: Key out white background and motion track 3d
            Rick Gerard Adobe Community Professional & MVP

            The first thing I would do with this project is convert it to 32 bit so you have more control over the colors. To create the luma matte I would start by converting the image to black and white as you did but I would go much easier on the contrast control. I probably would use Curves instead of levels. I would also have used red green and blue adjustments when turning the copy of the footage to black and white to darken the skin as much as possible.

             

            To achieve a fully black matte I would then duplicate the high contrast black and white footage and set the copy to Multiply. I would do this several times until almost all of the gray was gone. Then I would have added black shape layers to fix anything else that was causing problems. All of the black and white layers and the hole filling shapes would be pre-composed and the pre-comp would be used for a track matte. See the HC Pre-comp with 10 copies of the B/W layer.

             

            I would then use that HC Pre-comp to create a luma matte on the original footage. I would blur the original footage about 8 pixels with Fast Blur so I would have some edges to work with in the final comp. See Track Matte comp.

             

            The last step would be to put the track matte comp on top of the footage in a main comp and add a little more fast blur if needed and and Curves and Simple Choker. I would look at the Alpha channel of the comp, solo the track matte layer and then adjust the Alpha channel of the curves to clean up any holes in the matte. I would then return the comp panel to RGB and set the Track Matte layer as an alpha matte for the footage and adjust the simple choker and fast blur to clean up the edges.

             

            I hope this helps. Here's a screenshot of a comp creating the matte the way I would do it.

            Screen Shot 2016-04-19 at 8.21.42 AM.png

            The last step would be to track the mic bug using Mocha and use corner pin to add your logo.

             

            If this had been my project and there was no blue screen available I would have shot the project green screen and changed the makeup for the guy with the green face. Then I would have used change color techniques to make the face green again after the kay was made. I also would have used a mic bug (cube) that had a fair amount of detail in it. It's much easier to get a good track when there is some detail in the shot than it is when the surface is flat and plain.

             

            I hope this helps. Pulling a luma key when you shoot actors against a white background is a lot tougher than keying.

            • 3. Re: Key out white background and motion track 3d
              justins25110601 Level 1

              Thanks, Mylenium. I have uploaded about 20 seconds of the clip so you can see the mic box move around. I know that tracking isn't magic, but I often have to go in frame-by-frame and I am hoping you might have some trips or tricks for making the process easier. I am under a time-crunch to get these videos finished, so even if it is doesn't look perfect, that's okay.

               

              Link to sample clip: Sample Clip - YouTube

              • 4. Re: Key out white background and motion track 3d
                justins25110601 Level 1

                Can you recommend a way to darken up the light parts without darkening up the entire clip?

                • 5. Re: Key out white background and motion track 3d
                  Rick Gerard Adobe Community Professional & MVP

                  See the technique I posted.  Set the project to 32 bit, Use the technique that I posted for creating a high contrast matte. Convert the footage to black and white, darken the color values to darken the skin tones, then duplicate the layer, set the top copy to multiply and duplicate as many times as it takes to generate a high contrast matte. If needed add solids to cover white areas like the sign on the chest of the guy on the left and anything else that you can't turn black. If needed add curves to an adjustment layer to push the gray to black, then pre-compose the 10 or so layers to a HC matte layer.

                   

                  Duplicate the HC matte layer. and use fast blur repeating edge pixels to blur the top layer about 20 pixels, The more you blur the bigger edge you can make. Use Invert or a curves effect to invert the top copy so the men are black and blurry and the background is white. Set the blend mode of the top layer to Multiply and you should see a gray outline that looks something like this:

                   

                  Joe_SS_2.jpg

                   

                  You can control the size of the edge by adjusting the blur and by how you set up the high contrast matte. You can now use this comp as a luma track matte for an adjustment layer to color correct the edges of of the matte. Curves can be used to adjust the size and density of the edge matte. This is also how you would create a matte for a light wrap when all you have is a white background.

                   

                  This is pretty basic compositing stuff that has been used since before we had digital images to work with. There are some 3rd party matte tools that will do this kind of thing automatically but it's pretty simple when you know the basics.

                   

                  I hope this helps.

                   

                  With your permission I'd like to use your footage in a tutorial. I've been looking for some footage for keying a white background for a while. I'll give you credit for the footage. PM me or just reply in the forum.

                   

                  Thanks.

                  • 6. Re: Key out white background and motion track 3d
                    chrisw44157881 Level 4

                    what I do is key everything but the white. I made a template that keys lightness, saturation, hue and combines them into a super matte.

                    whatever is left over is pure white. I use it to key blown out skies.

                    https://f1.creativecow.net/6898/bandingwhite-masker