Page 1 of 1

Z to alpha via Channel Booleans?

PostPosted: Thu Nov 07, 2019 12:19 am
by Dazzer
Hi folks,

I've been banging my head against the wall with this for a couple of hours!

I'm trying to copy the steps in this tutorial (see below), but to no avail.

I'm talking about the bit starting at 17:47.

He uses a Channel Booleans to link the value of A to Z.

However, when i try to do the same thing, it does indeed link A to Z, but A only changes by a very small amount, so it's not actually equivalent.

Here below is a vid of my set-up, you can see at the bottom that the values of A and Z aren't tied together like in his demo.

I would like to also post the code (copy / paste) version of my comp like Bryan did for me a couple of times, but i don't know how to do that, could anyone explain how that works? (where to copy the "code" from?)




Re: Z to alpha via Channel Booleans?

PostPosted: Thu Nov 07, 2019 1:17 am
by Jim Hall
Which is why in the tutorial he uses a Brightness/Contrast node to adjust the Black/White point range. Setting the low point to approx -45 and high point to -6.

Re: Z to alpha via Channel Booleans?

PostPosted: Thu Nov 07, 2019 1:49 am
by xunile
For the code copying, you just select the nodes of your comp in Fusion and hit ctrl-c. You then hit the "Code" button in your post then paste the code in between the code brackets.

Re: Z to alpha via Channel Booleans?

PostPosted: Thu Nov 07, 2019 7:21 am
by Dazzer
@Xunile: doh!............ that's was obvious, thanks!

@Jim Hall: in the tutorial, you see him mousing over and getting the Z = A behaviour already with the Channel Booleans, before attaching the Brightness/Contrast node.

That's the first hurdling which i'm stumbling at!



Code: Select all
{
   Tools = ordered() {
      ImagePlane3D1 = ImagePlane3D {
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.147, },
            ["Transform3DOp.Translate.Z"] = Input { Value = -10.43, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -90, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 4.41, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 90, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 776, 56.4545 } },
      },
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "ImagePlane3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 910, 55.2424 } },
      },
      Renderer3D1 = Renderer3D {
         CustomData = {
            ToolVersion = 2
         },
         Inputs = {
            ["RendererOpenGL.AntiAliasing.Presets.Aux.Multisampling.HighQuality.SampleCount"] = Input { Value = 3, },
            ["RendererOpenGL.AntiAliasing.Presets.Color.Supersampling.HighQuality.RateY"] = Input { Value = 3, },
            ["RendererOpenGL.AntiAliasing.Presets.Aux.Supersampling.HighQuality.RateX"] = Input { Value = 3, },
            ["RendererOpenGL.AntiAliasing.Presets.Color.Multisampling.HighQuality.SampleCount"] = Input { Value = 3, },
            ["RendererOpenGL.AccumQuality"] = Input { Value = 32, },
            ["RendererOpenGL.AntiAliasing.Channels.RGBA.HighQuality.Enable"] = Input { Value = 1, },
            ["RendererOpenGL.AntiAliasing.Presets.Color.Multisampling.LowQuality.SampleCount"] = Input { Value = 2, },
            ["RendererOpenGL.AntiAliasing.Presets.Aux.Supersampling.HighQuality.RateY"] = Input { Value = 3, },
            ["RendererOpenGL.AntiAliasing.Presets.Color.Supersampling.HighQuality.RateX"] = Input { Value = 3, },
            ["RendererOpenGL.AntiAliasing.Presets.Aux.Multisampling.LowQuality.SampleCount"] = Input { Value = 2, },
            GlobalOut = Input { Value = 150, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            ["RendererSoftware.Channels.Nest"] = Input { Value = 1, },
            ["RendererSoftware.Channels.Z"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 1042, 53.4242 } },
      },
      ChannelBooleans1 = ChannelBoolean {
         CtrlWZoom = false,
         Inputs = {
            ToAlpha = Input { Value = 18, },
            Background = Input {
               SourceOp = "Renderer3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1178, 5.54548 } },
      },
      Camera3D1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 3.3320679395421, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 20.6598508781439, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -8.7707071, },
            ["Transform3DOp.UseTarget"] = Input { Value = 1, },
            ["Transform3DOp.Target.Z"] = Input { Value = -0.43, },
            AoV = Input { Value = 40.9, },
            FLength = Input { Value = 15.9296157935229, },
            ["Stereo.Mode"] = Input { Value = FuID { "OffAxis" }, },
            FilmGate = Input { Value = FuID { "BMD_URSA_4K_16x9" }, },
            ApertureW = Input { Value = 0.831496062992126, },
            ApertureH = Input { Value = 0.467716535433071, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 3, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 3, },
         },
         ViewInfo = OperatorInfo { Pos = { 1035.33, -9.93939 } },
      }
   }
}

Re: Z to alpha via Channel Booleans?

PostPosted: Thu Nov 07, 2019 7:39 am
by Tanawat Wattanachinda
your node is clip to 0-1 range. you need 32 bit float to go higher than 1.
change node to process in 32bits

Re: Z to alpha via Channel Booleans?

PostPosted: Thu Nov 07, 2019 7:46 am
by Dazzer
OK!

Where do i change that setting? In one of the nodes (which one?) or somewhere else?

Sorry, i never messed around with that setting before!

Re: Z to alpha via Channel Booleans?

PostPosted: Thu Nov 07, 2019 1:08 pm
by Jim Hall
In the 3dRenderer Image settings you can change the bit depth.

Re: Z to alpha via Channel Booleans?

PostPosted: Thu Nov 07, 2019 3:50 pm
by Dazzer
Many thanks guys, that fixed it, gotta read up on bit depth!

Re: Z to alpha via Channel Booleans?

PostPosted: Thu Nov 07, 2019 4:16 pm
by Bryan Ray
Didn't bother to watch the tut, but I thought I'd point out that there's a depth mode in the LumaKeyer. Skip the Brightness/Contrast and the ChannelBooleans, and sample your ranges right out of the Viewer.

Code: Select all
{
   Tools = ordered() {
      Renderer3D1 = Renderer3D {
         CtrlWZoom = false,
         CustomData = {
            ToolVersion = 2,
         },
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL" }, },
            ["RendererOpenGL.Channels.Nest"] = Input { Value = 1, },
            ["RendererOpenGL.Channels.Z"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 570, 222 } },
      },
      Shape3D1 = Shape3D {
         Inputs = {
            ["Transform3DOp.Rotate.X"] = Input { Value = -80, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, }
         },
         ViewInfo = OperatorInfo { Pos = { 460, 222 } },
      },
      LumaKeyer1 = LumaKeyer {
         Inputs = {
            Channel = Input { Value = 7, },
            High = Input { Value = -1.78630006313324, },
            Low = Input { Value = -1.83625018596649, },
            Invert = Input { Value = 1, },
            Input = Input {
               SourceOp = "Renderer3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 705, 215 } },
      }
   }
}

Re: Z to alpha via Channel Booleans?

PostPosted: Thu Nov 07, 2019 9:54 pm
by Dazzer
Even better, thanks Bryan!

Re: Z to alpha via Channel Booleans?

PostPosted: Thu Nov 07, 2019 10:28 pm
by Dazzer
Sorry, just another quickie related to this:

Please take a quick look at the comp below.

In it i've linked the Ray's weight to the image plane z offset.

But imagine i want it to have it so that the rays are very strong in the distance, and as my curly line approaches, they get less strong. How would i go about that?

Is there's some kind of transfer function graph i can edit, so i can completely re-map how the value of the image plane offset effects the Ray's weight?

Maybe i want the rays strong in the distance, then to disappear in the mid distance, then be strong again in the foreground.

So i'm thinking, this could also be done in another, visual way, like in the mini-comp with the two backgrounds, on the right in the comp below.

But then how do you use the output of the luma keyer to modulate some other parameter in Fusion that's already being modulated?

So, i mean, in the example of the Rays, the Background gradient's mini-comp will act as the transfer function in between the z offset and the Ray's strength.

Code: Select all
{
   Tools = ordered() {
      Background1 = Background {
         Inputs = {
            GlobalOut = Input { Value = 200, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 2484, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 318, -37.4848 } },
      },
      ImagePlane3D1 = ImagePlane3D {
         Inputs = {
            ["Transform3DOp.Translate.Z"] = Input {
               SourceOp = "ImagePlane3D1ZOffset",
               Source = "Value",
            },
            ["Transform3DOp.Rotate.X"] = Input { Value = -90, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "Paint1",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 476.667, -27.7879 } },
      },
      ImagePlane3D1ZOffset = BezierSpline {
         SplineColor = { Red = 254, Green = 56, Blue = 46 },
         NameSet = true,
         KeyFrames = {
            [0] = { -1.74, RH = { 35.3333333333333, -0.646666666666667 }, Flags = { Linear = true } },
            [106] = { 1.54, LH = { 70.6666666666667, 0.446666666666667 }, Flags = { Linear = true } }
         }
      },
      Camera3D1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.282, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 1.46, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -19.2, },
            FLength = Input { Value = 18.2123442718302, },
            ["Stereo.Mode"] = Input { Value = FuID { "OffAxis" }, },
            FilmGate = Input { Value = FuID { "BMD_URSA_4K_16x9" }, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
         },
         ViewInfo = OperatorInfo { Pos = { 626, -32.6364 } },
      },
      LumaKeyer1 = LumaKeyer {
         Inputs = {
            Channel = Input { Value = 7, },
            High = Input { Value = -0.4, },
            Low = Input { Value = -3.4, },
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            Input = Input {
               SourceOp = "Renderer3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 884.667, -11.4242 } },
      },
      Merge3D1 = Merge3D {
         Inputs = {
            ["Transform3DOp.Scale.X"] = Input { Value = 10, },
            SceneInput1 = Input {
               SourceOp = "ImagePlane3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 552.667, 59.4848 } },
      },
      Renderer3D1 = Renderer3D {
         CustomData = {
            ToolVersion = 2,
         },
         Inputs = {
            GlobalOut = Input { Value = 200, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            Depth = Input { Value = 4, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            ["RendererSoftware.Channels.Nest"] = Input { Value = 1, },
            ["RendererSoftware.Channels.Z"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 704, 59.4848 } },
      },
      Rays1 = Fuse.OCLRays {
         Inputs = {
            Center = Input { Value = { 0.559405940594059, -3.69298245614035 }, },
            Blend = Input { Value = 0.913, },
            Decay = Input { Value = 0.0031, },
            Weight = Input {
               SourceOp = "ImagePlane3D1ZOffset",
               Source = "Value",
            },
            Image = Input {
               SourceOp = "Renderer3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 886, 64.9394 } },
      },
      Background2_1 = Background {
         Inputs = {
            GlobalOut = Input { Value = 200, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Type = Input { Value = FuID { "Gradient" }, },
            Start = Input { Value = { 0.295285359801489, 0.504424778761062 }, },
            End = Input { Value = { 0.101736972704715, 0.495575221238938 }, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 0 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1056, -52.6364 } },
      },
      Background2 = Background {
         CtrlWZoom = false,
         Inputs = {
            GlobalOut = Input { Value = 200, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Type = Input { Value = FuID { "Gradient" }, },
            Start = Input { Value = { 0.533498759305211, 0.513274336283186 }, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 0 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1063.33, -4.15152 } },
      },
      Paint1 = Paint {
         Inputs = {
            Input = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Paint = Input {
               SourceOp = "PolylineStroke1",
               Source = "Out",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 315.333, 65.5454 } },
      },
      PolylineStroke1 = PolylineStroke {
         Points = {
         },
         IsThreaded = false,
         Brushes = { "SoftBrush" },
         ApplyModes = { "PaintApplyColor" },
         CtrlWZoom = false,
         Inputs = {
            BrushControls = Input { Value = 1, },
            ["SoftBrush.Size"] = Input { Value = 0.1, },
            ["SoftBrush.Softness"] = Input { Value = 0.062, },
            Polyline = Input {
               Value = Polyline {
                  Points = {
                     { X = 0.291044771671295, Y = 0.400000005960464, RX = -0.190833189331642, RY = -0.00517446607048844 },
                     { X = -0.266169160604477, Y = 0.338461548089981, LX = 0.171409851991424, LY = 0.0589751299754581, RX = -0.0410255139062472, RY = -0.0141152039210205 },
                     { X = -0.276119410991669, Y = 0.234615385532379, LX = -0.0388955648646743, LY = 0.0173476528480795, RX = 0.0776852483821913, RY = -0.0346480819867217 },
                     { X = -0.00746268639340997, Y = 0.223076924681664, LX = -0.0895032241848086, LY = -0.00447622424813894, RX = 0.111015623432655, RY = 0.00555209971548552 },
                     { X = 0.32089552283287, Y = 0.176923081278801, LX = -0.0953899211888106, LY = 0.0442462456552394, RX = 0.0384262762564376, RY = -0.0178238794798152 },
                     { X = 0.315920412540436, Y = 0.0730769261717796, LX = 0.0291695123476309, LY = 0.0262968454351959, RX = -0.0439412058086802, RY = -0.0396137955141661 },
                     { X = 0.136815920472145, Y = 0, LX = 0.0653912875001177, LY = 0.0129663362426241, RX = -0.0699830180095818, RY = -0.0138768233120387 },
                     { X = -0.077114425599575, Y = -0.0269230771809816, LX = 0.0721392593839109, LY = -0.0030787461063869, RX = -0.0645994848537863, RY = 0.00275696498919909 },
                     { X = -0.271144270896912, Y = -0.0307692307978868, LX = 0.0536338827265436, LY = 0.0279676730305985, RX = -0.04008793333479, RY = -0.0209040657693232 },
                     { X = -0.28606966137886, Y = -0.142307698726654, LX = -0.0132827787625591, LY = 0.0359401379129543, RX = 0.00904246079030449, RY = -0.0244668147896947 },
                     { X = -0.211442783474922, Y = -0.192307695746422, LX = -0.0324656890019584, LY = 0.00421359953511062, RX = 0.0507262487660054, RY = -0.00658356883186592 },
                     { X = -0.0572139285504818, Y = -0.196153849363327, LX = -0.050599152027255, LY = 0.00714404476082921, RX = 0.0469722858824874, RY = -0.00663197107892641 },
                     { X = 0.077114425599575, Y = -0.234615385532379, LX = -0.0470876945864384, LY = 0.00612352443120606, RX = 0.06453084396649, RY = -0.00839192071443981 },
                     { X = 0.271144270896912, Y = -0.25769230723381, LX = -0.058250238592048, LY = 0.0230464577154672, RX = 0.0396165293930199, RY = -0.0156741103823468 },
                     { X = 0.330845773220062, Y = -0.349999994039536, LX = -0.00513949936438026, LY = 0.0341697388236085, RX = 0.0038783984585702, RY = -0.0257853640962965 },
                     { X = 0.296019911766052, Y = -0.423076927661896, LX = 0.0307859555418668, LY = 0.0103743221602846, RX = -0.048740861321688, RY = -0.0164248076377974 },
                     { X = 0.136815920472145, Y = -0.415384620428085, LX = 0.0531652858527069, LY = 0.000632318344397321, RX = -0.0549456161373504, RY = -0.000653492602750507 },
                     { X = -0.0273631848394871, Y = -0.42692306637764, LX = 0.0544037720081529, LY = 0.00598548009029456, RX = -0.0477261015303801, RY = -0.00525080559588143 },
                     { X = -0.171641796827316, Y = -0.43461537361145, LX = 0.0479227320091469, LY = -0.00404159525270683, RX = -0.0448471661141312, RY = 0.0037822153718121 },
                     { X = -0.300995022058487, Y = -0.403846144676209, LX = 0.0422530295585197, LY = -0.0134935067817148 }
                  }
               },
            },
         },
      },
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Background2_1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Background2",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 1173.33, -4.15152 } },
      },
      LumaKeyer2 = LumaKeyer {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            Input = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1259.33, 45.5454 } },
      }
   }
}