In light of the Coronavirus crisis, please help make sure nothing stands in the way of social distancing in the VFX industry.

This petition asks the MPAA to act accordingly:


Sign the petition on Change.org

Be safe, everyone.

Psyop's Cryptomatte In Fusion

User avatar
vklidu
Posts: 5
Joined: Thu Nov 07, 2019 1:53 am

Re: Psyop's Cryptomatte In Fusion

#241

Post by vklidu » Thu Nov 07, 2019 2:39 am

From what I red about Cryptomatte I think I should be able to get more precise result on edge, right?
I'm new to Fusion, so is there anything I do wrong?
Thank you for advice.

OpenEXR is from Blender.
Edit: Comp is now Fusion 9.0.2 (same result)
Screen Shot 2019-11-09 at 20.20.46.png
Data COMP+EXR
Archive.zip
You do not have the required permissions to view the files attached to this post.
Last edited by vklidu on Sat Nov 09, 2019 11:29 am, edited 1 time in total.

Tags:

User avatar
AndrewHazelden
Fusionator
Posts: 1589
Joined: Fri Apr 03, 2015 3:20 pm
Answers: 8
Location: West Dover, Nova Scotia, Canada
Been thanked: 2 times
Contact:

Re: Psyop's Cryptomatte In Fusion

#242

Post by AndrewHazelden » Thu Nov 07, 2019 2:44 am

Hi @vklidu.

Is there a specific reason you are running Fusion v9.0.1?

The free Fusion v9.0.2 update added a lot of improvements that you'd likely benefit from having such as improved EXR support via the EXRIO library, reduced memory leaks for fuses, and UI Manager support for custom scripted GUIs that would allow you to run the Steakunderwater Reactor package manager. :)

User avatar
vklidu
Posts: 5
Joined: Thu Nov 07, 2019 1:53 am

Re: Psyop's Cryptomatte In Fusion

#243

Post by vklidu » Thu Nov 07, 2019 2:55 am

@AndrewHazelden: I could not find update, so thanks for the link :) . I have installed Reactor that I used to install Cryptomatte, but to be clear - Fusion asked me for some missing files, so I followed cryptomatte's manual to install files manually. Probably faster if you can open my comp to see if you get the same result on your side too? (if you dont see any clear mistake I did in setup, so I can exclude version influence. Thank you

User avatar
Midgardsormr
Fusionator
Posts: 1601
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 11
Location: Los Angeles, CA, USA
Been thanked: 51 times
Contact:

Re: Psyop's Cryptomatte In Fusion

#244

Post by Midgardsormr » Thu Nov 07, 2019 9:34 am

You'll always get some edge contamination of that kind with an antialiased mask. Wherever it's being blended along that edge, the color correction will be weaker. Thus, fringing. You can get a slightly better result by extracting the object you want to color correct from the rendered image, using the Crypto output as the extraction alpha, then do the color correct with the pre-divide/post-multiply switch on. Then Merge the result back over the render.

You could go a step further and reduce the influence of the background objects in the render by performing a mathematical un-merge. I don't have that procedure in my head right now, and I lack the energy right this minute to track it down, so instead I'll just tag @Kristof, because he's the one who taught me how to do it.

User avatar
vklidu
Posts: 5
Joined: Thu Nov 07, 2019 1:53 am

Re: Psyop's Cryptomatte In Fusion

#245

Post by vklidu » Thu Nov 07, 2019 2:12 pm

I don't think cryptomatte should be sick from these edges issues. Also I just compared matte and result and it seems like matte is not applied properly ... any reason for that?

To make it more visible I marked edge by pink stroke
(clicking on image to see comparison-anim gif)
Screen-Shot-2019-11-07-at-22.58.25.gif
Screen Shot 2019-11-07 at 22.58.25 copy2.png
You do not have the required permissions to view the files attached to this post.

User avatar
Kristof
Fusionista
Posts: 708
Joined: Thu Aug 07, 2014 1:30 pm
Answers: 1
Been thanked: 8 times

Re: Psyop's Cryptomatte In Fusion

#246

Post by Kristof » Tue Nov 12, 2019 6:53 am

Hey @Midgardsormr ! Here I am. Try this (Fu 9 only). Sampling for crypto and beauty needs to be the same, if you would render them in a separate render layer. Which is next to impossible with a biased render engine, I guess. But should be fine in most cases.

Code: Select all

{
	Tools = ordered() {
		unMerge_1 = MacroOperator {
			CtrlWZoom = false,
			Inputs = ordered() {
				MainInput1 = InstanceInput {
					SourceOp = "divide_rgb_a_1",
					Source = "Background",
				},
				MainInput2 = InstanceInput {
					SourceOp = "bmp_setup_pub",
					Source = "Image",
					Name = "Matte",
				},
				Input1 = InstanceInput {
					SourceOp = "bmp_setup_pub",
					Source = "Channel",
					Name = "Matte Channel",
				}
			},
			Outputs = {
				Output1 = InstanceOutput {
					SourceOp = "over_core_1",
					Source = "Output",
				}
			},
			ViewInfo = GroupInfo { Pos = { -1320, 3052.5 } },
			Tools = ordered() {
				PipeRouter11 = PipeRouter {
					CtrlWShown = false,
					Inputs = {
						Input = Input {
							SourceOp = "core_1",
							Source = "Output",
						},
					},
					ViewInfo = PipeRouterInfo { Pos = { 467.5, 10.15 } },
				},
				over_core_1 = Merge {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Background = Input {
							SourceOp = "multiply_rgba_a_2",
							Source = "Output",
						},
						Foreground = Input {
							SourceOp = "PipeRouter11",
							Source = "Output",
						},
						PerformDepthMerge = Input { Value = 0, },
					},
					ViewInfo = OperatorInfo { Pos = { 467.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				pipe_13 = PipeRouter {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Input = Input {
							SourceOp = "bmp_setup_pub",
							Source = "Mask",
						},
					},
					ViewInfo = PipeRouterInfo { Pos = { 357.5, 43.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				multiply_rgba_a_2 = ChannelBoolean {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Operation = Input { Value = 6, },
						ToRed = Input { Value = 3, },
						ToGreen = Input { Value = 3, },
						ToBlue = Input { Value = 3, },
						Background = Input {
							SourceOp = "clip_black_2",
							Source = "Output",
						},
						Foreground = Input {
							SourceOp = "pipe_13",
							Source = "Output",
						},
						Comments = Input { Value = "Publish Output.", },
					},
					ViewInfo = OperatorInfo { Pos = { 357.5, 142.15 } },
					Colors = {
						TileColor = { R = 0, G = 1, B = 0 },
						TextColor = { R = 0, G = 0, B = 0 },
					}
				},
				clip_black_2 = BrightnessContrast {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						ClipBlack = Input { Value = 1, },
						Input = Input {
							SourceOp = "cleanPlate_1",
							Source = "Output",
						},
					},
					ViewInfo = OperatorInfo { Pos = { 247.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				invert_a_1 = BitmapMask {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Invert = Input { Value = 1, },
						OutputSize = Input { Value = FuID { "Custom" }, },
						MaskWidth = Input {
							Value = 1920,
							Expression = "multiply_rgba_a_1.Background.OriginalWidth",
						},
						MaskHeight = Input {
							Value = 1080,
							Expression = "multiply_rgba_a_1.Background.OriginalHeight",
						},
						PixelAspect = Input {
							Value = { 1, 1 },
							Expression = "Point(multiply_rgba_a_1.Background.XScale, multiply_rgba_a_1.Background.YScale)",
						},
						ClippingMode = Input { Value = FuID { "None" }, },
						Image = Input {
							SourceOp = "rank_a_2",
							Source = "Output",
						},
						Comments = Input { Value = "Publish \"Invert\".", },
					},
					ViewInfo = OperatorInfo { Pos = { 137.5, 76.15 } },
					Colors = {
						TileColor = { R = 0, G = 1, B = 0 },
						TextColor = { R = 0, G = 0, B = 0 },
					}
				},
				clip_black = BrightnessContrast {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Alpha = Input { Value = 1, },
						ClipBlack = Input { Value = 1, },
						Input = Input {
							SourceOp = "divide_rgb_a_1",
							Source = "Output",
						},
					},
					ViewInfo = OperatorInfo { Pos = { -302.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				multiply_rgba_a_1 = ChannelBoolean {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Operation = Input { Value = 6, },
						ToRed = Input { Value = 3, },
						ToGreen = Input { Value = 3, },
						ToBlue = Input { Value = 3, },
						Background = Input {
							SourceOp = "copy_a_a_1",
							Source = "Output",
						},
						Foreground = Input {
							SourceOp = "rank_a_1",
							Source = "Output",
						},
					},
					ViewInfo = OperatorInfo { Pos = { -82.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				alphaDivide_1 = AlphaDivide {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Input = Input {
							SourceOp = "multiply_rgba_a_1",
							Source = "Output",
						},
					},
					ViewInfo = OperatorInfo { Pos = { 27.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				cleanPlate_1 = CleanPLate {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						GrowEdges = Input { Value = 0.0015, },
						InsideFill = Input { Value = 1, },
						HoldTime = Input { Value = 1001, },
						["Garbage.Matte"] = Input {
							SourceOp = "invert_a_1",
							Source = "Mask",
						},
						Input = Input {
							SourceOp = "alphaDivide_1",
							Source = "Output",
						},
					},
					ViewInfo = OperatorInfo { Pos = { 137.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				divide_rgb_a_1 = ChannelBoolean {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Operation = Input { Value = 7, },
						ToRed = Input { Value = 3, },
						ToGreen = Input { Value = 3, },
						ToBlue = Input { Value = 3, },
						ToAlpha = Input { Value = 4, },
						Foreground = Input {
							SourceOp = "bmp_setup_pub",
							Source = "Mask",
						},
						Comments = Input { Value = "Publish Input.", },
					},
					ViewInfo = OperatorInfo { Pos = { -467.5, 142.15 } },
					Colors = {
						TileColor = { R = 0, G = 1, B = 0 },
						TextColor = { R = 0, G = 0, B = 0 },
					}
				},
				copy_a_a_1 = ChannelBoolean {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						ToRed = Input { Value = 4, },
						ToGreen = Input { Value = 4, },
						ToBlue = Input { Value = 4, },
						Background = Input {
							SourceOp = "clip_black",
							Source = "Output",
						},
						Foreground = Input {
							SourceOp = "bmp_setup_pub",
							Source = "Mask",
						},
					},
					ViewInfo = OperatorInfo { Pos = { -192.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				rank_a_1 = RankFilter {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Rank = Input { Value = 0, },
						Input = Input {
							SourceOp = "bmp_setup_pub",
							Source = "Mask",
						},
						Comments = Input { Value = "Publish \"Size\".", },
					},
					ViewInfo = OperatorInfo { Pos = { -192.5, 109.15 } },
					Colors = {
						TileColor = { R = 0, G = 1, B = 0 },
						TextColor = { R = 0, G = 0, B = 0 },
					}
				},
				rank_a_2 = RankFilter {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Rank = Input { Value = 1, },
						Input = Input {
							SourceOp = "rank_a_1",
							Source = "Output",
						},
						Comments = Input { Value = "Publish \"Size\".", },
					},
					ViewInfo = OperatorInfo { Pos = { -82.5, 76.15 } },
					Colors = {
						TileColor = { R = 0, G = 1, B = 0 },
						TextColor = { R = 0, G = 0, B = 0 },
					}
				},
				bmp_setup_pub = BitmapMask {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						OutputSize = Input { Value = FuID { "Custom" }, },
						MaskWidth = Input {
							Value = 1920,
							Expression = "divide_rgb_a_1.Background.OriginalWidth",
						},
						MaskHeight = Input {
							Value = 1080,
							Expression = "divide_rgb_a_1.Background.OriginalHeight",
						},
						PixelAspect = Input {
							Value = { 1, 1 },
							Expression = "Point(divide_rgb_a_1.Background.XScale, divide_rgb_a_1.Background.YScale)",
						},
						ClippingMode = Input { Value = FuID { "None" }, },
						Comments = Input { Value = "Publish Input and \"Channel\".", },
					},
					ViewInfo = OperatorInfo { Pos = { -467.5, 43.15 } },
					Colors = {
						TileColor = { R = 0, G = 1, B = 0 },
						TextColor = { R = 0, G = 0, B = 0 },
					}
				},
				core_1 = Custom {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						LUTIn1 = Input {
							SourceOp = "CustomTool4LUTIn1",
							Source = "Value",
						},
						LUTIn2 = Input {
							SourceOp = "CustomTool4LUTIn2",
							Source = "Value",
						},
						LUTIn3 = Input {
							SourceOp = "CustomTool4LUTIn3",
							Source = "Value",
						},
						LUTIn4 = Input {
							SourceOp = "CustomTool4LUTIn4",
							Source = "Value",
						},
						Intermediate1 = Input { Value = "if( a2 => 0.999999 , 1 , 0 )", },
						RedExpression = Input { Value = "c1 * i1", },
						GreenExpression = Input { Value = "c1 * i1", },
						BlueExpression = Input { Value = "c1 * i1", },
						AlphaExpression = Input { Value = "c1 * i1", },
						Image1 = Input {
							SourceOp = "divide_rgb_a_1",
							Source = "Output",
						},
						Image2 = Input {
							SourceOp = "bmp_setup_pub",
							Source = "Mask",
						},
					},
					ViewInfo = OperatorInfo { Pos = { -302.5, 10.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				}
			},
		},
		CustomTool4LUTIn1 = LUTBezier {
			KeyColorSplines = {
				[0] = {
					[0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
					[1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
				}
			},
			SplineColor = { Red = 204, Green = 0, Blue = 0 },
		},
		CustomTool4LUTIn2 = LUTBezier {
			KeyColorSplines = {
				[0] = {
					[0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
					[1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
				}
			},
			SplineColor = { Red = 0, Green = 204, Blue = 0 },
		},
		CustomTool4LUTIn3 = LUTBezier {
			KeyColorSplines = {
				[0] = {
					[0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
					[1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
				}
			},
			SplineColor = { Red = 0, Green = 0, Blue = 204 },
		},
		CustomTool4LUTIn4 = LUTBezier {
			KeyColorSplines = {
				[0] = {
					[0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
					[1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
				}
			},
			SplineColor = { Red = 204, Green = 204, Blue = 204 },
		}
	},
	ActiveTool = "unMerge_1"
}

User avatar
vklidu
Posts: 5
Joined: Thu Nov 07, 2019 1:53 am

Re: Psyop's Cryptomatte In Fusion

#247

Post by vklidu » Tue Nov 12, 2019 1:14 pm

@Midgardsormr: ... isolate object like this? Result is exactly the same on pixel.
Also from this screen it looks like alpha is correct but, CC tool is not touching some pixels on edge ... it doesn't make a sence to me, sorry if I don't see something evident.

@Krystof: I hope someone would be so patient to explain me (or direct me) what your macro does or how to use it ... otherwise I'm totaly lost from what is going here. Sorry and thanks :)
Screen Shot 2019-11-12 at 21.39.34.png
Archive.zip
You do not have the required permissions to view the files attached to this post.

User avatar
Midgardsormr
Fusionator
Posts: 1601
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 11
Location: Los Angeles, CA, USA
Been thanked: 51 times
Contact:

Re: Psyop's Cryptomatte In Fusion

#248

Post by Midgardsormr » Tue Nov 12, 2019 4:26 pm

The edge contamination is coming from the background shape. Kristof's UnMerge method will remove that contamination (to a limited extent) by performing a reverse Merge operation of the foreground (your target shape) off of the background.

Code: Select all

{
	Tools = ordered() {
		Loader1 = Loader {
			Clips = {
				Clip {
					ID = "Clip1",
					Filename = "comp:test_CryptoBlender.exr",
					FormatID = "OpenEXRFormat",
					StartFrame = -1,
					LengthSetManually = true,
					TrimIn = 0,
					TrimOut = 0,
					ExtendFirst = 0,
					ExtendLast = 0,
					Loop = 0,
					AspectMode = 0,
					Depth = 0,
					TimeCode = 0,
					GlobalStart = 0,
					GlobalEnd = 0
				}
			},
			Inputs = {
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				["Clip1.OpenEXRFormat.Channels"] = Input { Value = 1, },
				["Clip1.OpenEXRFormat.RedName"] = Input { Value = FuID { "View Layer.Combined.R" }, },
				["Clip1.OpenEXRFormat.GreenName"] = Input { Value = FuID { "View Layer.Combined.G" }, },
				["Clip1.OpenEXRFormat.BlueName"] = Input { Value = FuID { "View Layer.Combined.B" }, },
				["Clip1.OpenEXRFormat.AlphaName"] = Input { Value = FuID { "View Layer.Combined.A" }, },
			},
			ViewInfo = OperatorInfo { Pos = { 490.683, 214.484 } },
		},
		Cryptomatte1 = Fuse.Cryptomatte {
			CtrlWZoom = false,
			Inputs = {
				UseObject = Input { Value = 1, },
				Input = Input {
					SourceOp = "Loader1",
					Source = "Output",
				},
				Locator = Input { Value = { 0.446116394927536, 0.261618788178966 }, },
				KeyableSurface = Input { Disabled = true, },
				ViewMode = Input { Disabled = true, },
				MatteOnly = Input { Value = 1, },
				MatteList = Input { Value = "\"Torus\"", },
				CryptoLayerSlider = Input { Value = 1, },
				CryptoLayer = Input { Value = "View Layer.CryptoObject", },
			},
			ViewInfo = OperatorInfo { Pos = { 587.025, 283.025 } },
			Version = 121
		},
		ColorCurves1 = ColorCurves {
			PickColor = true,
			Inputs = {
				ColorSpace = Input { Value = 2, },
				EditGreen = Input { Value = 0, },
				EditBlue = Input { Value = 0, },
				EditAlpha = Input { Value = 0, },
				Red = Input {
					SourceOp = "ColorCurves1Hue",
					Source = "Value",
				},
				Green = Input {
					SourceOp = "ColorCurves1Lightness",
					Source = "Value",
				},
				Blue = Input {
					SourceOp = "ColorCurves1Saturation",
					Source = "Value",
				},
				Alpha = Input {
					SourceOp = "ColorCurves1Alpha",
					Source = "Value",
				},
				NumberOfSamplesOnMatchCurve = Input { Value = 64, },
				IgnoreTransparent = Input { Value = 1, },
				PreDividePostMultiply = Input { Value = 1, },
				Input = Input {
					SourceOp = "over_core_1",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 703.599, 278.472 } },
			Tools = {
				ColorCurves1Hue = LUTBezier {
					KeyColorSplines = {
						[0] = {
							[0] = { 0, RH = { 0.333333333333333, 0.2 }, Flags = { Linear = true } },
							[1] = { 0.6, LH = { 0.666666666666667, 0.4 }, Flags = { Linear = true } }
						}
					},
					SplineColor = { Red = 255, Green = 52, Blue = 52 },
					CtrlWShown = false,
					NameSet = true,
				},
				ColorCurves1Alpha = LUTBezier {
					KeyColorSplines = {
						[0] = {
							[0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
							[1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
						}
					},
					SplineColor = { Red = 204, Green = 204, Blue = 204 },
					CtrlWShown = false,
					NameSet = true,
				},
				ColorCurves1Lightness = LUTBezier {
					KeyColorSplines = {
						[0] = {
							[0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
							[1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
						}
					},
					SplineColor = { Red = 0, Green = 255, Blue = 0 },
					CtrlWShown = false,
					NameSet = true,
				},
				ColorCurves1Saturation = LUTBezier {
					KeyColorSplines = {
						[0] = {
							[0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
							[1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
						}
					},
					SplineColor = { Red = 68, Green = 68, Blue = 255 },
					CtrlWShown = false,
					NameSet = true,
				}
			},
		},
		Merge1 = Merge {
			Inputs = {
				Background = Input {
					SourceOp = "Loader1",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "ColorCurves1",
					Source = "Output",
				},
				PerformDepthMerge = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 725.573, 212.472 } },
		},
		unMerge_1 = MacroOperator {
			Inputs = ordered() {
				MainInput1 = InstanceInput {
					SourceOp = "divide_rgb_a_1",
					Source = "Background",
				},
				MainInput2 = InstanceInput {
					SourceOp = "bmp_setup_pub",
					Source = "Image",
					Name = "Matte",
				},
				Input1 = InstanceInput {
					SourceOp = "bmp_setup_pub",
					Source = "Channel",
					Name = "Matte Channel",
				}
			},
			Outputs = {
				Output1 = InstanceOutput {
					SourceOp = "over_core_1",
					Source = "Output",
				}
			},
			ViewInfo = GroupInfo { Pos = { 702.331, 335.816 } },
			Tools = ordered() {
				PipeRouter11 = PipeRouter {
					CtrlWShown = false,
					Inputs = {
						Input = Input {
							SourceOp = "core_1",
							Source = "Output",
						},
					},
					ViewInfo = PipeRouterInfo { Pos = { 467.5, 10.15 } },
				},
				over_core_1 = Merge {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Background = Input {
							SourceOp = "multiply_rgba_a_2",
							Source = "Output",
						},
						Foreground = Input {
							SourceOp = "PipeRouter11",
							Source = "Output",
						},
						PerformDepthMerge = Input { Value = 0, },
					},
					ViewInfo = OperatorInfo { Pos = { 467.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				pipe_13 = PipeRouter {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Input = Input {
							SourceOp = "bmp_setup_pub",
							Source = "Mask",
						},
					},
					ViewInfo = PipeRouterInfo { Pos = { 357.5, 43.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				multiply_rgba_a_2 = ChannelBoolean {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Operation = Input { Value = 6, },
						ToRed = Input { Value = 3, },
						ToGreen = Input { Value = 3, },
						ToBlue = Input { Value = 3, },
						Background = Input {
							SourceOp = "clip_black_2",
							Source = "Output",
						},
						Foreground = Input {
							SourceOp = "pipe_13",
							Source = "Output",
						},
						Comments = Input { Value = "Publish Output.", },
					},
					ViewInfo = OperatorInfo { Pos = { 357.5, 142.15 } },
					Colors = {
						TileColor = { R = 0, G = 1, B = 0 },
						TextColor = { R = 0, G = 0, B = 0 },
					}
				},
				clip_black_2 = BrightnessContrast {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						ClipBlack = Input { Value = 1, },
						Input = Input {
							SourceOp = "cleanPlate_1",
							Source = "Output",
						},
					},
					ViewInfo = OperatorInfo { Pos = { 247.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				invert_a_1 = BitmapMask {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Invert = Input { Value = 1, },
						OutputSize = Input { Value = FuID { "Custom" }, },
						MaskWidth = Input {
							Value = 480,
							Expression = "multiply_rgba_a_1.Background.OriginalWidth",
						},
						MaskHeight = Input {
							Value = 270,
							Expression = "multiply_rgba_a_1.Background.OriginalHeight",
						},
						PixelAspect = Input {
							Value = { 1, 1 },
							Expression = "Point(multiply_rgba_a_1.Background.XScale, multiply_rgba_a_1.Background.YScale)",
						},
						ClippingMode = Input { Value = FuID { "None" }, },
						Image = Input {
							SourceOp = "rank_a_2",
							Source = "Output",
						},
						Comments = Input { Value = "Publish \"Invert\".", },
					},
					ViewInfo = OperatorInfo { Pos = { 137.5, 76.15 } },
					Colors = {
						TileColor = { R = 0, G = 1, B = 0 },
						TextColor = { R = 0, G = 0, B = 0 },
					}
				},
				clip_black = BrightnessContrast {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Alpha = Input { Value = 1, },
						ClipBlack = Input { Value = 1, },
						Input = Input {
							SourceOp = "divide_rgb_a_1",
							Source = "Output",
						},
					},
					ViewInfo = OperatorInfo { Pos = { -302.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				multiply_rgba_a_1 = ChannelBoolean {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Operation = Input { Value = 6, },
						ToRed = Input { Value = 3, },
						ToGreen = Input { Value = 3, },
						ToBlue = Input { Value = 3, },
						Background = Input {
							SourceOp = "copy_a_a_1",
							Source = "Output",
						},
						Foreground = Input {
							SourceOp = "rank_a_1",
							Source = "Output",
						},
					},
					ViewInfo = OperatorInfo { Pos = { -82.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				alphaDivide_1 = AlphaDivide {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Input = Input {
							SourceOp = "multiply_rgba_a_1",
							Source = "Output",
						},
					},
					ViewInfo = OperatorInfo { Pos = { 27.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				cleanPlate_1 = CleanPLate {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						GrowEdges = Input { Value = 0.0015, },
						InsideFill = Input { Value = 1, },
						HoldTime = Input { Value = 1001, },
						["Garbage.Matte"] = Input {
							SourceOp = "invert_a_1",
							Source = "Mask",
						},
						Input = Input {
							SourceOp = "alphaDivide_1",
							Source = "Output",
						},
					},
					ViewInfo = OperatorInfo { Pos = { 137.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				divide_rgb_a_1 = ChannelBoolean {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Operation = Input { Value = 7, },
						ToRed = Input { Value = 3, },
						ToGreen = Input { Value = 3, },
						ToBlue = Input { Value = 3, },
						ToAlpha = Input { Value = 4, },
						Background = Input {
							SourceOp = "Loader1_1",
							Source = "Output",
						},
						Foreground = Input {
							SourceOp = "bmp_setup_pub",
							Source = "Mask",
						},
						Comments = Input { Value = "Publish Input.", },
					},
					ViewInfo = OperatorInfo { Pos = { -467.5, 142.15 } },
					Colors = {
						TileColor = { R = 0, G = 1, B = 0 },
						TextColor = { R = 0, G = 0, B = 0 },
					}
				},
				copy_a_a_1 = ChannelBoolean {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						ToRed = Input { Value = 4, },
						ToGreen = Input { Value = 4, },
						ToBlue = Input { Value = 4, },
						Background = Input {
							SourceOp = "clip_black",
							Source = "Output",
						},
						Foreground = Input {
							SourceOp = "bmp_setup_pub",
							Source = "Mask",
						},
					},
					ViewInfo = OperatorInfo { Pos = { -192.5, 142.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				},
				rank_a_1 = RankFilter {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Rank = Input { Value = 0, },
						Input = Input {
							SourceOp = "bmp_setup_pub",
							Source = "Mask",
						},
						Comments = Input { Value = "Publish \"Size\".", },
					},
					ViewInfo = OperatorInfo { Pos = { -192.5, 109.15 } },
					Colors = {
						TileColor = { R = 0, G = 1, B = 0 },
						TextColor = { R = 0, G = 0, B = 0 },
					}
				},
				rank_a_2 = RankFilter {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						Rank = Input { Value = 1, },
						Input = Input {
							SourceOp = "rank_a_1",
							Source = "Output",
						},
						Comments = Input { Value = "Publish \"Size\".", },
					},
					ViewInfo = OperatorInfo { Pos = { -82.5, 76.15 } },
					Colors = {
						TileColor = { R = 0, G = 1, B = 0 },
						TextColor = { R = 0, G = 0, B = 0 },
					}
				},
				bmp_setup_pub = BitmapMask {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						OutputSize = Input { Value = FuID { "Custom" }, },
						MaskWidth = Input {
							Value = 480,
							Expression = "divide_rgb_a_1.Background.OriginalWidth",
						},
						MaskHeight = Input {
							Value = 270,
							Expression = "divide_rgb_a_1.Background.OriginalHeight",
						},
						PixelAspect = Input {
							Value = { 1, 1 },
							Expression = "Point(divide_rgb_a_1.Background.XScale, divide_rgb_a_1.Background.YScale)",
						},
						ClippingMode = Input { Value = FuID { "None" }, },
						Image = Input {
							SourceOp = "Cryptomatte1",
							Source = "Output",
						},
						Comments = Input { Value = "Publish Input and \"Channel\".", },
					},
					ViewInfo = OperatorInfo { Pos = { -467.5, 43.15 } },
					Colors = {
						TileColor = { R = 0, G = 1, B = 0 },
						TextColor = { R = 0, G = 0, B = 0 },
					}
				},
				core_1 = Custom {
					CtrlWShown = false,
					NameSet = true,
					Inputs = {
						LUTIn1 = Input {
							SourceOp = "CustomTool4LUTIn1",
							Source = "Value",
						},
						LUTIn2 = Input {
							SourceOp = "CustomTool4LUTIn2",
							Source = "Value",
						},
						LUTIn3 = Input {
							SourceOp = "CustomTool4LUTIn3",
							Source = "Value",
						},
						LUTIn4 = Input {
							SourceOp = "CustomTool4LUTIn4",
							Source = "Value",
						},
						Intermediate1 = Input { Value = "if( a2 => 0.999999 , 1 , 0 )", },
						RedExpression = Input { Value = "c1 * i1", },
						GreenExpression = Input { Value = "c1 * i1", },
						BlueExpression = Input { Value = "c1 * i1", },
						AlphaExpression = Input { Value = "c1 * i1", },
						Image1 = Input {
							SourceOp = "divide_rgb_a_1",
							Source = "Output",
						},
						Image2 = Input {
							SourceOp = "bmp_setup_pub",
							Source = "Mask",
						},
					},
					ViewInfo = OperatorInfo { Pos = { -302.5, 10.15 } },
					Colors = { TextColor = { R = 0, G = 0, B = 0 }, }
				}
			},
		},
		CustomTool4LUTIn1 = LUTBezier {
			KeyColorSplines = {
				[0] = {
					[0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
					[1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
				}
			},
			SplineColor = { Red = 204, Green = 0, Blue = 0 },
		},
		CustomTool4LUTIn2 = LUTBezier {
			KeyColorSplines = {
				[0] = {
					[0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
					[1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
				}
			},
			SplineColor = { Red = 0, Green = 204, Blue = 0 },
		},
		CustomTool4LUTIn3 = LUTBezier {
			KeyColorSplines = {
				[0] = {
					[0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
					[1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
				}
			},
			SplineColor = { Red = 0, Green = 0, Blue = 204 },
		},
		CustomTool4LUTIn4 = LUTBezier {
			KeyColorSplines = {
				[0] = {
					[0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
					[1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
				}
			},
			SplineColor = { Red = 204, Green = 204, Blue = 204 },
		},
		Loader1_1 = Loader {
			Clips = {
				Clip {
					ID = "Clip1",
					Filename = "comp:test_CryptoBlender.exr",
					FormatID = "OpenEXRFormat",
					StartFrame = -1,
					LengthSetManually = true,
					TrimIn = 0,
					TrimOut = 0,
					ExtendFirst = 0,
					ExtendLast = 0,
					Loop = 0,
					AspectMode = 0,
					Depth = 0,
					TimeCode = 0,
					GlobalStart = 0,
					GlobalEnd = 0
				}
			},
			Inputs = {
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				["Clip1.OpenEXRFormat.Channels"] = Input { Value = 1, },
				["Clip1.OpenEXRFormat.RedName"] = Input { Value = FuID { "View Layer.Combined.R" }, },
				["Clip1.OpenEXRFormat.GreenName"] = Input { Value = FuID { "View Layer.Combined.G" }, },
				["Clip1.OpenEXRFormat.BlueName"] = Input { Value = FuID { "View Layer.Combined.B" }, },
				["Clip1.OpenEXRFormat.AlphaName"] = Input { Value = FuID { "View Layer.Combined.A" }, },
			},
			ViewInfo = OperatorInfo { Pos = { 544.914, 334.529 } },
		}
	}
}

User avatar
vklidu
Posts: 5
Joined: Thu Nov 07, 2019 1:53 am

Re: Psyop's Cryptomatte In Fusion

#249

Post by vklidu » Thu Nov 14, 2019 2:19 am

@Midgardsormr: Thank you. I agree - colour of edge pixels is contaminated by background, but I just can't see a reason for such strong colour difference on some edge pixels. They just looks like a pixels that are not counted for recolouring. Yesterday I tried use CC instead CCv with (almost the same colour correction I beleave) but with much more expected result. So it seems like its CCv tool produce this. (So probably I should ask in another thread. If you have admin power to split this part of my conversation in separate one, I would appreciate that, since this doesn't seems to be issue related to cryptomatte.) The same result I get from Photoshop HUE adjustment (as CC).

CCv on the left / CC on the right
Screen Shot 2019-11-13 at 19.48.22.png

@Midgardsormr: OMG ... what the hell is this UnMerge method ... the result looks AWESOME !
Time to go study how it works. Thank you very much for your time guys.
Screen Shot 2019-11-14 at 11.15.13.png
You do not have the required permissions to view the files attached to this post.

User avatar
Kristof
Fusionista
Posts: 708
Joined: Thu Aug 07, 2014 1:30 pm
Answers: 1
Been thanked: 8 times

Re: Psyop's Cryptomatte In Fusion

#250

Post by Kristof » Thu Nov 14, 2019 3:31 am

Thanks :) Glad you like it. I'll try to dedicate some time to writing an explanation...

User avatar
Jack John
Posts: 9
Joined: Fri Nov 01, 2019 7:26 am
Real name: Jack

Re: Psyop's Cryptomatte In Fusion

#251

Post by Jack John » Sun Nov 17, 2019 5:17 pm

***post suspended***

1. Please don't hijack other people's topics,
2. Contact me.

Thanks,
your friendly neighbourhood admin

User avatar
bowserlm
Fusionista
Posts: 344
Joined: Sat Apr 28, 2018 3:44 pm

Re: Psyop's Cryptomatte In Fusion

#252

Post by bowserlm » Wed Feb 05, 2020 5:26 pm

Having issues with Blender Cryptomatte's working in Fusion 9.0.2.

There is a thread on one of the Blender dev forums and they mention updating to the latest Cryptomatte version which is 1.2.5 which has some Blender updates. The version in Reactor is 1.21.

I've tried downloading the files and installing manually from their Github here -- https://github.com/Psyop/Cryptomatte/tree/master/fusion

But now I'm just getting this error when I launch Fusion

https://share.getcloudapp.com/kpum02Pz

User avatar
Kristof
Fusionista
Posts: 708
Joined: Thu Aug 07, 2014 1:30 pm
Answers: 1
Been thanked: 8 times

Re: Psyop's Cryptomatte In Fusion

#253

Post by Kristof » Thu Feb 06, 2020 12:11 am

I'll be seeing Cédric soon and will check with him what can be done. One of us will report back in here.

User avatar
Cedric
Fusioneer
Posts: 51
Joined: Tue Sep 13, 2016 7:26 am
Answers: 1
Location: Ghent

Re: Psyop's Cryptomatte In Fusion

#254

Post by Cedric » Sun Feb 09, 2020 9:17 am

Hi all, @bowserlm

I recognize this error. I think this is due to way of how you download the repository from the website.
Use the "Download .ZIP" option when clicking on the "Clone or Download" green button on the repository home page: https://github.com/Psyop/Cryptomatte.
This should fix your problem, just extract the ZIP archive and point your Fusion UserData: path mapping to the fusion directory of the repository.

Keep me posted!

Cheers
Cedric

User avatar
bowserlm
Fusionista
Posts: 344
Joined: Sat Apr 28, 2018 3:44 pm

Re: Psyop's Cryptomatte In Fusion

#255

Post by bowserlm » Tue Feb 11, 2020 10:48 am

Perhaps I don't know how to correctly do the Path Map stuff...

The UserData one doesn't seem to be editable, and if I create my own and call it UserData as soon as I close the pref pane and open it again it's gone.

https://share.getcloudapp.com/RBud5l0b

Added in 14 minutes 31 seconds:
Also, is there a reason we're several versions behind on the Cryptomatte version on Reactor? Why don't we just have the latest one on there?