8 Replies Latest reply on Jun 14, 2014 12:16 PM by Rick Gerard

    Mask Out Multiple Layers in 3D?

    Nick Papps Level 1

      I have a comp that basically is a projection mapping with multiple slices of an old photo of a house stuck to the footage of the house I filmed.  I used the 3D camera tracker Nulls to place them in space.  Does this make sense so far?   But, now I'm having an issue where I'd like to mask out all the layers at once, feather it out and make it look smooth around the edges.  For some reason, the mask just sticks to the footage I originally shot and to the layers in 3D.  The mask tracker is good except you can't change the path at all once it's tracked because it uses the mask path data points as the mask tracker points.

       

      I tried precomping it but it didn't make a difference.  Meaning, I precomped all the layers and then tried to mask/feather them as one unit.  Didn't work. 

       

      My goal is to have a mask stick to the house and have the mask sort of morph through the clip.  The rest of the project for the other shots was easy.  Only I had one photograph for each shot.  I 3D tracked the clip, made a null attached to a tracker point, copied the position of that null to the photo and then adjusted the photo until it fit.  It works like a charm.  But, when I take a pre comp of multiple layers something goes awry.

       

      Is there something I can try?   Check out the pics.  The top photo is the one I'm trying to figure out. It's a glidecam shot heading towards the house.  The 3D tracker works fine on the footage for all the clips.  The bottom two are simple tripod pans.  As the camera moves the mask essentially morphs and changes shape in an organic sort of way.  I'd like to achieve that for the top comp.

       

       

      Thanks!!

      Photo 1.jpg

      photo 2.jpgphoto 3.jpg

      photo 4.jpg

        • 1. Re: Mask Out Multiple Layers in 3D?
          Mylenium Most Valuable Participant

          Dolly/ slide shots change the parallax and the 3D tracker is trying to pin the shot to a fixed plane, hence it shifts around as the camera moves. That's really not easy to resolve, especially since you can't calibrate the 3D tracker in AE and use manual reference points. Rather than doing this in 3D, you might try a "simple" planar 2D track in mocha with rotation and scaling or a corner pin.

           

          Mylenium

          • 2. Re: Mask Out Multiple Layers in 3D?
            Nick Papps Level 1

            Thanks for the reply Mylenium,

             

            But I'm not having issues with tracking.  The tracking is coming out fantastic.  Nothing is slipping or anything even with slider and glidecam etc.  Essentially, I can't mask out multiple layers as one unit.  The mask doesn't "stick" in the 3D space.  BUT, it does just perfectly when I use just one photo. 

             

            My hope is to find a way to treat all those PSD layers I used for the projection like one of the single 3D tracked photo that I've been doing for the rest of the project and mask it out like the others.  Pre-comping did nothing along with a pre-comp with the 3D button ticked.  

             

            A 2D Mocha track is an idea.  But, my fear is unless it's not a 3D solve then it might not be enough in just 2D with the amount of parallax in the shot. 

            • 3. Re: Mask Out Multiple Layers in 3D?
              Rick Gerard Adobe Community Professional & MVP

              Here's what you have to do. First, make sure that you do not have the Ray-traced renderer turned on. Second, pre-compose your multiple layers. Third Collapse transformations. Fourth, add a new 3D layer using a red or blue solid with the blend mode set to screen and position this layer so that it will cover the entire pre-comp. Now, and this is the reason for the screen blend mode, use the pen tool to draw your mask on the layer then set the layer as a track matte for the pre-comp. Animate the matte and you're done.

              • 4. Re: Mask Out Multiple Layers in 3D?
                Nick Papps Level 1

                Hey Rick, thanks for the reply. 

                 

                I tried that and something goes nutty when I collapse transformations.  When I precompose I assume I include the 3D camera correct inside?Photo 1.pngPhoto 2.pngPhoto 3.pngPhoto 4.pngPhoto 6.png

                • 5. Re: Mask Out Multiple Layers in 3D?
                  Rick Gerard Adobe Community Professional & MVP

                  No, do not include the 3D camera. You need to keep the 3D camera in the shot so the Mask layer will move with the camera. The mask layer should be just in front of the projection layer you have that is closest to the camera. You are only pre-composing the 'projection' layers to group them so you can use one track matte for all layers. Without the camera left in the original comp you are essentially replacing the camera created with the camera tracker with the default Active Camera so none of your tracking info is being used.

                   

                  I wouldn't call this projection mapping. It is more like matte painting because you are painting an element in a shot that wasn't there. Calling it projection mapping confused me for a bit.

                  • 6. Re: Mask Out Multiple Layers in 3D?
                    Nick Papps Level 1

                    Hey Rick, it took me a bit to figure out how to achieve what you're saying.  It works I'm happy to report.  And I definitely learned something new here as I have never really worked with track mattes before!  But, why is it so cumbersome to mask out multiple layers as one?

                    • 7. Re: Mask Out Multiple Layers in 3D?
                      Nick Papps Level 1

                      And, does using a solid of either red or blue make a difference when using mattes?

                      • 8. Re: Mask Out Multiple Layers in 3D?
                        Rick Gerard Adobe Community Professional & MVP

                        I just pick a color that I can see through and that contrasts with the background I'm trying to mask when the solid is set to screen. On some footage I use multiply. It all depends on the footage.