Jump to: Board index » General » Fusion

Green Screen Problem

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

Pixcels

  • Posts: 72
  • Joined: Thu Feb 28, 2019 10:19 am
  • Location: United Kingdom - London
  • Real Name: David Graeme-Baker

Green Screen Problem

PostSat Oct 24, 2020 8:55 am

Keying Problem.png
The left image shows before keying and the right is after - note the colours of the toy on the table !
Keying Problem.png (836.46 KiB) Viewed 1305 times
I have successfully keyed a Background out in the Colour Page BUT I hit a problem which I hoped the FusionPage would help me with but I can't see how to do it.
THE PROBLEM is I am shooting a presenter demonstrating some products on a table - the green screen keys out really well in Colour and even better in Fusion using the Delta Keyer but there are some products on the table which are GREEN and they go too.
Pretty obvious really .
How can I get around this - Would really like to be able to do it in the Fusion page as the key is so good but prepared to give it a go in Colour page if the Fusion answer is too complicated.
I am attaching a pic showing the problem.

Please answer in simple terms - I'm just coming to grips with Resolve :D
Offline

UserNoah

  • Posts: 461
  • Joined: Fri Oct 04, 2019 3:32 pm
  • Location: Germany
  • Real Name: Noah Hähnel

Re: Green Screen Problem

PostSat Oct 24, 2020 9:05 am

That's what the solid mask input is for.
So create a mask and pipe it into the solid mask input. Fusion will then not key these areas. It could however do some despill which wouldn't key out but change the colors. I guess the easiest way would be to merge the untouched image after the key, with a mask on the area you don't need keyed/despilled.
Offline

Pixcels

  • Posts: 72
  • Joined: Thu Feb 28, 2019 10:19 am
  • Location: United Kingdom - London
  • Real Name: David Graeme-Baker

Re: Green Screen Problem

PostSat Oct 24, 2020 10:44 am

MaskPainting.png
Using the painting mask
MaskPainting.png (495.7 KiB) Viewed 1245 times
UserNoah wrote:That's what the solid mask input is for.
So create a mask and pipe it into the solid mask input. Fusion will then not key these areas. It could however do some despill which wouldn't key out but change the colors. I guess the easiest way would be to merge the untouched image after the key, with a mask on the area you don't need keyed/despilled.


Thanks Noah
I'm sure that makes sense but I'm having trouble getting it to work:
Gone to Effects->tools->Mask-> Mask Paint.
A new node appeared and I connected this to the Delta Keyer 'Solid Matte'
In viewer 1 I can see the foreground image and in viewer 2 the Media Out
I then assumed that by painting over the keys on the xylophone that they'd magically return to their natural colours.
Didn't work that way.
The painting of the mask was having some effect but not what I was after - the green keys on the toy did not re-emerge
So instead of painting a mask I selected a rectangular Mask.
This way I felt I could see more clearly what was going on but I'm afraid that has left me baffled too.
I am attaching two more screen grabs - Have I attached something incorrectly in the Nodes ?
Getting pretty frustrated :roll:
So
Attachments
MaskRectangle.png
Using the rectangular mask
MaskRectangle.png (778.24 KiB) Viewed 1245 times
Offline

UserNoah

  • Posts: 461
  • Joined: Fri Oct 04, 2019 3:32 pm
  • Location: Germany
  • Real Name: Noah Hähnel

Re: Green Screen Problem

PostSat Oct 24, 2020 10:55 am

Copy and Paste this into a Fusion comp:

Code: Select all
{
   Tools = ordered() {
      GreenscreenFootage = GroupOperator {
         NameSet = true,
         Outputs = {
            Output1 = InstanceOutput {
               SourceOp = "Merge1",
               Source = "Output",
            }
         },
         ViewInfo = GroupInfo {
            Pos = { 275, 49.5 },
            Flags = {
               AllowPan = false,
               ForceSource = true,
               GridSnap = true,
               PipesAlways = true,
               AutoSnap = true,
               FullIndicator = true,
               RemoveRouters = true
            },
            Size = { 282.938, 307.003, 141.469, 24.2424 },
            Direction = "Horizontal",
            PipeStyle = "Direct",
            Scale = 1,
            Offset = { -251.531, 91.1364 }
         },
         Tools = ordered() {
            Merge1 = Merge {
               Inputs = {
                  Background = Input {
                     SourceOp = "Background1",
                     Source = "Output",
                  },
                  Foreground = Input {
                     SourceOp = "Background1_1",
                     Source = "Output",
                  },
                  PerformDepthMerge = Input { Value = 0, },
               },
               ViewInfo = OperatorInfo { Pos = { 330, 49.5 } },
            },
            Background1_1 = Background {
               Inputs = {
                  GlobalIn = Input { Value = 1, },
                  Width = Input { Value = 1920, },
                  Height = Input { Value = 1080, },
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
                  Type = Input { Value = FuID { "Gradient" }, },
                  TopLeftGreen = Input { Value = 1, },
                  GradientType = Input { Value = FuID { "Radial" }, },
                  Start = Input { Value = { 0.5125, 0.481481481481481 }, },
                  End = Input { Value = { 0.754166666666667, 0.492592592592593 }, },
                  Gradient = Input {
                     Value = Gradient {
                        Colors = {
                           [0] = { 0, 0.85, 0.1768, 1 },
                           [0.422885572139304] = { 0.913432835820896, 0.799625870646766, 0.422885572139303, 1 },
                           [1] = { 1, 0, 0, 1 }
                        }
                     },
                  },
                  EffectMask = Input {
                     SourceOp = "Ellipse1",
                     Source = "Mask",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 330, 115.5 } },
            },
            Background1 = Background {
               Inputs = {
                  GlobalIn = Input { Value = 1, },
                  Width = Input { Value = 1920, },
                  Height = Input { Value = 1080, },
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
                  TopLeftGreen = Input { Value = 1, },
               },
               ViewInfo = OperatorInfo { Pos = { 330, -82.5 } },
            },
            Ellipse1 = EllipseMask {
               Inputs = {
                  Filter = Input { Value = FuID { "Fast Gaussian" }, },
                  MaskWidth = Input { Value = 1920, },
                  MaskHeight = Input { Value = 1080, },
                  PixelAspect = Input { Value = { 1, 1 }, },
                  ClippingMode = Input { Value = FuID { "None" }, },
               },
               ViewInfo = OperatorInfo { Pos = { 165, 115.5 } },
            }
         },
      },
      DeltaKeyer1 = DeltaKeyer {
         Inputs = {
            BackgroundRed = Input { Value = 0, },
            BackgroundGreen = Input { Value = 1, },
            BackgroundBlue = Input { Value = 0, },
            TuningRanges = Input {
               Value = ColorCurves {
                  Curves = {
                     {
                        Points = {
                           { 0, 1 },
                           { 0.4, 0.2 },
                           { 0.6, 0 },
                           { 1, 0 }
                        }
                     },
                     {
                        Points = {
                           { 0, 0 },
                           { 0.4, 0 },
                           { 0.6, 0.2 },
                           { 1, 1 }
                        }
                     }
                  }
               },
            },
            ["Solid.Matte"] = Input {
               SourceOp = "SolidMask",
               Source = "Mask",
            },
            Input = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 495, 49.5 } },
      },
      SolidMask = EllipseMask {
         NameSet = true,
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Width = Input { Value = 0.33691435814198, },
            Height = Input { Value = 0.33691435814198, },
         },
         ViewInfo = OperatorInfo { Pos = { 495, 115.5 } },
      },
      PipeRouter2 = PipeRouter {
         Inputs = {
            Input = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
         },
         ViewInfo = PipeRouterInfo { Pos = { 330, -16.5 } },
      },
      Merge2 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "DeltaKeyer1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "PipeRouter1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
            EffectMask = Input {
               SourceOp = "Polygon1",
               Source = "Mask",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 715, 49.5 } },
      },
      Polygon1 = PolylineMask {
         DrawMode = "InsertAndModify",
         DrawMode2 = "InsertAndModify",
         CtrlWZoom = false,
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            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 = { 715, 115.5 } },
      },
      Polygon1Polyline = BezierSpline {
         SplineColor = { Red = 173, Green = 255, Blue = 47 },
         NameSet = true,
         KeyFrames = {
            [1] = { 0, Flags = { Linear = true, LockedY = true }, Value = Polyline {
                  Closed = true,
                  Points = {
                     { Linear = true, X = 0.0322916656732559, Y = -0.320370376110077, LX = -0.030555554976066, LY = -0.00370370348294576, RX = 0.0500000003311369, RY = 0.090123458703359 },
                     { Linear = true, X = 0.18229167163372, Y = -0.0500000007450581, LX = -0.0500000003311369, LY = -0.090123458703359, RX = -0.0152777794334624, RY = 0.108641975556995 },
                     { Linear = true, X = 0.136458337306976, Y = 0.275925934314728, LX = 0.0152777794334624, LY = -0.108641975556995, RX = -0.0576388902134365, RY = 0.0160493799197821 },
                     { Linear = true, X = -0.0364583320915699, Y = 0.324074059724808, LX = 0.0576388902134365, LY = -0.0160493799197821, RX = -0.0409722226361434, RY = -0.0716049334885162 },
                     { Linear = true, X = -0.159374997019768, Y = 0.109259262681007, LX = 0.0409722226361434, LY = 0.0716049334885162, RX = 0.00763888789547815, RY = -0.100000001140583 },
                     { Linear = true, X = -0.136458337306976, Y = -0.19074073433876, LX = -0.00763888789547815, LY = 0.100000001140583, RX = 0.0256944457689921, RY = -0.046913582380907 },
                     { Linear = true, X = -0.0593749992549419, Y = -0.331481486558914, LX = -0.0256944457689921, LY = 0.046913582380907, RX = 0.030555554976066, RY = 0.00370370348294576 }
                  }
               } }
         }
      },
      Note3 = Note {
         Inputs = {
            Comments = Input { Value = "You can use any of the masks available. Polygon, B-Spline, Rectangle, Ellipse, PaintMask. You probably need to increase the SoftEdge", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 660, 181.5 },
            Flags = {
               Expanded = true
            },
            Size = { 208.071, 68.7003 }
         },
      },
      Note2 = Note {
         Inputs = {
            Comments = Input { Value = "This isn't neccessary if you merge the original onto it but still good to know.\n\nView the delta keyer, click in the viewer, and press A on your keyboard. Now you will see the Alpha channel.\n\nNow select the SolidMask and press Ctrl+P to deactivate and activate the Mask. You will see what the Solid Mask Input does. But as you see, this will still get rid of the green.\n\nSolidMask is only a standard Ellipse Mask", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 330, 148.5 },
            Flags = {
               Expanded = true
            },
            Size = { 196, 181.364 }
         },
      },
      PipeRouter1 = PipeRouter {
         Inputs = {
            Input = Input {
               SourceOp = "PipeRouter2",
               Source = "Output",
            },
         },
         ViewInfo = PipeRouterInfo { Pos = { 715, -16.5 } },
      },
      Note1 = Note {
         Inputs = {
            Comments = Input { Value = "Merge Original Area Back onto the keyed fooatge", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 825, -16.5 },
            Flags = {
               Expanded = true
            },
            Size = { 157.373, 51.874 }
         },
      }
   }
}


This should explain what I mean a little better.
Offline

Pixcels

  • Posts: 72
  • Joined: Thu Feb 28, 2019 10:19 am
  • Location: United Kingdom - London
  • Real Name: David Graeme-Baker

Re: Green Screen Problem

PostSat Oct 24, 2020 11:03 am

You say copy and paste into a Fusion Comp
Not sure what that means
How do I paste a string of words into a Resolve editing program ?
I'm sure what you've told me is going to be really helpful and thanks for all the effort.
Got to go for lunch with the family now so I'll get back to this tomorrow.
By then the I maybe able to understand. :roll: :roll:
Offline

UserNoah

  • Posts: 461
  • Joined: Fri Oct 04, 2019 3:32 pm
  • Location: Germany
  • Real Name: Noah Hähnel

Re: Green Screen Problem

PostSat Oct 24, 2020 11:26 am

You can copy the code with Ctrl+C and then in Fusion press Ctrl+V on your keyboard.
Offline

Pixcels

  • Posts: 72
  • Joined: Thu Feb 28, 2019 10:19 am
  • Location: United Kingdom - London
  • Real Name: David Graeme-Baker

Re: Green Screen Problem

PostSun Oct 25, 2020 9:42 am

Good heavens Noah - that's clever - didn't know you could do that cut and paste thing - amazing.
I will try and follow those instructions and get back to you.
Offline

Somaybe

  • Posts: 6
  • Joined: Thu Nov 19, 2020 2:29 am
  • Location: Los Angeles, CA
  • Real Name: iLan Azoulai

Re: Green Screen Problem

PostFri Nov 20, 2020 9:56 pm

UserNoah wrote:You can copy the code with Ctrl+C and then in Fusion press Ctrl+V on your keyboard.



This is great. I tried it, however, what do I connect to the beginning and end of that setup? does this go to the out of alpha output? I had already the media file there and the out put there. when I pasted the code, it just placed it near the items. does my media file feeds into one of them? thanks
Offline

UserNoah

  • Posts: 461
  • Joined: Fri Oct 04, 2019 3:32 pm
  • Location: Germany
  • Real Name: Noah Hähnel

Re: Green Screen Problem

PostSat Nov 21, 2020 7:13 am

The GreenscreenFootage group represents your footage. You pipe your footage into the deltakeyer.
Then, you need to merge your original footage back onto the keyed image where the deltakeyer either keyed out green parts that should be visible or parts that turn yellow. You do that by using a Merge and pipe a Mask for that area into the blue mask input of the Merge.
I'm not in front of Fusion right now but I believe I also uses a Mask on the white Solid input of the Deltakeyer. That's not necessary because you add the original image on top again, but I wanted to include that in the file because it's important to know.

Often you won't key like that, though. Usually you work with several keyers, combine alphas, and despill your image yourself. But I assume that would be a workflow that's a little too advanced for you yet.
Generally I would advise you to get a little more comfortable with the basic concepts of working in a node based compositor, as it seems like you've struggled with that.
There are some very good Fusion beginner tutorials from Blackmagic themselves in the Resolve 15 manual I believe.
And there is also a tutorial from me. Slightly more advanced, and nothing to do with greenscreen, but it covers A LOT of ground and will make you familiar with a lot of different parts in Fusion. https://noahhaehnel.com/blog/create-an- ... i-resolve/
Offline

Pixcels

  • Posts: 72
  • Joined: Thu Feb 28, 2019 10:19 am
  • Location: United Kingdom - London
  • Real Name: David Graeme-Baker

Re: Green Screen Problem

PostSat Nov 21, 2020 12:03 pm

Many thanks for that Noah
Thanks to your help I got around the problem.
Took me a while but got there eventually.
I'm going to read your Blog post next :)

Return to Fusion

Who is online

Users browsing this forum: No registered users and 55 guests