Tracking question

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

LaserMan

  • Posts: 3
  • Joined: Fri Oct 15, 2021 2:22 pm
  • Real Name: Gary Hair

Tracking question

PostFri Oct 15, 2021 2:55 pm

I'm a brand-new user and have a project that probably requires experience way beyond what I have but I need to get it done so I just drive on...

I have a short video, ~19 seconds, that has a closed jewelry box as the main focus. The box is closed at the beginning and I need to have an image placed inside the box that is visible as it is opened. After watching a few tracking videos I can get it to work fine once the box is fully opened but I can't figure out how to have the image partially visible as the box is opened.

I have attached the first few seconds of the video file so you can see exactly what I am describing.

Any help would be greatly appreciated!
Offline
User avatar

Igor Riđanović

  • Posts: 1596
  • Joined: Thu Jul 02, 2015 5:11 am
  • Location: Los Angeles, Calif.

Re: Tracking question

PostFri Oct 15, 2021 8:04 pm

You need to create an articulate matte in the shape of the area where you want to have the image inside the box visible. The easiest place to do this is in the Fusion page. Copy and paste this in a Fusion comp's node flow and you will see the general idea.

Code: Select all
{
   Tools = ordered() {
      ArticulateMatte = PolylineMask {
         DrawMode = "InsertAndModify",
         DrawMode2 = "InsertAndModify",
         NameSet = true,
         Inputs = {
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Polyline = Input {
               SourceOp = "Polygon1Polyline",
               Source = "Value",
            },
            Polyline2 = Input {
               Value = Polyline {
               },
               Disabled = true,
            },
         },
         ViewInfo = OperatorInfo { Pos = { 199, 40 } },
      },
      Polygon1Polyline = BezierSpline {
         SplineColor = { Red = 173, Green = 255, Blue = 47 },
         NameSet = true,
         KeyFrames = {
            [0] = { 0, RH = { 16.6666666666667, 0.333333333333333 }, Flags = { Linear = true, LockedY = true }, Value = Polyline {
                  Closed = true,
                  Points = {
                     { Linear = true, X = -0.0322916656732559, Y = 0.0601851865649223, LX = 0.0343749995032946, LY = -0.00339506193995476, RX = -0.00121527844005161, RY = -0.0080246919007213 },
                     { Linear = true, X = -0.0359375009934108, Y = 0.0361111108627584, LX = 0.00121527844005161, LY = 0.0080246919007213, RX = 0.0342013895511628, RY = -0.00370370472470917 },
                     { Linear = true, X = 0.0666666676600776, Y = 0.0249999966886309, LX = -0.0342013895511628, LY = 0.00370370472470917, RX = 0.00138888839218347, RY = 0.00833333468547572 },
                     { Linear = true, X = 0.070833332836628, Y = 0.0500000007450581, LX = -0.00138888839218347, LY = -0.00833333468547572, RX = -0.0343749995032946, RY = 0.00339506193995476 }
                  }
               } },
            [50] = { 1, LH = { 33.3333333333333, 0.666666666666667 }, Flags = { Linear = true, LockedY = true }, Value = Polyline {
                  Closed = true,
                  Points = {
                     { Linear = true, X = -0.0322916656732559, Y = 0.0601851865649223, LX = 0.0343749995032946, LY = -0.00339506193995476, RX = -0.00711805621782939, RY = -0.0404320993081287 },
                     { Linear = true, X = -0.0536458343267441, Y = -0.0611111113594638, LX = 0.00711805621782939, LY = 0.0404320993081287, RX = 0.0355902784400516, RY = -0.00246913682347462 },
                     { Linear = true, X = 0.0531250009934108, Y = -0.0685185218298877, LX = -0.0355902784400516, LY = 0.00246913682347462, RX = 0.0059027772810724, RY = 0.0395061741916486 },
                     { Linear = true, X = 0.070833332836628, Y = 0.0500000007450581, LX = -0.0059027772810724, LY = -0.0395061741916486, RX = -0.0343749995032946, RY = 0.00339506193995476 }
                  }
               } }
         }
      },
      ReplaceWithYourImage = Background {
         NameSet = true,
         Inputs = {
            GlobalOut = Input { Value = 50, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftGreen = Input { Value = 0.7, },
            EffectMask = Input {
               SourceOp = "ArticulateMatte",
               Source = "Mask",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 209, 116 } },
      },
      Note1 = Note {
         Inputs = {
            Comments = Input { Value = "Connect the Merge to the output node of your flow.", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 537, 46 },
            Flags = {
               Expanded = true
            },
            Size = { 196, 179.3 }
         },
      },
      ReplaceWithTheBoxShot = Background {
         NameSet = true,
         Inputs = {
            GlobalOut = Input { Value = 50, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 0.55, },
         },
         ViewInfo = OperatorInfo { Pos = { 202, 175 } },
      },
      Merge1 = Merge {
         CtrlWZoom = false,
         Inputs = {
            Background = Input {
               SourceOp = "ReplaceWithTheBoxShot",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "ReplaceWithYourImage",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 372, 181 } },
      }
   }
}
www.metafide.com - DaVinci Resolve™ Apps
Offline

LaserMan

  • Posts: 3
  • Joined: Fri Oct 15, 2021 2:22 pm
  • Real Name: Gary Hair

Re: Tracking question

PostTue Oct 26, 2021 1:15 pm

Sorry I didn't reply sooner, I didn't have notifications turned on and didn't even know you posted. I'll give this a try shortly but I wanted to thank you for the reply and apologize for not seeing it!
Offline

LaserMan

  • Posts: 3
  • Joined: Fri Oct 15, 2021 2:22 pm
  • Real Name: Gary Hair

Re: Tracking question

PostTue Oct 26, 2021 2:04 pm

I pasted it in and swapped my video and still pic, it's pretty obvious what it does. What's not obvious is where the planar tracker will fit into this flow. I'll experiment a bit to see what happens but if you see this reply let me know what you think.

Thanks!

Return to DaVinci Resolve

Who is online

Users browsing this forum: Auluswang, Bing [Bot], mpetech, Username, wfstecko and 204 guests