Jump to: Board index » General » Fusion

combining alphas

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

Ziggy Uszkurat

  • Posts: 46
  • Joined: Fri Sep 04, 2015 12:45 pm

combining alphas

PostThu Oct 08, 2015 5:43 pm

Jeez I'm sure I am doing something really stupid. I have two ultrakeyers, both with garbage masks and I need to combine them and then shrink the result to composite over my background. BUT, whatever I try, as soon as I shrink it, the alpha outside the keyed image size is white. So it masks the background image. Please help cos I am going crazy...

TIA
Ziggx
Offline
User avatar

Rony Soussan

  • Posts: 727
  • Joined: Tue Nov 11, 2014 5:33 pm

Re: combining alphas

PostThu Oct 08, 2015 6:11 pm

Sounds like your combining too many post multiplied images.

I prefer combing the mattes using Boolean, then feed the RGB of the foreground into a matte control, select copy, do your shrinking, then post multiply the final assembly.

here's an example, but remember, there are so many ways to do this, but I find this method the easiest to read.

Code: Select all
{
   Tools = ordered() {
      FastNoise1 = FastNoise {
         Inputs = {
            GlobalOut = Input { Value = 150, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
            Contrast = Input { Value = 5, },
            Color1Blue = Input { Value = 1, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1, },
                     [1] = { 1, 1, 1, 1, },
                  },
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 440, -247.5, }, },
      },
      Polygon1 = PolylineMask {
         DrawMode = "InsertAndModify",
         DrawMode2 = "InsertAndModify",
         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 = { 605, -181.5, }, },
      },
      Polygon1Polyline = BezierSpline {
         SplineColor = { Red = 173, Green = 255, Blue = 47, },
         NameSet = true,
         KeyFrames = {
            [7] = { 0, Flags = { Linear = true, LockedY = true, }, Value = Polyline {
                  Closed = true,
                  Points = {
                     { Linear = true, X = 0.0841653354632588, Y = 0.550189393939394, LX = 0.146359921348065, LY = -0.0042613603249945, RX = -0.200649100328363, RY = -0.00583964646464648, },
                     { Linear = true, X = -0.517781965521832, Y = 0.532670454545454, LX = 0.200649100328363, LY = 0.00583964646464648, RX = 0.171064491258431, RY = -0.230166247998825, },
                     { Linear = true, X = -0.00458849174653886, Y = -0.157828289451021, LX = -0.171064491258431, LY = 0.230166247998825, RX = 0.11611283058218, RY = 0.123211280565069, },
                     { Linear = true, X = 0.34375, Y = 0.211805552244186, LX = -0.11611283058218, LY = -0.123211280565069, RX = 0.0598316998358182, RY = 0.108533253573408, },
                     { Linear = true, X = 0.523245099507455, Y = 0.53740531296441, LX = -0.0598316998358182, LY = -0.108533253573408, RX = -0.146359921348065, RY = 0.0042613603249945, },
                  },
               }, },
         },
      },
      UltraKeyer1 = UltraKeyer {
         Inputs = {
            BackgroundCorrection = Input { Value = 0.2, },
            PostMultiplyImage = Input { Value = 0, },
            Input = Input {
               SourceOp = "FastNoise1",
               Source = "Output",
            },
            GarbageMatte = Input {
               SourceOp = "Polygon1",
               Source = "Mask",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 605, -148.5, }, },
      },
      ChannelBooleans2 = ChannelBoolean {
         Inputs = {
            Operation = Input { Value = 3, },
            ToRed = Input { Value = 4, },
            ToGreen = Input { Value = 4, },
            ToBlue = Input { Value = 4, },
            Background = Input {
               SourceOp = "UltraKeyer1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "UltraKeyer1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 715, -148.5, }, },
      },
      Polygon1_1 = PolylineMask {
         DrawMode = "InsertAndModify",
         DrawMode2 = "InsertAndModify",
         Inputs = {
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1, }, },
            ClippingMode = Input { Value = FuID { "None", }, },
            Center = Input { Value = { 0.5, 0.0662878787878788, }, },
            Polyline = Input {
               SourceOp = "Polygon1_1Polyline",
               Source = "Value",
            },
            Polyline2 = Input {
               Value = Polyline {
               },
               Disabled = true,
            },
         },
         ViewInfo = OperatorInfo { Pos = { 605, -115.5, }, },
      },
      Polygon1_1Polyline = BezierSpline {
         SplineColor = { Red = 173, Green = 255, Blue = 47, },
         NameSet = true,
         KeyFrames = {
            [7] = { 0, Flags = { Linear = true, LockedY = true, }, Value = Polyline {
                  Closed = true,
                  Points = {
                     { Linear = true, X = 0.0841653354632588, Y = 0.550189393939394, LX = 0.146359921348065, LY = -0.0042613603249945, RX = -0.200649100328363, RY = -0.00583964646464648, },
                     { Linear = true, X = -0.517781965521832, Y = 0.532670454545454, LX = 0.200649100328363, LY = 0.00583964646464648, RX = 0.171064491258431, RY = -0.230166247998825, },
                     { Linear = true, X = -0.00458849174653886, Y = -0.157828289451021, LX = -0.171064491258431, LY = 0.230166247998825, RX = 0.11611283058218, RY = 0.123211280565069, },
                     { Linear = true, X = 0.34375, Y = 0.211805552244186, LX = -0.11611283058218, LY = -0.123211280565069, RX = 0.0598316998358182, RY = 0.108533253573408, },
                     { Linear = true, X = 0.523245099507455, Y = 0.53740531296441, LX = -0.0598316998358182, LY = -0.108533253573408, RX = -0.146359921348065, RY = 0.0042613603249945, },
                  },
               }, },
         },
      },
      MatteControl1 = MatteControl {
         Inputs = {
            MatteCombine = Input { Value = 4, },
            PostMultiplyImage = Input { Value = 1, },
            Background = Input {
               SourceOp = "FastNoise1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "ChannelBooleans2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 880, -247.5, }, },
      },
      UltraKeyer1_1 = UltraKeyer {
         CtrlWZoom = false,
         Inputs = {
            BackgroundCorrection = Input { Value = 0.2, },
            PostMultiplyImage = Input { Value = 0, },
            Input = Input {
               SourceOp = "FastNoise1",
               Source = "Output",
            },
            GarbageMatte = Input {
               SourceOp = "Polygon1_1",
               Source = "Mask",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 605, -82.5, }, },
      },
   },
   ActiveTool = "UltraKeyer1_1",
}
Offline
User avatar

michael vorberg

  • Posts: 943
  • Joined: Wed Nov 12, 2014 8:47 pm
  • Location: stuttgart, germany

Re: combining alphas

PostThu Oct 08, 2015 9:06 pm

add a "set canvas color" after your ultra keyer and everything should work as expected

the ultra keyer doesnt change the alpha outside of the DoD of the image, so if you scale it down the alpha outthere is white and you will see this
the canvas color node will set the alpha outside of the DoD to 0 (with default settings)
Offline
User avatar

Rony Soussan

  • Posts: 727
  • Joined: Tue Nov 11, 2014 5:33 pm

Re: combining alphas

PostFri Oct 09, 2015 12:45 am

ooops... I misread. I thought you meant choke the matte.... well, still good tip :D
Offline

Ziggy Uszkurat

  • Posts: 46
  • Joined: Fri Sep 04, 2015 12:45 pm

Re: combining alphas

PostFri Oct 09, 2015 6:52 am

Thanks guys,

I never kew about the "Set Cnvas Color" node- did the job. Thank you thank you thank you!!!

Best Wishes
Ziggx

Return to Fusion

Who is online

Users browsing this forum: No registered users and 26 guests