Jump to: Board index » General » Fusion

Screen replacement

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

acasonj

  • Posts: 43
  • Joined: Wed Jan 23, 2019 4:13 am
  • Location: Australia
  • Real Name: Joshua Acason

Screen replacement

PostThu Aug 08, 2019 10:51 am

Hi Guys, I'm stuck conceptualising how I can define a plane (tracked or untracked) to wrap an object (2d video) to another object (screen / tv / monitor) whilst simulating the aspect ratio of the screen. Masking out the overlap, softly.

Here's an image of how it looks currently:
davinci resolve masked planar issue.png
davinci resolve masked planar issue.png (783.41 KiB) Viewed 2037 times



Here's what I thought:
1. Key the projector screen
2. pipe it to a planar tracker (do I need a tracker, I can't see how to corner pin a static plane using the transform plane tool, so I used a PlanarTracker)
3. Send the screen's media to the tracker, using a corner pin, masked again by the keyed out background in the event the screen's edge is not clearly defined in the corner pin (simple shapes)

As you can see from the image I don't know how I can detach the pinned image (video on the projector screen in this case) from the plane's warping prior to it being mapped to that plane. I think I need to define a space, or an aspect before it hit's the plane tool, THEN the planar will map the image accurately skewed.

You help would be enormously appreciated, I've racked my brains on this one this arvo.

Cheers!
Builder / Creator
@JoshFromPerth
B.CompSci Ma. Networking
Offline
User avatar

Bryan Ray

  • Posts: 2478
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Screen replacement

PostThu Aug 08, 2019 2:49 pm

The way I generally do it is to use the standard Tracker to do a four-corner track and set its Operation to Corner Positioning. You can use the X and Y Offset controls in the Tracker tab to tweak the location of the corners if there's drift or jitter. I then compose the burn-in in whatever aspect matches the target screen, rather than in the aspect of the comp itself. In Corner Positioning mode, the Foreground doesn't need to match the resolution of the Tracker's Background, unlike a Translate/Rotate/Scale track. The image will be stretched to fill the rectangle designated by the Corner Positioning.

The Planar Tracker actually isn't very good at tracking a screen unless there's some detail on it, which would be counterproductive for the keying. So if you can easily target the corners, the regular Tracker is the way to go. Honestly, even for planar tracking I still use Mocha, which does a better job and outputs a standard Fusion Tracker.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

acasonj

  • Posts: 43
  • Joined: Wed Jan 23, 2019 4:13 am
  • Location: Australia
  • Real Name: Joshua Acason

Re: Screen replacement

PostFri Aug 09, 2019 1:47 am

Thanks for the advice Bryan! I found that if I create a background of my desired aspect ratio, then pipe that through to the corner pinned image, it retains the aspect ratio I was hoping when I map the planar tracker to the screen.

In this particular case I'm only tracking an image I'm transforming in Resolve, but I can see your example being useful for when I need to track the motion too. I was only using the planar tracker to map the screen to the correct plane, but it's a static plane.

How do you personally go about keying out the original screen? I've got quite a jagged edge I've softened using blur, and then masked the area and tried to apply another key to remove even more but it's still quite jaggy.
Builder / Creator
@JoshFromPerth
B.CompSci Ma. Networking
Offline
User avatar

Bryan Ray

  • Posts: 2478
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Screen replacement

PostFri Aug 09, 2019 2:32 pm

In that case, there's a much more straightforward tool: Corner Positioner

There's not a one-size-fits-all answer to that question. Nine times out of ten, I roto a screen replacement rather than keying it, though.

I do edge feathering of the element prior to Merging it on, then I kick the corners out beyond the actual corners of the screen a little with the tracker's Offset controls. It's possible the jaggy edges aren't the key's fault, but the Tracker's, since it can't do much to soften the edges of its image. Here's a quick-and-dirty example (with the Corner Positioner tool rather than Tracker, but it works the same way):

Code: Select all
{
   Tools = ordered() {
      Background1 = Background {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 0.419, },
         },
         ViewInfo = OperatorInfo { Pos = { -1485, 181.5 } },
      },
      MatteControl1 = MatteControl {
         Inputs = {
            ["Garbage.Matte"] = Input {
               SourceOp = "Rectangle1",
               Source = "Mask",
            },
            Background = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { -1485, 214.5 } },
      },
      CornerPositioner1 = CornerPositioner {
         Inputs = {
            TopLeft = Input { Value = { 0.238036809815951, 0.753001717805947 }, },
            TopRight = Input { Value = { 0.765030674846626, 0.940054495912807 }, },
            BottomLeft = Input { Value = { 0.239263803680982, 0.237277869920625 }, },
            BottomRight = Input { Value = { 0.765337423312883, 0.0945652173913044 }, },
            Input = Input {
               SourceOp = "MatteControl1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { -1485, 313.5 } },
      },
      Rectangle1 = RectangleMask {
         Inputs = {
            SoftEdge = Input { Value = 0.0145, },
            Invert = Input { Value = 1, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Width = Input { Value = 0.980725623582767, },
            Height = Input { Value = 0.959677419354839, },
         },
         ViewInfo = OperatorInfo { Pos = { -1375, 214.5 } },
      },
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Background2",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "CornerPositioner1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { -1485, 379.5 } },
      },
      Background2 = Background {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { -1650, 379.5 } },
      }
   }
}


It might also be useful to do a little edge blur after the Merge. I believe I put an EdgeBlur macro in Reactor.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com

Return to Fusion

Who is online

Users browsing this forum: No registered users and 29 guests