Need mask help.

Posted:
Sat Aug 05, 2017 9:09 pm
by Timothy Cook
What I'm trying to do is have a background and foreground merged together. I want a hole in the foreground image (I'm using a inverted masked for this). And I want to control the opacity of that hole so the background only shows through the hole in the foreground and with a faint ghosting effect(reason for wanting to control opacity the foreground hole).
I've been able to swap the background to foreground and mask the new foreground and then adjust the opacity, but I want to see the quality difference by trying the way I describe at first.
Every control or slider I try in the mask tab only seems to do the opposite of what I want.
I may or may not be performing the correct sequence of nodes to get my desired outcome.
Thanks!
Tim
Re: Need mask help.

Posted:
Sat Aug 05, 2017 10:35 pm
by Bryan Ray
Leave the Mask un-inverted. Go to the Common Controls tab of the Merge and tick Apply Mask Inverted. Then you will get the opacity control you want using the Levels control of your mask.

- untitled.png (126.92 KiB) Viewed 587 times
- Code: Select all
{
Tools = ordered() {
FastNoise2 = FastNoise {
Inputs = {
GlobalOut = Input { Value = 80, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
Color1Alpha = Input { Value = 1, },
Gradient = Input {
Value = Gradient {
Colors = {
[0] = { 0, 0, 0, 1 },
[1] = { 1, 1, 1, 1 }
}
},
},
},
ViewInfo = OperatorInfo { Pos = { 55, 1072.5 } },
},
Ellipse4 = EllipseMask {
Inputs = {
Level = Input { Value = 0.370212765957447, },
MaskWidth = Input { Value = 1920, },
MaskHeight = Input { Value = 1080, },
PixelAspect = Input { Value = { 1, 1 }, },
ClippingMode = Input { Value = FuID { "None" }, },
Width = Input { Value = 0.261143482337482, },
Height = Input { Value = 0.261143482337482, },
},
ViewInfo = OperatorInfo { Pos = { 165, 1039.5 } },
},
Merge7 = Merge {
CtrlWZoom = false,
Inputs = {
ApplyMaskInverted = Input { Value = 1, },
Background = Input {
SourceOp = "Background3",
Source = "Output",
},
Foreground = Input {
SourceOp = "FastNoise2",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
EffectMask = Input {
SourceOp = "Ellipse4",
Source = "Mask",
}
},
ViewInfo = OperatorInfo { Pos = { 165, 1138.5 } },
},
Background3 = Background {
Inputs = {
GlobalOut = Input { Value = 80, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
Type = Input { Value = FuID { "Vertical" }, },
TopLeftRed = Input { Value = 1, },
BottomLeftGreen = Input { Value = 1, },
Gradient = Input {
Value = Gradient {
Colors = {
[0] = { 0, 0, 0, 1 },
[1] = { 1, 1, 1, 1 }
}
},
},
},
ViewInfo = OperatorInfo { Pos = { 55, 1138.5 } },
}
}
}
Hope that helps!