Page 1 of 1
Math Error When Merging Masks

Posted:
Tue Oct 06, 2015 2:06 am
by David Stringham
What I'm trying to do is create a matte for lightwrap. As far as I can tell, I'm doing everything right. I've attached a screenshot illustrating my node setup and an image of my result.
I have the inverted, blurred matte, which I multiply with the original matte and get the incorrect result below. I have tried nearly all of the blending modes with no change. Is there any explanation for why this is not working?
Re: Math Error When Merging Masks

Posted:
Tue Oct 06, 2015 2:56 am
by Chad Capeland
The blend modes apply to RGB, not Alpha.
Re: Math Error When Merging Masks

Posted:
Tue Oct 06, 2015 8:56 am
by David Stringham
Okay, fine, but that IS the RGB output. I just added a ChannelBooleans tool in between the first Merge and the Blur to copy the alpha into the RGB channels. No luck.
Re: Math Error When Merging Masks

Posted:
Tue Oct 06, 2015 9:59 am
by Ivan Ivanov
There are multiple ways of manipulating alpha channels, but using merge for that is not what you'd go for.
Here is two simple setups:
- Code: Select all
{
Tools = ordered() {
Ellipse1 = EllipseMask {
Inputs = {
SoftEdge = Input { Value = 0.001, },
MaskWidth = Input { Value = 1920, },
MaskHeight = Input { Value = 1080, },
PixelAspect = Input { Value = { 1, 1, }, },
ClippingMode = Input { Value = FuID { "None", }, },
Width = Input { Value = 0.208884305444963, },
Height = Input { Value = 0.208884305444963, },
},
ViewInfo = OperatorInfo { Pos = { 149, 55, }, },
},
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, },
Gradient = Input {
Value = Gradient {
Colors = {
[0] = { 0, 0, 0, 1, },
[1] = { 1, 1, 1, 1, },
},
},
},
EffectMask = Input {
SourceOp = "Ellipse1",
Source = "Mask",
},
},
ViewInfo = OperatorInfo { Pos = { 252, 55, }, },
},
MatteControl1 = MatteControl {
CtrlWZoom = false,
Inputs = {
Background = Input {
SourceOp = "Background1",
Source = "Output",
},
GarbageMatte = Input {
SourceOp = "Bitmap1",
Source = "Mask",
},
},
ViewInfo = OperatorInfo { Pos = { 534.868, 33.1141, }, },
},
Bitmap1 = BitmapMask {
Inputs = {
SoftEdge = Input { Value = 0.002, },
MaskWidth = Input { Value = 1920, },
MaskHeight = Input { Value = 1080, },
PixelAspect = Input { Value = { 1, 1, }, },
ClippingMode = Input { Value = FuID { "None", }, },
Image = Input {
SourceOp = "Background1",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 534.868, -74.8859, }, },
},
Bitmap3 = BitmapMask {
Inputs = {
SoftEdge = Input { Value = 0.005, },
PaintMode = Input { Value = FuID { "Subtract", }, },
MaskWidth = Input { Value = 1920, },
MaskHeight = Input { Value = 1080, },
PixelAspect = Input { Value = { 1, 1, }, },
ClippingMode = Input { Value = FuID { "None", }, },
Image = Input {
SourceOp = "Background1",
Source = "Output",
},
Low = Input { Value = 0.1, },
EffectMask = Input {
SourceOp = "Bitmap2",
Source = "Mask",
},
},
ViewInfo = OperatorInfo { Pos = { 486.747, 285.196, }, },
},
Bitmap2 = BitmapMask {
Inputs = {
MaskWidth = Input { Value = 1920, },
MaskHeight = Input { Value = 1080, },
PixelAspect = Input { Value = { 1, 1, }, },
ClippingMode = Input { Value = FuID { "None", }, },
Image = Input {
SourceOp = "Background1",
Source = "Output",
},
High = Input { Value = 0.85, },
},
ViewInfo = OperatorInfo { Pos = { 399.203, 285.196, }, },
},
},
}
Re: Math Error When Merging Masks

Posted:
Tue Oct 06, 2015 12:18 pm
by Chad Capeland
David Stringham wrote:Okay, fine, but that IS the RGB output. I just added a ChannelBooleans tool in between the first Merge and the Blur to copy the alpha into the RGB channels. No luck.
Because the Bmp turned your RGBA image back into Alpha.
Re: Math Error When Merging Masks

Posted:
Tue Oct 06, 2015 3:07 pm
by David Stringham
Ah, that had crossed my mind before I added the ChannelBool, but somehow I didn't make the connection to the one already on there. I switched the ChannelBool to after the Bitmap and nothing. So I got rid of both of the tools, added a ColorCurves, and inverted the values that way. Again, same result.
Any idea on how to get the matte into a form that Fusion will like?
Re: Math Error When Merging Masks

Posted:
Tue Oct 06, 2015 7:45 pm
by Chad Capeland
So your two images are both R=G=B, A=1, and you set the ApplyMode to Multiply? That works for me.