Jump to: Board index » General » Fusion

How to switch (activate/deactivate) replacematerial/shader ?

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

Artenis

  • Posts: 35
  • Joined: Thu Apr 04, 2024 3:32 pm
  • Real Name: Raphael KUHN

How to switch (activate/deactivate) replacematerial/shader ?

PostThu Mar 20, 2025 4:52 pm

Hi,
To improve rendering speed, I want to be able to disable/enable replacematerail + shader .

I can't find any advice to deactivate replacematerial + shader without making the attached cube disappear.
If I deactivate only replacematerial rendering continues to take the shader into account in its calculations.
Although KAZ materials use a lot of tools, other shaders included by Blackmagic also increase rendering time.

In addition, for my fusion composition, I'd like to add a switch node using “edit control” for the replacement material and shader. Wherever I place the switch node, it doesn't create a display condition .

Code: Select all
{
   Tools = ordered() {
      Merge3D1 = Merge3D {
         CtrlWZoom = false,
         Inputs = {
            PassThroughLights = Input { Value = 1, },
            SceneInput1 = Input {
               SourceOp = "Switch1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Text3D1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 1028.79, -36.8634 } },
      },
      Switch1 = Switch {
         Inputs = {
            Input0 = Input {
               SourceOp = "ReplaceMaterial3D1_1",
               Source = "Output",
            },
            Input1 = Input {
               SourceOp = "Cube_1_Vert",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 912.171, -36.3373 } },
         Colors = { TileColor = { R = 0.0823529411764706, G = 0.384313725490196, B = 0.517647058823529 }, }
      },
      ReplaceMaterial3D1_1 = ReplaceMaterial3D {
         Inputs = {
            MaterialIDLimitMode = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "ShaderPipeRouter_1",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 7, }
         },
         ViewInfo = OperatorInfo { Pos = { 912.549, -82.4943 } },
      },
      kas_MetalGalvanized_1 = GroupOperator {
         NameSet = true,
         CustomData = { Path = { Map = { ["Setting:"] = "Macros:/KickAss ShaderZ/Native ShaderZ/Industrial/" } }, Settings = {
            }, HelpPage = "https://www.steakunderwater.com/wesuckless/viewtopic.php?p=25255#p25255" },
         Inputs = ordered() {
            Comments = Input { Value = "\"kas_MetalGalvanized\" creates an industrial sheet metal material. \n\nCopyright Credits \nkas_Parkland.exr\n\nCreative Commons:\nEgg mountain at afternoon \n\nBy:\nhttps://hdrmaps.com \n\nIs licensed under:\nCC BY 2.0", },
            TextureMap = InstanceInput {
               SourceOp = "TextureInputSwitchElseFuse_1",
               Source = "Input1",
               Name = "TextureMap",
            },
            BackgroundTextureMap = InstanceInput {
               SourceOp = "BackgroundTextureInputSwitchElseFuse_1",
               Source = "Input1",
               Name = "BackgroundTextureMap",
            },
            EnvironmentMap = InstanceInput {
               SourceOp = "EnvironmentMapInputSwitchElseFuse_1_1",
               Source = "Input1",
               Name = "EnvironmentMap",
            }
         },
         Outputs = {
            Material = InstanceOutput {
               SourceOp = "ShaderPipeRouter_1",
               Source = "Output",
               Name = "Material Output",
            }
         },
         ViewInfo = GroupInfo {
            Pos = { 912.881, -116.36 },
            Flags = {
               AllowPan = false,
               AutoSnap = true
            },
            Size = { 674.94, 251.013, 459.064, 21.3808 },
            Direction = "Horizontal",
            PipeStyle = "Direct",
            Scale = 1,
            Offset = { -1381.99, -284.889 }
         },
         Tools = ordered() {
            ParklandLoader_1 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_Parkland.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
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
                  ["Clip1.OpenEXRFormat.RedName"] = Input { Value = FuID { "R" }, },
                  ["Clip1.OpenEXRFormat.GreenName"] = Input { Value = FuID { "G" }, },
                  ["Clip1.OpenEXRFormat.BlueName"] = Input { Value = FuID { "B" }, },
                  ["Clip1.OpenEXRFormat.AlphaName"] = Input { Value = FuID { "A" }, },
                  Comments = Input { Value = "Copyright Credits \nkas_Parkland.exr\n\nCreative Commons:\nEgg mountain at afternoon \n\nBy:\nhttps://hdrmaps.com \n\nIs licensed under:\nCC BY 2.0", }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 313.5 } },
            },
            AgedSteelPlateLoader_1 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_AgedSteelPlate.jpg",
                     FormatID = "JpegFormat",
                     StartFrame = -1,
                     LengthSetManually = true,
                     TrimIn = 0,
                     TrimOut = 0,
                     ExtendFirst = 0,
                     ExtendLast = 0,
                     Loop = 0,
                     AspectMode = 0,
                     Depth = 0,
                     TimeCode = 0,
                     GlobalStart = 0,
                     GlobalEnd = 0
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 313.5 } },
            },
            GalvanizedSheetMetal_1 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_GalvanizedSheetMetal.jpg",
                     FormatID = "JpegFormat",
                     StartFrame = -1,
                     LengthSetManually = true,
                     TrimIn = 0,
                     TrimOut = 0,
                     ExtendFirst = 0,
                     ExtendLast = 0,
                     Loop = 0,
                     AspectMode = 0,
                     Depth = 0,
                     TimeCode = 0,
                     GlobalStart = 0,
                     GlobalEnd = 0
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               ViewInfo = OperatorInfo { Pos = { 1210, 313.5 } },
            },
            EnvironmentMapInputSwitchElseFuse_1_1 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "ParklandLoader_1",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 346.5 } },
               Version = 100
            },
            TextureInputSwitchElseFuse_1 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "AgedSteelPlateLoader_1",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 346.5 } },
               Version = 100
            },
            ShaderPipeRouter_1 = PipeRouter {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Input = Input {
                     SourceOp = "MetalGalvanizedReflect_1",
                     Source = "MaterialOutput",
                  }
               },
               ViewInfo = PipeRouterInfo { Pos = { 1540, 478.5 } },
               Colors = { TileColor = { R = 0.0823529411764706, G = 0.384313725490196, B = 0.517647058823529 }, }
            },
            MetalGalvanizedReflect_1 = MtlReflect {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  BackgroundMaterial = Input {
                     SourceOp = "GalvanizedPhong_1",
                     Source = "MaterialOutput",
                  },
                  ["Reflection.GlancingStrength"] = Input { Value = 0, },
                  ["Reflection.FaceOnStrength"] = Input { Value = 0.52, },
                  ["Reflection.Falloff"] = Input { Value = 1.9946667, },
                  ["Reflection.Color.Material"] = Input {
                     SourceOp = "ParkandSphereMap_1",
                     Source = "MaterialOutput",
                  },
                  ["Reflection.Intensity.Material"] = Input {
                     SourceOp = "RedToAlphaChannelBooleans_1",
                     Source = "Output",
                  },
                  ["Refraction.RefractiveIndex.RGB"] = Input { Value = 1.0065, },
                  MaterialID = Input { Value = 82, }
               },
               ViewInfo = OperatorInfo { Pos = { 1375, 478.5 } },
            },
            ParkandSphereMap_1 = SphereMap {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Rotation = Input { Value = 1, },
                  ["Rotate.Y"] = Input { Value = -65, },
                  Image = Input {
                     SourceOp = "ParklandBlur_1",
                     Source = "Output",
                  },
                  MaterialID = Input { Value = 15, }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 412.5 } },
            },
            GalvanizedPhong_1 = MtlPhong {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Diffuse.Color.Material"] = Input {
                     SourceOp = "GalvanizedColorCorrector_1",
                     Source = "Output",
                  },
                  ["Specular.Nest"] = Input { Value = 1, },
                  ["Specular.Color.Blue"] = Input { Value = 0.866666666666667, },
                  ["Specular.Intensity"] = Input { Value = 0.5, },
                  ["Specular.Intensity.Material"] = Input {
                     SourceOp = "RedToAlphaChannelBooleans_1",
                     Source = "Output",
                  },
                  ["Specular.Exponent"] = Input { Value = 1, },
                  ["Transmittance.Nest"] = Input { Value = 1, },
                  ["Transmittance.Color.Red"] = Input { Value = 1, },
                  ["Transmittance.Color.Green"] = Input { Value = 1, },
                  ["Transmittance.Color.Blue"] = Input { Value = 1, },
                  MaterialID = Input { Value = 78, }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 412.5 } },
            },
            GalvanizedColorCorrector_1 = ColorCorrector {
               NameSet = true,
               Inputs = {
                  WheelSaturation1 = Input { Value = 3, },
                  WheelTintAngle1 = Input { Value = -0.01, },
                  WheelTintLength1 = Input { Value = 1, },
                  MasterRGBContrast = Input { Value = 0.83, },
                  MasterRGBGamma = Input { Value = 0.56, },
                  MasterRGBBrightness = Input { Value = -0.2, },
                  ColorRanges = Input {
                     Value = ColorCurves {
                        Curves = {
                           {
                              Points = {
                                 { 0, 1 },
                                 { 0.4, 0.2 },
                                 { 0.6, 0 },
                                 { 1, 0 }
                              }
                           },
                           {
                              Points = {
                                 { 0, 0 },
                                 { 0.4, 0 },
                                 { 0.6, 0.2 },
                                 { 1, 1 }
                              }
                           }
                        }
                     },
                  },
                  Input = Input {
                     SourceOp = "BackgroundTextureInputSwitchElseFuse_1",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 379.5 } },
            },
            RedToAlphaChannelBooleans_1 = ChannelBoolean {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ToAlpha = Input { Value = 5, },
                  Background = Input {
                     SourceOp = "AgedBrightnessContrast_1",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1045, 478.5 } },
            },
            AgedBrightnessContrast_1 = BrightnessContrast {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Saturation = Input { Value = 0, },
                  Low = Input { Value = 0.4289855, },
                  High = Input { Value = 0.626087, },
                  Input = Input {
                     SourceOp = "TextureInputSwitchElseFuse_1",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 379.5 } },
            },
            ParklandBlur_1 = Blur {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Filter = Input { Value = FuID { "Gaussian" }, },
                  XBlurSize = Input { Value = 15, },
                  Input = Input {
                     SourceOp = "EnvironmentMapInputSwitchElseFuse_1_1",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 379.5 } },
            },
            BackgroundTextureInputSwitchElseFuse_1 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "GalvanizedSheetMetal_1",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 346.5 } },
               Version = 100
            }
         },
      },
      Cube_1_Vert = Cube3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.058, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.081, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 0.05, },
            ["SurfaceCubeInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Normals.Scale"] = Input { Value = 0, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            MtlFace = Input { Value = 2, },
            ["Front.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Front.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725490196078, },
            ["Front.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Front.MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["Right.MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["Left.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.12, },
            ["Left.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.28, },
            ["Left.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.1, },
            ["Left.MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.575, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.559, },
            ["Bottom.MtlStdInputs.MaterialID"] = Input { Value = 5, },
            ["Top.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.572549019607843, },
            ["Top.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.556862745098039, },
            ["Top.MtlStdInputs.MaterialID"] = Input { Value = 6, },
            ["Back.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Back.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725507259369, },
            ["Back.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Back.MtlStdInputs.MaterialID"] = Input { Value = 8, }
         },
         ViewInfo = OperatorInfo { Pos = { 790.914, -35.3222 } },
      },
      Text3D1 = Text3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Barre_Oblique_1",
               Source = "Output",
            },
            ["Transform3DOp.Translate.X"] = Input { Value = 0.092, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.06, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.029, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = -0.03, },
            ["Transform3DOp.Pivot.Y"] = Input { Value = -0.06, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.9, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.8, },
            Center = Input { Value = { 0.464, 0.424 }, },
            LayoutRotation = Input { Value = 1, },
            TransformRotation = Input { Value = 1, },
            StyledText = Input { Value = "10", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 0.08, },
            VerticalTopCenterBottom = Input { Value = 1, },
            VerticalJustification = Input { Value = 3, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
            Extrusion = Input { Value = 1, },
            ExtrusionProfile = Input {
               SourceOp = "Text3D1ProfileExtrusion",
               Source = "Value",
            },
            ExtrusionDepth = Input { Value = 0.0535, }
         },
         ViewInfo = OperatorInfo { Pos = { 1028.9, 18.7443 } },
      },
      Text3D1ProfileExtrusion = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.0666666666666667, 0.333333333333333 }, Flags = { Linear = true } },
               [0.2] = { 1, LH = { 0.133333333333333, 0.666666666666667 }, RH = { 0.4, 1 }, Flags = { Linear = true } },
               [0.8] = { 1, LH = { 0.6, 1 }, RH = { 0.866666666666667, 0.666666666666667 }, Flags = { Linear = true } },
               [1] = { 0, LH = { 0.933333333333333, 0.333333333333333 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 0, Blue = 0 },
         CtrlWZoom = false,
      },
      PremierEssai = Transform3D {
         NameSet = true,
         EnabledRegion = TimeRegion { { Start = -5, End = 143.9999 } },
         Inputs = {
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            ["Transform3DOp.Rotate.X"] = Input {
               SourceOp = "PremierEssaiXRotation",
               Source = "Value",
            },
            ["Transform3DOp.Rotate.Y"] = Input { Value = 5, },
            ["Transform3DOp.PivotNest"] = Input { Value = -1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.X"] = Input { Value = 2.205, }
         },
         ViewInfo = OperatorInfo { Pos = { 1189.8, -2.49442 } },
      },
      PremierEssaiXRotation = BezierSpline {
         SplineColor = { Red = 255, Green = 128, Blue = 128 },
         CtrlWZoom = false,
         KeyFrames = {
            [13] = { -480, RH = { 15.6666666666667, -315 } },
            [21] = { 15, LH = { 18.3333333333333, -150 }, Flags = { Linear = true } }
         }
      },
      Barre_Oblique_1 = Text3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.69, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.009, },
            ["Transform3DOp.Rotate.Z"] = Input { Value = -39, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = -0.04, },
            ["Transform3DOp.Pivot.Y"] = Input { Value = -0.75, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.355, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.277, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 2.205, },
            ["Transform3DOp.TargetNest"] = Input { Value = 0, },
            Center = Input { Value = { 0.464, -0.424 }, },
            LayoutRotation = Input { Value = 1, },
            TransformRotation = Input { Value = 1, },
            Opacity1 = Input { Value = 0.795, },
            Red1 = Input { Value = 0.433, },
            Green1 = Input { Value = 0, },
            Blue1 = Input { Value = 0, },
            SpecularRed = Input { Value = 0.551, },
            SpecularGreen = Input { Value = 0, },
            SpecularBlue = Input { Value = 0, },
            SpecularExponent = Input { Value = 100, },
            StyledText = Input { Value = "/\n", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 0.47, },
            VerticalJustification = Input { Value = 3, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
            Extrusion = Input { Value = 1, },
            ExtrusionProfile = Input {
               SourceOp = "BarreobliqueProfileExtrusion",
               Source = "Value",
            },
            ExtrusionDepth = Input { Value = 0.0126, }
         },
         ViewInfo = OperatorInfo { Pos = { 1028.61, 73.8031 } },
      },
      BarreobliqueProfileExtrusion = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.0666666666666667, 0.333333333333333 }, Flags = { Linear = true } },
               [0.2] = { 1, LH = { 0.133333333333333, 0.666666666666667 }, RH = { 0.4, 1 }, Flags = { Linear = true } },
               [0.8] = { 1, LH = { 0.6, 1 }, RH = { 0.866666666666667, 0.666666666666667 }, Flags = { Linear = true } },
               [1] = { 0, LH = { 0.933333333333333, 0.333333333333333 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 0, Blue = 0 },
         CtrlWZoom = false,
      }
   }
}
Online
User avatar

KrunoSmithy

  • Posts: 4352
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Warnings: 1
  • Real Name: Kruno Stifter

Re: How to switch (activate/deactivate) replacematerial/shad

PostThu Mar 20, 2025 7:13 pm

I think Replace Material 3D tool has enable/disable button that can be animated.

sshot-936.jpg
sshot-936.jpg (23.56 KiB) Viewed 1677 times


You could always branch out from your mesh to do clean render pass and one with shaders using replace material and use switch after rendering the passes to choose which one you want. Dissolve node would work as well.

On reactor there is Switch Anything fuse which can be used before rendering. And you could maybe also animate replace material to go from replace to keep per channel. I haven't tested this for speed, but you are welcome to try.

Switch Anything by Jacob Danell also available on reactor.

Switch between different inputs of any kind.

Current working input-types:

Image
Mask
3D
Material

If any other type of input is needed, simply add them under InMode in the code. Sadly particle-node-switching doesn't work because the way they are built.

For more info, please check:

WSL thread: https://www.steakunderwater.com/wesuckl ... php?t=5321

sshot-934.jpg
sshot-934.jpg (163.74 KiB) Viewed 1828 times


sshot-935.jpg
sshot-935.jpg (161.87 KiB) Viewed 1828 times
Offline

Artenis

  • Posts: 35
  • Joined: Thu Apr 04, 2024 3:32 pm
  • Real Name: Raphael KUHN

Re: How to switch (activate/deactivate) replacematerial/shad

PostFri Mar 21, 2025 5:01 pm

I've tested every possible way of placing the SwitchAnything node and none of them worked properly.
I tested with 3D and material in the drop-down menu of SwitchAnything.
The “kas_MetalGalvanized_1” shader must only be applied to the cube.
Could you please tell me were I'm wrong.

think Replace Material 3D tool has enable/disable button that can be animated.

I had tested, but as I said in the first post, disabling ReplaceMaterial will not prevent DR from performing the shader calculation. But as this shader is very resource-hungry and I'm applying it to 4 cubes, I've got about 30 minutes of rendering time. Also, as I'm going to reuse this animation for other videos, I'd like to make the visual effects optional with a switch button and create a control list for texts, slashes, shaders, etc.

Code: Select all
{
   Tools = ordered() {
      ReplaceMaterial3D1_1 = ReplaceMaterial3D {
         Inputs = {
            MaterialIDLimitMode = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "ShaderPipeRouter_1",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 7, }
         },
         ViewInfo = OperatorInfo { Pos = { 879.695, -154.946 } },
      },
      kas_MetalGalvanized_1 = GroupOperator {
         NameSet = true,
         CustomData = { Path = { Map = { ["Setting:"] = "Macros:/KickAss ShaderZ/Native ShaderZ/Industrial/" } }, Settings = {
            }, HelpPage = "https://www.steakunderwater.com/wesuckless/viewtopic.php?p=25255#p25255" },
         Inputs = ordered() {
            Comments = Input { Value = "\"kas_MetalGalvanized\" creates an industrial sheet metal material. \n\nCopyright Credits \nkas_Parkland.exr\n\nCreative Commons:\nEgg mountain at afternoon \n\nBy:\nhttps://hdrmaps.com \n\nIs licensed under:\nCC BY 2.0", },
            TextureMap = InstanceInput {
               SourceOp = "TextureInputSwitchElseFuse_1",
               Source = "Input1",
               Name = "TextureMap",
            },
            BackgroundTextureMap = InstanceInput {
               SourceOp = "BackgroundTextureInputSwitchElseFuse_1",
               Source = "Input1",
               Name = "BackgroundTextureMap",
            },
            EnvironmentMap = InstanceInput {
               SourceOp = "EnvironmentMapInputSwitchElseFuse_1_1",
               Source = "Input1",
               Name = "EnvironmentMap",
            }
         },
         Outputs = {
            Material = InstanceOutput {
               SourceOp = "ShaderPipeRouter_1",
               Source = "Output",
               Name = "Material Output",
            }
         },
         ViewInfo = GroupInfo {
            Pos = { 879.758, -208.891 },
            Flags = {
               AllowPan = false,
               AutoSnap = true
            },
            Size = { 674.94, 251.013, 459.064, 21.3808 },
            Direction = "Horizontal",
            PipeStyle = "Direct",
            Scale = 1,
            Offset = { -1381.99, -284.889 }
         },
         Tools = ordered() {
            ParklandLoader_1 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_Parkland.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
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
                  ["Clip1.OpenEXRFormat.RedName"] = Input { Value = FuID { "R" }, },
                  ["Clip1.OpenEXRFormat.GreenName"] = Input { Value = FuID { "G" }, },
                  ["Clip1.OpenEXRFormat.BlueName"] = Input { Value = FuID { "B" }, },
                  ["Clip1.OpenEXRFormat.AlphaName"] = Input { Value = FuID { "A" }, },
                  Comments = Input { Value = "Copyright Credits \nkas_Parkland.exr\n\nCreative Commons:\nEgg mountain at afternoon \n\nBy:\nhttps://hdrmaps.com \n\nIs licensed under:\nCC BY 2.0", }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 313.5 } },
            },
            AgedSteelPlateLoader_1 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_AgedSteelPlate.jpg",
                     FormatID = "JpegFormat",
                     StartFrame = -1,
                     LengthSetManually = true,
                     TrimIn = 0,
                     TrimOut = 0,
                     ExtendFirst = 0,
                     ExtendLast = 0,
                     Loop = 0,
                     AspectMode = 0,
                     Depth = 0,
                     TimeCode = 0,
                     GlobalStart = 0,
                     GlobalEnd = 0
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 313.5 } },
            },
            GalvanizedSheetMetal_1 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_GalvanizedSheetMetal.jpg",
                     FormatID = "JpegFormat",
                     StartFrame = -1,
                     LengthSetManually = true,
                     TrimIn = 0,
                     TrimOut = 0,
                     ExtendFirst = 0,
                     ExtendLast = 0,
                     Loop = 0,
                     AspectMode = 0,
                     Depth = 0,
                     TimeCode = 0,
                     GlobalStart = 0,
                     GlobalEnd = 0
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               ViewInfo = OperatorInfo { Pos = { 1210, 313.5 } },
            },
            EnvironmentMapInputSwitchElseFuse_1_1 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "ParklandLoader_1",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 346.5 } },
               Version = 100
            },
            TextureInputSwitchElseFuse_1 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "AgedSteelPlateLoader_1",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 346.5 } },
               Version = 100
            },
            ShaderPipeRouter_1 = PipeRouter {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Input = Input {
                     SourceOp = "MetalGalvanizedReflect_1",
                     Source = "MaterialOutput",
                  }
               },
               ViewInfo = PipeRouterInfo { Pos = { 1540, 478.5 } },
               Colors = { TileColor = { R = 0.0823529411764706, G = 0.384313725490196, B = 0.517647058823529 }, }
            },
            MetalGalvanizedReflect_1 = MtlReflect {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  BackgroundMaterial = Input {
                     SourceOp = "GalvanizedPhong_1",
                     Source = "MaterialOutput",
                  },
                  ["Reflection.GlancingStrength"] = Input { Value = 0, },
                  ["Reflection.FaceOnStrength"] = Input { Value = 0.52, },
                  ["Reflection.Falloff"] = Input { Value = 1.9946667, },
                  ["Reflection.Color.Material"] = Input {
                     SourceOp = "ParkandSphereMap_1",
                     Source = "MaterialOutput",
                  },
                  ["Reflection.Intensity.Material"] = Input {
                     SourceOp = "RedToAlphaChannelBooleans_1",
                     Source = "Output",
                  },
                  ["Refraction.RefractiveIndex.RGB"] = Input { Value = 1.0065, },
                  MaterialID = Input { Value = 82, }
               },
               ViewInfo = OperatorInfo { Pos = { 1375, 478.5 } },
            },
            ParkandSphereMap_1 = SphereMap {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Rotation = Input { Value = 1, },
                  ["Rotate.Y"] = Input { Value = -65, },
                  Image = Input {
                     SourceOp = "ParklandBlur_1",
                     Source = "Output",
                  },
                  MaterialID = Input { Value = 15, }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 412.5 } },
            },
            GalvanizedPhong_1 = MtlPhong {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Diffuse.Color.Material"] = Input {
                     SourceOp = "GalvanizedColorCorrector_1",
                     Source = "Output",
                  },
                  ["Specular.Nest"] = Input { Value = 1, },
                  ["Specular.Color.Blue"] = Input { Value = 0.866666666666667, },
                  ["Specular.Intensity"] = Input { Value = 0.5, },
                  ["Specular.Intensity.Material"] = Input {
                     SourceOp = "RedToAlphaChannelBooleans_1",
                     Source = "Output",
                  },
                  ["Specular.Exponent"] = Input { Value = 1, },
                  ["Transmittance.Nest"] = Input { Value = 1, },
                  ["Transmittance.Color.Red"] = Input { Value = 1, },
                  ["Transmittance.Color.Green"] = Input { Value = 1, },
                  ["Transmittance.Color.Blue"] = Input { Value = 1, },
                  MaterialID = Input { Value = 78, }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 412.5 } },
            },
            GalvanizedColorCorrector_1 = ColorCorrector {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  WheelSaturation1 = Input { Value = 3, },
                  WheelTintAngle1 = Input { Value = -0.01, },
                  WheelTintLength1 = Input { Value = 1, },
                  MasterRGBContrast = Input { Value = 0.83, },
                  MasterRGBGamma = Input { Value = 0.56, },
                  MasterRGBBrightness = Input { Value = -0.2, },
                  ColorRanges = Input {
                     Value = ColorCurves {
                        Curves = {
                           {
                              Points = {
                                 { 0, 1 },
                                 { 0.4, 0.2 },
                                 { 0.6, 0 },
                                 { 1, 0 }
                              }
                           },
                           {
                              Points = {
                                 { 0, 0 },
                                 { 0.4, 0 },
                                 { 0.6, 0.2 },
                                 { 1, 1 }
                              }
                           }
                        }
                     },
                  },
                  Input = Input {
                     SourceOp = "BackgroundTextureInputSwitchElseFuse_1",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 379.5 } },
            },
            RedToAlphaChannelBooleans_1 = ChannelBoolean {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ToAlpha = Input { Value = 5, },
                  Background = Input {
                     SourceOp = "AgedBrightnessContrast_1",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1045, 478.5 } },
            },
            AgedBrightnessContrast_1 = BrightnessContrast {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Saturation = Input { Value = 0, },
                  Low = Input { Value = 0.4289855, },
                  High = Input { Value = 0.626087, },
                  Input = Input {
                     SourceOp = "TextureInputSwitchElseFuse_1",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 379.5 } },
            },
            ParklandBlur_1 = Blur {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Filter = Input { Value = FuID { "Gaussian" }, },
                  XBlurSize = Input { Value = 15, },
                  Input = Input {
                     SourceOp = "EnvironmentMapInputSwitchElseFuse_1_1",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 379.5 } },
            },
            BackgroundTextureInputSwitchElseFuse_1 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "GalvanizedSheetMetal_1",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 346.5 } },
               Version = 100
            }
         },
      },
      SwitchAnything1 = Fuse.SwitchAnything {
         Inputs = {
            DataType = Input { Value = FuID { "DataType3D" }, },
            Which = Input { Value = 1, },
            Input1 = Input {
               SourceOp = "ReplaceMaterial3D1_1",
               Source = "Output",
            },
            Input2 = Input {
               SourceOp = "Cube_1_Vert",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 879.695, -101.07 } },
         Version = 101
      },
      Merge3D4 = Merge3D {
         CtrlWZoom = false,
         Inputs = {
            PassThroughLights = Input { Value = 1, }
         },
         ViewInfo = OperatorInfo { Pos = { 879.695, -33.3978 } },
      },
      Merge3D1 = Merge3D {
         Inputs = {
            PassThroughLights = Input { Value = 1, },
            SceneInput1 = Input {
               SourceOp = "SwitchAnything1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Text3D1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 1029.96, -31.4119 } },
      },
      PremierEssai = Transform3D {
         NameSet = true,
         EnabledRegion = TimeRegion { { Start = -5, End = 143.9999 } },
         Inputs = {
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            ["Transform3DOp.Translation"] = Input { Value = -1, },
            ["Transform3DOp.Translate.X"] = Input { Value = 0.00238192579831753, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.0605553166586205, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.0272258989570263, },
            ["Transform3DOp.Rotate.X"] = Input {
               SourceOp = "PremierEssaiXRotation",
               Source = "Value",
            },
            ["Transform3DOp.Rotate.Y"] = Input { Value = 5, },
            ["Transform3DOp.PivotNest"] = Input { Value = -1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.X"] = Input { Value = 2.205, }
         },
         ViewInfo = OperatorInfo { Pos = { 1189.8, -2.49442 } },
      },
      PremierEssaiXRotation = BezierSpline {
         SplineColor = { Red = 255, Green = 128, Blue = 128 },
         CtrlWZoom = false,
         KeyFrames = {
            [13] = { -480, RH = { 15.6666666666667, -315 } },
            [21] = { 15, LH = { 18.3333333333333, -150 }, Flags = { Linear = true } }
         }
      },
      Text3D1 = Text3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Barre_Oblique_1",
               Source = "Output",
            },
            ["Transform3DOp.Translate.X"] = Input { Value = 0.092, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.06, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.024, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = -0.03, },
            ["Transform3DOp.Pivot.Y"] = Input { Value = -0.06, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.9, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.8, },
            Center = Input { Value = { 0.464, 0.424 }, },
            LayoutRotation = Input { Value = 1, },
            TransformRotation = Input { Value = 1, },
            StyledText = Input { Value = "10", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 0.08, },
            VerticalTopCenterBottom = Input { Value = 1, },
            VerticalJustification = Input { Value = 3, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
            Extrusion = Input { Value = 1, },
            ExtrusionProfile = Input {
               SourceOp = "Text3D1ProfileExtrusion",
               Source = "Value",
            },
            ExtrusionDepth = Input { Value = 0.0535, }
         },
         ViewInfo = OperatorInfo { Pos = { 1028.9, 18.7443 } },
      },
      Text3D1ProfileExtrusion = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.0666666666666667, 0.333333333333333 }, Flags = { Linear = true } },
               [0.2] = { 1, LH = { 0.133333333333333, 0.666666666666667 }, RH = { 0.4, 1 }, Flags = { Linear = true } },
               [0.8] = { 1, LH = { 0.6, 1 }, RH = { 0.866666666666667, 0.666666666666667 }, Flags = { Linear = true } },
               [1] = { 0, LH = { 0.933333333333333, 0.333333333333333 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 0, Blue = 0 },
         CtrlWZoom = false,
      },
      Barre_Oblique_1 = Text3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.69, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.007, },
            ["Transform3DOp.Rotate.Z"] = Input { Value = -39, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = -0.04, },
            ["Transform3DOp.Pivot.Y"] = Input { Value = -0.75, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.3, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.277, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 2.205, },
            ["Transform3DOp.TargetNest"] = Input { Value = 0, },
            Center = Input { Value = { 0.464, -0.424 }, },
            LayoutRotation = Input { Value = 1, },
            TransformRotation = Input { Value = 1, },
            Opacity1 = Input { Value = 0.795, },
            Red1 = Input { Value = 0.433, },
            Green1 = Input { Value = 0, },
            Blue1 = Input { Value = 0, },
            SpecularRed = Input { Value = 0.551, },
            SpecularGreen = Input { Value = 0, },
            SpecularBlue = Input { Value = 0, },
            SpecularExponent = Input { Value = 100, },
            StyledText = Input { Value = "/\n", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 0.47, },
            VerticalJustification = Input { Value = 3, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
            Extrusion = Input { Value = 1, },
            ExtrusionProfile = Input {
               SourceOp = "BarreobliqueProfileExtrusion",
               Source = "Value",
            },
            ExtrusionDepth = Input { Value = 0.0126, }
         },
         ViewInfo = OperatorInfo { Pos = { 1029.72, 54.7141 } },
      },
      BarreobliqueProfileExtrusion = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.0666666666666667, 0.333333333333333 }, Flags = { Linear = true } },
               [0.2] = { 1, LH = { 0.133333333333333, 0.666666666666667 }, RH = { 0.4, 1 }, Flags = { Linear = true } },
               [0.8] = { 1, LH = { 0.6, 1 }, RH = { 0.866666666666667, 0.666666666666667 }, Flags = { Linear = true } },
               [1] = { 0, LH = { 0.933333333333333, 0.333333333333333 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 0, Blue = 0 },
         CtrlWZoom = false,
      },
      Cube_1_Vert = Cube3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.058, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.096, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 0.05, },
            ["SurfaceCubeInputs.Width"] = Input { Value = 0.8, },
            ["SurfaceCubeInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Normals.Scale"] = Input { Value = 0, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            MtlFace = Input { Value = 2, },
            ["Front.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Front.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725490196078, },
            ["Front.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Front.MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["Right.MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["Left.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.12, },
            ["Left.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.28, },
            ["Left.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.1, },
            ["Left.MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.575, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.559, },
            ["Bottom.MtlStdInputs.MaterialID"] = Input { Value = 5, },
            ["Top.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.572549019607843, },
            ["Top.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.556862745098039, },
            ["Top.MtlStdInputs.MaterialID"] = Input { Value = 6, },
            ["Back.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Back.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725507259369, },
            ["Back.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Back.MtlStdInputs.MaterialID"] = Input { Value = 8, }
         },
         ViewInfo = OperatorInfo { Pos = { 751.838, -34.0857 } },
      }
   }
}
Online
User avatar

KrunoSmithy

  • Posts: 4352
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Warnings: 1
  • Real Name: Kruno Stifter

Re: How to switch (activate/deactivate) replacematerial/shad

PostFri Mar 21, 2025 5:15 pm

I tired to copy and paste your node set up and something is not right. You seem to have a text with a stroke and simple cube and yet I see no logic in the way its connected or what animation is supposed to be. Something is wrong there.

Explain in clear way what is it that you want to animate and for what purpose. I suspect you are doing something strange with your set up that is causing issues.
Online
User avatar

KrunoSmithy

  • Posts: 4352
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Warnings: 1
  • Real Name: Kruno Stifter

Re: How to switch (activate/deactivate) replacematerial/shad

PostFri Mar 21, 2025 5:31 pm

A slightly modified spinning animation runs at 24 fps for me. One thing you can do to speed up rendering in general is to turn of updates for static elements, particularly useful when working with photos. Like textures that do not animate themselves. CTRL + U or right click on node and choose Mode: uncheck update. You can also do freeze frame using time speed or time strecher node.

sshot-937.jpg
sshot-937.jpg (213.28 KiB) Viewed 1635 times


Code: Select all
{
   Tools = ordered() {
      kas_MetalGalvanized_1 = GroupOperator {
         NameSet = true,
         CustomData = { Path = { Map = { ["Setting:"] = "Macros:/KickAss ShaderZ/Native ShaderZ/Industrial/" } }, Settings = {
            }, HelpPage = "https://www.steakunderwater.com/wesuckless/viewtopic.php?p=25255#p25255" },
         Inputs = ordered() {
            Comments = Input { Value = "\"kas_MetalGalvanized\" creates an industrial sheet metal material. \n\nCopyright Credits \nkas_Parkland.exr\n\nCreative Commons:\nEgg mountain at afternoon \n\nBy:\nhttps://hdrmaps.com \n\nIs licensed under:\nCC BY 2.0", },
            TextureMap = InstanceInput {
               SourceOp = "TextureInputSwitchElseFuse_1",
               Source = "Input1",
               Name = "TextureMap",
            },
            BackgroundTextureMap = InstanceInput {
               SourceOp = "BackgroundTextureInputSwitchElseFuse_1",
               Source = "Input1",
               Name = "BackgroundTextureMap",
            },
            EnvironmentMap = InstanceInput {
               SourceOp = "EnvironmentMapInputSwitchElseFuse_1_1",
               Source = "Input1",
               Name = "EnvironmentMap",
            }
         },
         Outputs = {
            Material = InstanceOutput {
               SourceOp = "ShaderPipeRouter_1",
               Source = "Output",
               Name = "Material Output",
            }
         },
         ViewInfo = GroupInfo {
            Pos = { 428.095, -31.2889 },
            Flags = {
               AllowPan = false,
               AutoSnap = true
            },
            Size = { 674.94, 251.013, 459.064, 21.3808 },
            Direction = "Horizontal",
            PipeStyle = "Direct",
            Scale = 1,
            Offset = { -1381.99, -284.889 }
         },
         Tools = ordered() {
            ParklandLoader_1 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_Parkland.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
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
                  ["Clip1.OpenEXRFormat.RedName"] = Input { Value = FuID { "R" }, },
                  ["Clip1.OpenEXRFormat.GreenName"] = Input { Value = FuID { "G" }, },
                  ["Clip1.OpenEXRFormat.BlueName"] = Input { Value = FuID { "B" }, },
                  ["Clip1.OpenEXRFormat.AlphaName"] = Input { Value = FuID { "A" }, },
                  Comments = Input { Value = "Copyright Credits \nkas_Parkland.exr\n\nCreative Commons:\nEgg mountain at afternoon \n\nBy:\nhttps://hdrmaps.com \n\nIs licensed under:\nCC BY 2.0", }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 313.5 } },
            },
            AgedSteelPlateLoader_1 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_AgedSteelPlate.jpg",
                     FormatID = "JpegFormat",
                     StartFrame = -1,
                     LengthSetManually = true,
                     TrimIn = 0,
                     TrimOut = 0,
                     ExtendFirst = 0,
                     ExtendLast = 0,
                     Loop = 0,
                     AspectMode = 0,
                     Depth = 0,
                     TimeCode = 0,
                     GlobalStart = 0,
                     GlobalEnd = 0
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 313.5 } },
            },
            GalvanizedSheetMetal_1 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_GalvanizedSheetMetal.jpg",
                     FormatID = "JpegFormat",
                     StartFrame = -1,
                     LengthSetManually = true,
                     TrimIn = 0,
                     TrimOut = 0,
                     ExtendFirst = 0,
                     ExtendLast = 0,
                     Loop = 0,
                     AspectMode = 0,
                     Depth = 0,
                     TimeCode = 0,
                     GlobalStart = 0,
                     GlobalEnd = 0
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               ViewInfo = OperatorInfo { Pos = { 1210, 313.5 } },
            },
            EnvironmentMapInputSwitchElseFuse_1_1 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "ParklandLoader_1",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 346.5 } },
               Version = 100
            },
            TextureInputSwitchElseFuse_1 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "AgedSteelPlateLoader_1",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 346.5 } },
               Version = 100
            },
            ShaderPipeRouter_1 = PipeRouter {
               HoldOutput = true,
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Input = Input {
                     SourceOp = "MetalGalvanizedReflect_1",
                     Source = "MaterialOutput",
                  }
               },
               ViewInfo = PipeRouterInfo { Pos = { 1540, 478.5 } },
               Colors = { TileColor = { R = 0.0823529411764706, G = 0.384313725490196, B = 0.517647058823529 }, }
            },
            MetalGalvanizedReflect_1 = MtlReflect {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  BackgroundMaterial = Input {
                     SourceOp = "GalvanizedPhong_1",
                     Source = "MaterialOutput",
                  },
                  ["Reflection.GlancingStrength"] = Input { Value = 0, },
                  ["Reflection.FaceOnStrength"] = Input { Value = 0.52, },
                  ["Reflection.Falloff"] = Input { Value = 1.9946667, },
                  ["Reflection.Color.Material"] = Input {
                     SourceOp = "ParkandSphereMap_1",
                     Source = "MaterialOutput",
                  },
                  ["Reflection.Intensity.Material"] = Input {
                     SourceOp = "RedToAlphaChannelBooleans_1",
                     Source = "Output",
                  },
                  ["Refraction.RefractiveIndex.RGB"] = Input { Value = 1.0065, },
                  MaterialID = Input { Value = 82, }
               },
               ViewInfo = OperatorInfo { Pos = { 1375, 478.5 } },
            },
            ParkandSphereMap_1 = SphereMap {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Rotation = Input { Value = 1, },
                  ["Rotate.Y"] = Input { Value = -65, },
                  Image = Input {
                     SourceOp = "ParklandBlur_1",
                     Source = "Output",
                  },
                  MaterialID = Input { Value = 15, }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 412.5 } },
            },
            GalvanizedPhong_1 = MtlPhong {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Diffuse.Color.Material"] = Input {
                     SourceOp = "GalvanizedColorCorrector_1",
                     Source = "Output",
                  },
                  ["Specular.Nest"] = Input { Value = 1, },
                  ["Specular.Color.Blue"] = Input { Value = 0.866666666666667, },
                  ["Specular.Intensity"] = Input { Value = 0.5, },
                  ["Specular.Intensity.Material"] = Input {
                     SourceOp = "RedToAlphaChannelBooleans_1",
                     Source = "Output",
                  },
                  ["Specular.Exponent"] = Input { Value = 1, },
                  ["Transmittance.Nest"] = Input { Value = 1, },
                  ["Transmittance.Color.Red"] = Input { Value = 1, },
                  ["Transmittance.Color.Green"] = Input { Value = 1, },
                  ["Transmittance.Color.Blue"] = Input { Value = 1, },
                  MaterialID = Input { Value = 78, }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 412.5 } },
            },
            GalvanizedColorCorrector_1 = ColorCorrector {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  WheelSaturation1 = Input { Value = 3, },
                  WheelTintAngle1 = Input { Value = -0.01, },
                  WheelTintLength1 = Input { Value = 1, },
                  MasterRGBContrast = Input { Value = 0.83, },
                  MasterRGBGamma = Input { Value = 0.56, },
                  MasterRGBBrightness = Input { Value = -0.2, },
                  ColorRanges = Input {
                     Value = ColorCurves {
                        Curves = {
                           {
                              Points = {
                                 { 0, 1 },
                                 { 0.4, 0.2 },
                                 { 0.6, 0 },
                                 { 1, 0 }
                              }
                           },
                           {
                              Points = {
                                 { 0, 0 },
                                 { 0.4, 0 },
                                 { 0.6, 0.2 },
                                 { 1, 1 }
                              }
                           }
                        }
                     },
                  },
                  Input = Input {
                     SourceOp = "BackgroundTextureInputSwitchElseFuse_1",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 379.5 } },
            },
            RedToAlphaChannelBooleans_1 = ChannelBoolean {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ToAlpha = Input { Value = 5, },
                  Background = Input {
                     SourceOp = "AgedBrightnessContrast_1",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1045, 478.5 } },
            },
            AgedBrightnessContrast_1 = BrightnessContrast {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Saturation = Input { Value = 0, },
                  Low = Input { Value = 0.4289855, },
                  High = Input { Value = 0.626087, },
                  Input = Input {
                     SourceOp = "TextureInputSwitchElseFuse_1",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 379.5 } },
            },
            ParklandBlur_1 = Blur {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Filter = Input { Value = FuID { "Gaussian" }, },
                  XBlurSize = Input { Value = 15, },
                  Input = Input {
                     SourceOp = "EnvironmentMapInputSwitchElseFuse_1_1",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 379.5 } },
            },
            BackgroundTextureInputSwitchElseFuse_1 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "GalvanizedSheetMetal_1",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 346.5 } },
               Version = 100
            }
         },
      },
      Merge3D2 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Cube_1_Vert",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Cube_1_Vert_1",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "Cube_1_Vert_2",
               Source = "Output",
            },
            SceneInput4 = Input {
               SourceOp = "Cube_1_Vert_3",
               Source = "Output",
            },
            SceneInput5 = Input {
               SourceOp = "Cube_1_Vert_4",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 119.049, 36.4219 } },
      },
      ReplaceMaterial3D1_1 = ReplaceMaterial3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Merge3D2",
               Source = "Output",
            },
            ["ReplaceMode.Nest"] = Input { Value = 1, },
            MaterialIDLimitMode = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "ShaderPipeRouter_1",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 7, }
         },
         ViewInfo = OperatorInfo { Pos = { 428.095, 36.4219 } },
      },
      Cube_1_Vert = Cube3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.058, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.096, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 0.05, },
            ["SurfaceCubeInputs.Width"] = Input { Value = 0.8, },
            ["SurfaceCubeInputs.SubdivisionWidth"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Visibility.CullBackFace"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Normals.Scale"] = Input { Value = 0, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            MtlFace = Input { Value = 2, },
            ["Front.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Front.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725490196078, },
            ["Front.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Front.MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["Right.MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["Left.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.12, },
            ["Left.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.28, },
            ["Left.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.1, },
            ["Left.MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.575, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.559, },
            ["Bottom.MtlStdInputs.MaterialID"] = Input { Value = 5, },
            ["Top.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.572549019607843, },
            ["Top.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.556862745098039, },
            ["Top.MtlStdInputs.MaterialID"] = Input { Value = 6, },
            ["Back.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Back.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725507259369, },
            ["Back.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Back.MtlStdInputs.MaterialID"] = Input { Value = 8, }
         },
         ViewInfo = OperatorInfo { Pos = { -69.3434, 36.4219 } },
      },
      Merge3D1 = Merge3D {
         Inputs = {
            PassThroughLights = Input { Value = 1, },
            SceneInput1 = Input {
               SourceOp = "ReplaceMaterial3D1_1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Text3D1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 587.788, 36.4219 } },
      },
      PremierEssai = Transform3D {
         NameSet = true,
         EnabledRegion = TimeRegion { { Start = -5, End = 143.9999 } },
         Inputs = {
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            ["Transform3DOp.Translation"] = Input { Value = -1, },
            ["Transform3DOp.Translate.X"] = Input { Value = 0.00238192579831753, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.0605553166586205, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.0272258989570263, },
            ["Transform3DOp.Rotate.X"] = Input {
               SourceOp = "PremierEssaiXRotation",
               Source = "Value",
            },
            ["Transform3DOp.Rotate.Y"] = Input { Value = 5, },
            ["Transform3DOp.PivotNest"] = Input { Value = -1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.X"] = Input { Value = 2.205, }
         },
         ViewInfo = OperatorInfo { Pos = { 784.397, 36.4219 } },
      },
      PremierEssaiXRotation = BezierSpline {
         SplineColor = { Red = 255, Green = 128, Blue = 128 },
         CtrlWZoom = false,
         KeyFrames = {
            [13] = { -480, RH = { 15.6666666666667, -315 }, Flags = { Loop = true } },
            [21] = { 15, LH = { 18.3333333333333, -150 }, Flags = { Linear = true, Loop = true } }
         }
      },
      Cube_1_Vert_1 = Cube3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = -0.0307997340697138, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.096, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 0.05, },
            ["SurfaceCubeInputs.Width"] = Input { Value = 0.8, },
            ["SurfaceCubeInputs.SubdivisionWidth"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Visibility.CullBackFace"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Normals.Scale"] = Input { Value = 0, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            MtlFace = Input { Value = 2, },
            ["Front.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Front.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725490196078, },
            ["Front.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Front.MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["Right.MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["Left.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.12, },
            ["Left.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.28, },
            ["Left.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.1, },
            ["Left.MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.575, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.559, },
            ["Bottom.MtlStdInputs.MaterialID"] = Input { Value = 5, },
            ["Top.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.572549019607843, },
            ["Top.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.556862745098039, },
            ["Top.MtlStdInputs.MaterialID"] = Input { Value = 6, },
            ["Back.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Back.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725507259369, },
            ["Back.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Back.MtlStdInputs.MaterialID"] = Input { Value = 8, }
         },
         ViewInfo = OperatorInfo { Pos = { -70.4552, 81.7598 } },
      },
      Merge3D4 = Merge3D {
         Inputs = {
            PassThroughLights = Input { Value = 1, },
            SceneInput1 = Input {
               SourceOp = "PremierEssai",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "DirectionalLight1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 974.924, 36.4219 } },
      },
      DirectionalLight1 = LightDirectional {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = -2.07862174420644, },
            ["Transform3DOp.Translate.Y"] = Input { Value = -0.312, },
            ["Transform3DOp.Translate.Z"] = Input { Value = -3.24394081718071, },
            ["Transform3DOp.Rotate.Y"] = Input { Value = -65.3, },
            Intensity = Input { Value = 0.937, },
            ["ShadowLightInputs3D.ShadowsEnabled"] = Input { Value = 1, },
            ["ShadowLightInputs3D.ShadowMapSize"] = Input { Value = 2048, }
         },
         ViewInfo = OperatorInfo { Pos = { 974.924, -45.2588 } },
      },
      Text3D1 = Text3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Barre_Oblique_1",
               Source = "Output",
            },
            ["Transform3DOp.Translate.X"] = Input { Value = 0.092, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.06, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.024, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = -0.03, },
            ["Transform3DOp.Pivot.Y"] = Input { Value = -0.06, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.9, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.8, },
            Center = Input { Value = { 0.464, 0.424 }, },
            LayoutRotation = Input { Value = 1, },
            TransformRotation = Input { Value = 1, },
            StyledText = Input { Value = "10", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 0.08, },
            VerticalTopCenterBottom = Input { Value = 1, },
            VerticalJustification = Input { Value = 3, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
            Extrusion = Input { Value = 1, },
            ExtrusionProfile = Input {
               SourceOp = "Text3D1ExtrusionProfile",
               Source = "Value",
            },
            ExtrusionDepth = Input { Value = 0.0535, }
         },
         ViewInfo = OperatorInfo { Pos = { 587.788, 98.6893 } },
      },
      Text3D1ExtrusionProfile = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.0666666666666667, 0.333333333333333 }, Flags = { Linear = true } },
               [0.2] = { 1, LH = { 0.133333333333333, 0.666666666666667 }, RH = { 0.4, 1 }, Flags = { Linear = true } },
               [0.8] = { 1, LH = { 0.6, 1 }, RH = { 0.866666666666667, 0.666666666666667 }, Flags = { Linear = true } },
               [1] = { 0, LH = { 0.933333333333333, 0.333333333333333 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 0, Blue = 0 },
         CtrlWZoom = false,
         NameSet = true,
      },
      Cube_1_Vert_2 = Cube3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.153912576087384, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.096, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 0.05, },
            ["SurfaceCubeInputs.Width"] = Input { Value = 0.8, },
            ["SurfaceCubeInputs.SubdivisionWidth"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Visibility.CullBackFace"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Normals.Scale"] = Input { Value = 0, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            MtlFace = Input { Value = 2, },
            ["Front.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Front.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725490196078, },
            ["Front.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Front.MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["Right.MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["Left.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.12, },
            ["Left.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.28, },
            ["Left.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.1, },
            ["Left.MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.575, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.559, },
            ["Bottom.MtlStdInputs.MaterialID"] = Input { Value = 5, },
            ["Top.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.572549019607843, },
            ["Top.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.556862745098039, },
            ["Top.MtlStdInputs.MaterialID"] = Input { Value = 6, },
            ["Back.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Back.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725507259369, },
            ["Back.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Back.MtlStdInputs.MaterialID"] = Input { Value = 8, }
         },
         ViewInfo = OperatorInfo { Pos = { -67.6268, 122.043 } },
      },
      Merge3D3 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Merge3D4",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 1191.59, 36.4219 } },
      },
      Cube_1_Vert_3 = Cube3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.058, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.0625982586320532, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.096, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 0.05, },
            ["SurfaceCubeInputs.Width"] = Input { Value = 0.8, },
            ["SurfaceCubeInputs.SubdivisionWidth"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Visibility.CullBackFace"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Normals.Scale"] = Input { Value = 0, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            MtlFace = Input { Value = 2, },
            ["Front.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Front.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725490196078, },
            ["Front.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Front.MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["Right.MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["Left.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.12, },
            ["Left.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.28, },
            ["Left.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.1, },
            ["Left.MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.575, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.559, },
            ["Bottom.MtlStdInputs.MaterialID"] = Input { Value = 5, },
            ["Top.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.572549019607843, },
            ["Top.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.556862745098039, },
            ["Top.MtlStdInputs.MaterialID"] = Input { Value = 6, },
            ["Back.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Back.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725507259369, },
            ["Back.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Back.MtlStdInputs.MaterialID"] = Input { Value = 8, }
         },
         ViewInfo = OperatorInfo { Pos = { -70.4552, 167.9 } },
      },
      Camera3D1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.27114967462039, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.144613159797542, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 1.65, },
            ["Transform3DOp.Rotate.X"] = Input { Value = 1.8, },
            ["Transform3DOp.Rotate.Y"] = Input { Value = -1.6, },
            ["Transform3DOp.UseTarget"] = Input { Value = 1, },
            AoV = Input { Value = 19.2642683071402, },
            ["Stereo.Mode"] = Input { Value = FuID { "OffAxis" }, },
            FilmBack = Input { Value = 1, },
            FilmGate = Input { Value = FuID { "BMD_URSA_4K_16x9" }, },
            ApertureW = Input { Value = 0.831496062992126, },
            ApertureH = Input { Value = 0.467716535433071, },
            ControlVis = Input { Value = 1, },
            PlaneOfFocusVis = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 1191.59, -39.1982 } },
      },
      Barre_Oblique_1 = Text3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.69, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.007, },
            ["Transform3DOp.Rotate.Z"] = Input { Value = -39, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = -0.04, },
            ["Transform3DOp.Pivot.Y"] = Input { Value = -0.75, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.3, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.277, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 2.205, },
            ["Transform3DOp.TargetNest"] = Input { Value = 0, },
            Center = Input { Value = { 0.464, -0.424 }, },
            LayoutRotation = Input { Value = 1, },
            TransformRotation = Input { Value = 1, },
            Opacity1 = Input { Value = 0.795, },
            Red1 = Input { Value = 0.433, },
            Green1 = Input { Value = 0, },
            Blue1 = Input { Value = 0, },
            SpecularRed = Input { Value = 0.551, },
            SpecularGreen = Input { Value = 0, },
            SpecularBlue = Input { Value = 0, },
            SpecularExponent = Input { Value = 100, },
            StyledText = Input { Value = "/\n", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 0.47, },
            VerticalJustification = Input { Value = 3, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
            Extrusion = Input { Value = 1, },
            ExtrusionProfile = Input {
               SourceOp = "Barre_Oblique_1ExtrusionProfile",
               Source = "Value",
            },
            ExtrusionDepth = Input { Value = 0.0126, }
         },
         ViewInfo = OperatorInfo { Pos = { 587.788, 157.801 } },
      },
      Barre_Oblique_1ExtrusionProfile = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.0666666666666667, 0.333333333333333 }, Flags = { Linear = true } },
               [0.2] = { 1, LH = { 0.133333333333333, 0.666666666666667 }, RH = { 0.4, 1 }, Flags = { Linear = true } },
               [0.8] = { 1, LH = { 0.6, 1 }, RH = { 0.866666666666667, 0.666666666666667 }, Flags = { Linear = true } },
               [1] = { 0, LH = { 0.933333333333333, 0.333333333333333 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 0, Blue = 0 },
         CtrlWZoom = false,
         NameSet = true,
      },
      Renderer3D1_1 = Renderer3D {
         CtrlWZoom = false,
         CustomData = {
            ToolVersion = 2,
         },
         Inputs = {
            ["RendererSoftware.ShadowsEnabled"] = Input { Value = 1, },
            ["RendererSoftware.Channels.Nest"] = Input { Value = 1, },
            ["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
            Quality = Input { Value = 6, },
            GlobalOut = Input { Value = 500, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            Depth = Input { Value = 1, },
            AutoCropDataWindow = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D3",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL" }, },
            ["RendererOpenGL.Channels.Nest"] = Input { Value = 1, },
            ["RendererOpenGL.AntiAliasing.Channels.RGBA.HighQuality.Enable"] = Input { Value = 1, },
            ["RendererOpenGL.AntiAliasing.Presets.Color.Supersampling.HighQuality.Rate"] = Input { Value = 3, },
            ["RendererOpenGL.AntiAliasing.Presets.Color.Multisampling.LowQuality.SampleCount"] = Input { Value = 2, },
            ["RendererOpenGL.AntiAliasing.Presets.Color.Multisampling.HighQuality.SampleCount"] = Input { Value = 3, },
            ["RendererOpenGL.AntiAliasing.Presets.Aux.Supersampling.HighQuality.Rate"] = Input { Value = 3, },
            ["RendererOpenGL.AntiAliasing.Presets.Aux.Multisampling.LowQuality.SampleCount"] = Input { Value = 2, },
            ["RendererOpenGL.AntiAliasing.Presets.Aux.Multisampling.HighQuality.SampleCount"] = Input { Value = 3, },
            ["RendererOpenGL.AccumulationEffects"] = Input { Value = 1, },
            ["RendererOpenGL.AccumQuality"] = Input { Value = 32, },
            ["RendererOpenGL.DoFBlur"] = Input { Value = 0.1, },
            ["RendererOpenGL.LightingEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.MaximumTextureDepth"] = Input { Value = 3, }
         },
         ViewInfo = OperatorInfo { Pos = { 1385.59, 36.4219 } },
         SubInputsData = {
            RendererOpenGL = {
               Version = 1
            }
         }
      },
      Cube_1_Vert_4 = Cube3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.058, },
            ["Transform3DOp.Translate.Y"] = Input { Value = -0.0704888071862462, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.096, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 0.05, },
            ["SurfaceCubeInputs.Width"] = Input { Value = 0.8, },
            ["SurfaceCubeInputs.SubdivisionWidth"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Visibility.CullBackFace"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Normals.Scale"] = Input { Value = 0, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            MtlFace = Input { Value = 2, },
            ["Front.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Front.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725490196078, },
            ["Front.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Front.MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["Right.MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["Left.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.12, },
            ["Left.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.28, },
            ["Left.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.1, },
            ["Left.MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.575, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.559, },
            ["Bottom.MtlStdInputs.MaterialID"] = Input { Value = 5, },
            ["Top.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.572549019607843, },
            ["Top.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.556862745098039, },
            ["Top.MtlStdInputs.MaterialID"] = Input { Value = 6, },
            ["Back.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Back.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725507259369, },
            ["Back.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Back.MtlStdInputs.MaterialID"] = Input { Value = 8, }
         },
         ViewInfo = OperatorInfo { Pos = { -72.3409, 221.467 } },
      }
   }
}


If you use motion blur that will slow down the rendering a lot as one would expect, so you can either render out the motion vectors and apply motion blur using Vector motion blur tool, or if you plan on doing a lot of motion blur, I suggest you look into third party solutions like RSMB Real Smart Motion Blur from REVisionFX which has proper GPU acceleration and does really good rendering of motion blur and much faster. Its one of those must have plug ins if you do lot of motion blur.
Offline
User avatar

Chad Capeland

  • Posts: 3272
  • Joined: Mon Nov 10, 2014 9:40 pm

Re: How to switch (activate/deactivate) replacematerial/shad

PostFri Mar 21, 2025 5:53 pm

The SceneInput of the ReplaceMaterial is not connected.
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Artenis

  • Posts: 35
  • Joined: Thu Apr 04, 2024 3:32 pm
  • Real Name: Raphael KUHN

Re: How to switch (activate/deactivate) replacematerial/shad

PostFri Mar 21, 2025 7:25 pm

Here the complete animation script for this cube:
I'm willing to believe that motion blur slows down rendering, but in my case only the “Kaz_...” shader multiplies it. Without Shaders the animation render in 15s . I think the shaders react to the lights (new script), which would explain the calculation time.
The SwitchAnything node doesn't want to work or I don't know how to use it.

Code: Select all
{
   Tools = ordered() {
      kas_MetalGalvanized_2 = GroupOperator {
         NameSet = true,
         CustomData = {
            Settings = {
            },
            HelpPage = "https://www.steakunderwater.com/wesuckless/viewtopic.php?p=25255#p25255",
            Path = {
               Map = {
                  ["Setting:"] = "Macros:/KickAss ShaderZ/Native ShaderZ/Industrial/"
               }
            }
         },
         Inputs = ordered() {
            Comments = Input { Value = "\"kas_MetalGalvanized\" creates an industrial sheet metal material. \n\nCopyright Credits \nkas_Parkland.exr\n\nCreative Commons:\nEgg mountain at afternoon \n\nBy:\nhttps://hdrmaps.com \n\nIs licensed under:\nCC BY 2.0", },
            TextureMap = InstanceInput {
               SourceOp = "TextureInputSwitchElseFuse_2",
               Source = "Input1",
               Name = "TextureMap",
            },
            BackgroundTextureMap = InstanceInput {
               SourceOp = "BackgroundTextureInputSwitchElseFuse_2",
               Source = "Input1",
               Name = "BackgroundTextureMap",
            },
            EnvironmentMap = InstanceInput {
               SourceOp = "EnvironmentMapInputSwitchElseFuse",
               Source = "Input1",
               Name = "EnvironmentMap",
            }
         },
         Outputs = {
            Material = InstanceOutput {
               SourceOp = "ShaderPipeRouter_2",
               Source = "Output",
               Name = "Material Output",
            }
         },
         ViewInfo = GroupInfo {
            Pos = { 1893.43, 798.074 },
            Flags = {
               AllowPan = false,
               AutoSnap = true
            },
            Size = { 674.94, 251.013, 459.064, 21.3808 },
            Direction = "Horizontal",
            PipeStyle = "Direct",
            Scale = 1,
            Offset = { -1381.99, -284.889 }
         },
         Tools = ordered() {
            ParklandLoader_2 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_Parkland.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
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
                  ["Clip1.OpenEXRFormat.RedName"] = Input { Value = FuID { "R" }, },
                  ["Clip1.OpenEXRFormat.GreenName"] = Input { Value = FuID { "G" }, },
                  ["Clip1.OpenEXRFormat.BlueName"] = Input { Value = FuID { "B" }, },
                  ["Clip1.OpenEXRFormat.AlphaName"] = Input { Value = FuID { "A" }, },
                  Comments = Input { Value = "Copyright Credits \nkas_Parkland.exr\n\nCreative Commons:\nEgg mountain at afternoon \n\nBy:\nhttps://hdrmaps.com \n\nIs licensed under:\nCC BY 2.0", }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 313.5 } },
            },
            AgedSteelPlateLoader_2 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_AgedSteelPlate.jpg",
                     FormatID = "JpegFormat",
                     StartFrame = -1,
                     LengthSetManually = true,
                     TrimIn = 0,
                     TrimOut = 0,
                     ExtendFirst = 0,
                     ExtendLast = 0,
                     Loop = 0,
                     AspectMode = 0,
                     Depth = 0,
                     TimeCode = 0,
                     GlobalStart = 0,
                     GlobalEnd = 0
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 313.5 } },
            },
            GalvanizedSheetMetal_2 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_GalvanizedSheetMetal.jpg",
                     FormatID = "JpegFormat",
                     StartFrame = -1,
                     LengthSetManually = true,
                     TrimIn = 0,
                     TrimOut = 0,
                     ExtendFirst = 0,
                     ExtendLast = 0,
                     Loop = 0,
                     AspectMode = 0,
                     Depth = 0,
                     TimeCode = 0,
                     GlobalStart = 0,
                     GlobalEnd = 0
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               ViewInfo = OperatorInfo { Pos = { 1210, 313.5 } },
            },
            EnvironmentMapInputSwitchElseFuse = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "ParklandLoader_2",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 346.5 } },
               Version = 100
            },
            TextureInputSwitchElseFuse_2 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "AgedSteelPlateLoader_2",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 346.5 } },
               Version = 100
            },
            ShaderPipeRouter_2 = PipeRouter {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Input = Input {
                     SourceOp = "MetalGalvanizedReflect_2",
                     Source = "MaterialOutput",
                  }
               },
               ViewInfo = PipeRouterInfo { Pos = { 1540, 478.5 } },
            },
            MetalGalvanizedReflect_2 = MtlReflect {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  BackgroundMaterial = Input {
                     SourceOp = "GalvanizedPhong_2",
                     Source = "MaterialOutput",
                  },
                  ["Reflection.GlancingStrength"] = Input { Value = 0, },
                  ["Reflection.FaceOnStrength"] = Input { Value = 0.52, },
                  ["Reflection.Falloff"] = Input { Value = 1.9946667, },
                  ["Reflection.Color.Material"] = Input {
                     SourceOp = "ParkandSphereMap_2",
                     Source = "MaterialOutput",
                  },
                  ["Reflection.Intensity.Material"] = Input {
                     SourceOp = "RedToAlphaChannelBooleans_2",
                     Source = "Output",
                  },
                  ["Refraction.RefractiveIndex.RGB"] = Input { Value = 1.0065, },
                  MaterialID = Input { Value = 82, }
               },
               ViewInfo = OperatorInfo { Pos = { 1375, 478.5 } },
            },
            ParkandSphereMap_2 = SphereMap {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Rotation = Input { Value = 1, },
                  ["Rotate.Y"] = Input { Value = -65, },
                  Image = Input {
                     SourceOp = "ParklandBlur_2",
                     Source = "Output",
                  },
                  MaterialID = Input { Value = 15, }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 412.5 } },
            },
            GalvanizedPhong_2 = MtlPhong {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Diffuse.Color.Material"] = Input {
                     SourceOp = "GalvanizedColorCorrector_2",
                     Source = "Output",
                  },
                  ["Specular.Nest"] = Input { Value = 1, },
                  ["Specular.Color.Blue"] = Input { Value = 0.866666666666667, },
                  ["Specular.Intensity"] = Input { Value = 0.5, },
                  ["Specular.Intensity.Material"] = Input {
                     SourceOp = "RedToAlphaChannelBooleans_2",
                     Source = "Output",
                  },
                  ["Specular.Exponent"] = Input { Value = 1, },
                  ["Transmittance.Nest"] = Input { Value = 1, },
                  ["Transmittance.Color.Red"] = Input { Value = 1, },
                  ["Transmittance.Color.Green"] = Input { Value = 1, },
                  ["Transmittance.Color.Blue"] = Input { Value = 1, },
                  MaterialID = Input { Value = 78, }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 412.5 } },
            },
            GalvanizedColorCorrector_2 = ColorCorrector {
               NameSet = true,
               Inputs = {
                  WheelSaturation1 = Input { Value = 2, },
                  WheelTintAngle1 = Input { Value = -0.0118552591674745, },
                  WheelTintLength1 = Input { Value = 1, },
                  MasterRGBContrast = Input { Value = 2.37, },
                  MasterRGBGamma = Input { Value = 0.55, },
                  ColorRanges = Input {
                     Value = ColorCurves {
                        Curves = {
                           {
                              Points = {
                                 { 0, 1 },
                                 { 0.4, 0.2 },
                                 { 0.6, 0 },
                                 { 1, 0 }
                              }
                           },
                           {
                              Points = {
                                 { 0, 0 },
                                 { 0.4, 0 },
                                 { 0.6, 0.2 },
                                 { 1, 1 }
                              }
                           }
                        }
                     },
                  },
                  Input = Input {
                     SourceOp = "BackgroundTextureInputSwitchElseFuse_2",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 378.716 } },
            },
            RedToAlphaChannelBooleans_2 = ChannelBoolean {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ToAlpha = Input { Value = 5, },
                  Background = Input {
                     SourceOp = "AgedBrightnessContrast_2",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1045, 478.5 } },
            },
            AgedBrightnessContrast_2 = BrightnessContrast {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Saturation = Input { Value = 0, },
                  Low = Input { Value = 0.4289855, },
                  High = Input { Value = 0.626087, },
                  Input = Input {
                     SourceOp = "TextureInputSwitchElseFuse_2",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 379.5 } },
            },
            ParklandBlur_2 = Blur {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Filter = Input { Value = FuID { "Gaussian" }, },
                  XBlurSize = Input { Value = 15, },
                  Input = Input {
                     SourceOp = "EnvironmentMapInputSwitchElseFuse",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 379.5 } },
            },
            BackgroundTextureInputSwitchElseFuse_2 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "GalvanizedSheetMetal_2",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 346.5 } },
               Version = 100
            }
         },
      },
      ReplaceMaterial3D2 = ReplaceMaterial3D {
         Inputs = {
            MaterialInput = Input {
               SourceOp = "ShaderPipeRouter_2",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 16, }
         },
         ViewInfo = OperatorInfo { Pos = { 1892.84, 838.172 } },
      },
      SwitchAnything1 = Fuse.SwitchAnything {
         CtrlWZoom = false,
         Inputs = {
            DataType = Input { Value = FuID { "DataType3D" }, },
            Which = Input { Value = 1, },
            Input2 = Input {
               SourceOp = "ReplaceMaterial3D2",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 1914.12, 890.5 } },
         Version = 101
      },
      Merge3D2_1_1 = Merge3D {
         Inputs = {
            PassThroughLights = Input { Value = 1, },
            SceneInput1 = Input {
               SourceOp = "PremierEssai_1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "SpotLight1_2",
               Source = "Output",
            },
            SceneInput10 = Input {
               SourceOp = "SpotLight1_1_1",
               Source = "Output",
            },
            SceneInput5 = Input {
               SourceOp = "Camera3D1_1",
               Source = "Output",
            },
            SceneInput9 = Input {
               SourceOp = "AmbientLight1_1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 2294.06, 934.797 } },
      },
      Merge3D5 = Merge3D {
         Inputs = {
            PassThroughLights = Input { Value = 1, },
            SceneInput1 = Input {
               SourceOp = "SwitchAnything1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Cube_1_Vert_3",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 1911.88, 937.103 } },
      },
      Cube_1_Vert_3 = Cube3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.058, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.096, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 0.05, },
            ["SurfaceCubeInputs.Width"] = Input { Value = 0.8, },
            ["SurfaceCubeInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Normals.Scale"] = Input { Value = 0, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            MtlFace = Input { Value = 2, },
            ["Front.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Front.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725490196078, },
            ["Front.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Front.MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["Right.MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["Left.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.12, },
            ["Left.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.28, },
            ["Left.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.1, },
            ["Left.MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.575, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.559, },
            ["Bottom.MtlStdInputs.MaterialID"] = Input { Value = 5, },
            ["Top.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.572549019607843, },
            ["Top.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.556862745098039, },
            ["Top.MtlStdInputs.MaterialID"] = Input { Value = 6, },
            ["Back.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Back.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725507259369, },
            ["Back.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Back.MtlStdInputs.MaterialID"] = Input { Value = 8, }
         },
         ViewInfo = OperatorInfo { Pos = { 1759.91, 937.196 } },
      },
      Merge3D6 = Merge3D {
         Inputs = {
            PassThroughLights = Input { Value = 1, },
            SceneInput1 = Input {
               SourceOp = "Merge3D1_3",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Merge3D5",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 2061.89, 937.103 } },
      },
      PremierEssai_1 = Transform3D {
         NameSet = true,
         EnabledRegion = TimeRegion { { Start = -5, End = 143.9999 } },
         Inputs = {
            SceneInput = Input {
               SourceOp = "Merge3D6",
               Source = "Output",
            },
            ["Transform3DOp.Translation"] = Input { Value = -1, },
            ["Transform3DOp.Translate.X"] = Input { Value = 0.00238192579831753, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.0605553166586205, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.0272258989570263, },
            ["Transform3DOp.Rotate.X"] = Input {
               SourceOp = "PremierEssai_1XRotation",
               Source = "Value",
            },
            ["Transform3DOp.Rotate.Y"] = Input { Value = 5, },
            ["Transform3DOp.PivotNest"] = Input { Value = -1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.X"] = Input { Value = 2.205, }
         },
         ViewInfo = OperatorInfo { Pos = { 2178.39, 935.394 } },
      },
      PremierEssai_1XRotation = BezierSpline {
         SplineColor = { Red = 255, Green = 128, Blue = 128 },
         CtrlWZoom = false,
         NameSet = true,
         KeyFrames = {
            [13] = { -480, RH = { 15.6666666666667, -315 } },
            [21] = { 15, LH = { 18.3333333333333, -150 }, Flags = { Linear = true } }
         }
      },
      Renderer3D1 = Renderer3D {
         CustomData = {
            ToolVersion = 2,
         },
         Inputs = {
            GlobalOut = Input { Value = 143, },
            Width = Input { Value = 720, },
            Height = Input { Value = 1280, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D2_1_1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 2429.42, 934.932 } },
      },
      Merge3D1_3 = Merge3D {
         Inputs = {
            PassThroughLights = Input { Value = 1, },
            SceneInput2 = Input {
               SourceOp = "Text3D1_3",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 2039.5, 1009.51 } },
      },
      MediaOut1 = MediaOut {
         Inputs = {
            Index = Input { Value = "0", },
            Input = Input {
               SourceOp = "Renderer3D1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 2549.2, 934.931 } },
      },
      CamLight_1 = GroupOperator {
         NameSet = true,
         Outputs = {
            Output1 = InstanceOutput {
               SourceOp = "SpotLight1_2",
               Source = "Output",
            },
            Output4 = InstanceOutput {
               SourceOp = "Camera3D1_1",
               Source = "Output",
            },
            Output2 = InstanceOutput {
               SourceOp = "SpotLight1_1_1",
               Source = "Output",
            },
            Output3 = InstanceOutput {
               SourceOp = "AmbientLight1_1",
               Source = "Output",
            }
         },
         ViewInfo = GroupInfo {
            Pos = { 2293.91, 1055.02 },
            Flags = {
               AllowPan = false,
               AutoSnap = true,
               RemoveRouters = true
            },
            Size = { 269.066, 132.364, 134.533, 24.2424 },
            Direction = "Horizontal",
            PipeStyle = "Direct",
            Scale = 1,
            Offset = { -1449.81, -166.848 }
         },
         Tools = ordered() {
            SpotLight1_2 = LightSpot {
               CtrlWShown = false,
               Inputs = {
                  ["Transform3DOp.Translate.X"] = Input { Value = 1.06414284875327, },
                  ["Transform3DOp.Translate.Y"] = Input { Value = 0.0806969849076504, },
                  ["Transform3DOp.Translate.Z"] = Input { Value = 0.359982690977718, },
                  ["Transform3DOp.Rotate.Y"] = Input { Value = 67.8, },
                  Intensity = Input { Value = 1.622, },
                  ConeAngle = Input { Value = 53.86, },
                  Dropoff = Input { Value = 3.63, },
                  ["ShadowLightInputs3D.ShadowsEnabled"] = Input { Value = 1, },
                  ["ShadowLightInputs3D.ShadowMapSize"] = Input { Value = 2048, }
               },
               ViewInfo = OperatorInfo { Pos = { 1521.34, 175.484 } },
            },
            SpotLight1_1_1 = LightSpot {
               CtrlWShown = false,
               Inputs = {
                  ["Transform3DOp.Translate.X"] = Input { Value = 0.0326790475619907, },
                  ["Transform3DOp.Translate.Y"] = Input { Value = -0.659634500117409, },
                  ["Transform3DOp.Translate.Z"] = Input { Value = 0.0658189727836436, },
                  ["Transform3DOp.Rotate.Y"] = Input { Value = -78.3, },
                  ["Transform3DOp.Rotate.Z"] = Input { Value = 73, },
                  Intensity = Input { Value = 1.559, },
                  ConeAngle = Input { Value = 53.86, },
                  Dropoff = Input { Value = 3.63, },
                  ["ShadowLightInputs3D.ShadowsEnabled"] = Input { Value = 1, },
                  ["ShadowLightInputs3D.ShadowMapSize"] = Input { Value = 2048, }
               },
               ViewInfo = OperatorInfo { Pos = { 1521.34, 208.484 } },
            },
            AmbientLight1_1 = LightAmbient {
               CtrlWShown = false,
               Inputs = {
                  ["Transform3DOp.Translate.X"] = Input { Value = 0.0962544770462956, },
                  ["Transform3DOp.Translate.Y"] = Input { Value = 0.0316490447164209, },
                  ["Transform3DOp.Translate.Z"] = Input { Value = 0.112857810107301, },
                  Intensity = Input { Value = 0.189, }
               },
               ViewInfo = OperatorInfo { Pos = { 1521.34, 241.484 } },
            },
            Camera3D1_1 = Camera3D {
               CtrlWShown = false,
               Inputs = {
                  ["Transform3DOp.Translate.X"] = Input { Value = 0.155, },
                  ["Transform3DOp.Translate.Y"] = Input { Value = -0.035, },
                  ["Transform3DOp.Translate.Z"] = Input { Value = 0.79, },
                  ["Transform3DOp.Rotate.X"] = Input { Value = 5.9, },
                  AoV = Input { Value = 71.8143923067591, },
                  FLength = Input { Value = 8.20361875207036, },
                  ["Stereo.Mode"] = Input { Value = FuID { "Mono" }, },
                  FilmBack = Input { Value = 1, },
                  FilmGate = Input { Value = FuID { "BMD_URSA_4K_16x9" }, },
                  ApertureW = Input { Value = 0.831496062992126, },
                  ApertureH = Input { Value = 0.467716535433071, },
                  LensShiftX = Input { Value = -0.195, },
                  LensShiftY = Input { Value = -0.359, },
                  ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
                  ["MtlStdInputs.MaterialID"] = Input { Value = 1, }
               },
               ViewInfo = OperatorInfo { Pos = { 1378.27, 236.184 } },
            }
         },
      },
      Text3D1_3 = Text3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Barre_Oblique_1_3",
               Source = "Output",
            },
            ["Transform3DOp.Translate.X"] = Input { Value = 0.092, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.06, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.024, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = -0.03, },
            ["Transform3DOp.Pivot.Y"] = Input { Value = -0.06, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.9, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.8, },
            Center = Input { Value = { 0.464, 0.424 }, },
            LayoutRotation = Input { Value = 1, },
            TransformRotation = Input { Value = 1, },
            StyledText = Input { Value = "10", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 0.08, },
            VerticalTopCenterBottom = Input { Value = 1, },
            VerticalJustification = Input { Value = 3, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
            Extrusion = Input { Value = 1, },
            ExtrusionProfile = Input {
               SourceOp = "Text3D1ProfileExtrusion_3",
               Source = "Value",
            },
            ExtrusionDepth = Input { Value = 0.0535, }
         },
         ViewInfo = OperatorInfo { Pos = { 2039.52, 1055.24 } },
      },
      Text3D1ProfileExtrusion_3 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.0666666666666667, 0.333333333333333 }, Flags = { Linear = true } },
               [0.2] = { 1, LH = { 0.133333333333333, 0.666666666666667 }, RH = { 0.4, 1 }, Flags = { Linear = true } },
               [0.8] = { 1, LH = { 0.6, 1 }, RH = { 0.866666666666667, 0.666666666666667 }, Flags = { Linear = true } },
               [1] = { 0, LH = { 0.933333333333333, 0.333333333333333 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 0, Blue = 0 },
         CtrlWZoom = false,
      },
      Barre_Oblique_1_3 = Text3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.69, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.007, },
            ["Transform3DOp.Rotate.Z"] = Input { Value = -39, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = -0.04, },
            ["Transform3DOp.Pivot.Y"] = Input { Value = -0.75, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.3, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.277, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 2.205, },
            ["Transform3DOp.TargetNest"] = Input { Value = 0, },
            Center = Input { Value = { 0.464, -0.424 }, },
            LayoutRotation = Input { Value = 1, },
            TransformRotation = Input { Value = 1, },
            Opacity1 = Input { Value = 0.795, },
            Red1 = Input { Value = 0.433, },
            Green1 = Input { Value = 0, },
            Blue1 = Input { Value = 0, },
            SpecularRed = Input { Value = 0.551, },
            SpecularGreen = Input { Value = 0, },
            SpecularBlue = Input { Value = 0, },
            SpecularExponent = Input { Value = 100, },
            StyledText = Input { Value = "/\n", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 0.47, },
            VerticalJustification = Input { Value = 3, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
            Extrusion = Input { Value = 1, },
            ExtrusionProfile = Input {
               SourceOp = "BarreobliqueProfileExtrusion_3",
               Source = "Value",
            },
            ExtrusionDepth = Input { Value = 0.0126, }
         },
         ViewInfo = OperatorInfo { Pos = { 2039.8, 1095.64 } },
      },
      BarreobliqueProfileExtrusion_3 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.0666666666666667, 0.333333333333333 }, Flags = { Linear = true } },
               [0.2] = { 1, LH = { 0.133333333333333, 0.666666666666667 }, RH = { 0.4, 1 }, Flags = { Linear = true } },
               [0.8] = { 1, LH = { 0.6, 1 }, RH = { 0.866666666666667, 0.666666666666667 }, Flags = { Linear = true } },
               [1] = { 0, LH = { 0.933333333333333, 0.333333333333333 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 0, Blue = 0 },
         CtrlWZoom = false,
      }
   }
}
Online
User avatar

KrunoSmithy

  • Posts: 4352
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Warnings: 1
  • Real Name: Kruno Stifter

Re: How to switch (activate/deactivate) replacematerial/shad

PostFri Mar 21, 2025 7:57 pm

Artenis wrote:Here the complete animation script for this cube: I'm willing to believe that motion blur slows down rendering,


You speak of these things such as shaders and motion blur as if they are personal choice of yours. There is nothing to bealive, its a fact. You add to render time as you increase number of calculations.

You also posted before on navigation in 3D space if I'm not mistaken. You seem to struggle with connecting nodes as well. Maybe you need to get over the basics of using the program before trying something more complex.

For example, once again you didn't utilize one of the inputs of "switch anything" and last time you didn't do it for the "replace material" either. Now after Chad gave you a comment about it, you ignored it like you did last time when I gave you a comment on the navigating 3D scene that you asked for.

Since you have never answered last question I ask either, which was what is is that you animating in the first place, you ignore advice on how to do basic node connections and continued to do so, and your node structure looks terribly inefficient and counter productive.

In the one you shared here, you have a bunch of lights for which I see no purpose whatsoever. Half the stuff you used is not needed as far as I can see. The shader in your example is also not needed, you can get pretty much the same with a fast noise texture. And at that size, its all you would need if you wanted something that looks like that.

With all do respect, I suggest you spend couple of weeks learning the basics of program before trying again.
Offline
User avatar

Chad Capeland

  • Posts: 3272
  • Joined: Mon Nov 10, 2014 9:40 pm

Re: How to switch (activate/deactivate) replacematerial/shad

PostFri Mar 21, 2025 8:00 pm

Shaders are evaluated per motion blur subframe, but this Fuse will limit them to updating per integer frame.

Code: Select all
version = "version .1 (Sept 7, 2012) Just seeing if this would fix Attila's comp"

FuRegisterClass("MtlTimeDiscretizer", CT_Tool, {
   REGS_Name = "Material Time Discretizer",
   REGS_Category = "AT 3D",
   REGS_OpIconString = "mTD",
   REGS_OpDescription = "Material Time Discretizer",
   REG_OpNoMask = true,
   REG_NoBlendCtrls = true,
   REG_NoObjMatCtrls = true,
   REG_NoMotionBlurCtrls = true,
   REG_NoPreCalcProcess = true,
   })

function Create()
   
   InLabel = self:AddInput(version, "version", {
      LINKID_DataType = "Text",
      INPID_InputControl = "LabelControl",
      INP_External = false,
      INP_Passive = true,
      })
      
   InEnable = self:AddInput("Enable", "Enable", {
      LINKID_DataType = "Number",   
      INPID_InputControl = "CheckboxControl",
      INP_Default = 1,
      ICD_Width = 0.18,
      })
      
   InEnableB = self:AddInput("EnableB", "EnableB", {
      LINKID_DataType = "Number",   
      INPID_InputControl = "CheckboxControl",
      INP_Default = 0,
      ICD_Width = 0.18,
      })
      
   InHideDiamonds = self:AddInput("Hide Keyframing Diamonds", "NoReset", {
      LINKID_DataType = "Number",
      INPID_InputControl = "CheckboxControl",
      INP_Integer = true,
      INP_Default = 1,
      IC_NoReset = true,
      INP_Passive = true,
      INP_DoNotifyChanged = true,
      ICS_ControlPage = "Common"
      })   
      
   InHideLabels = self:AddInput("Hide Labels", "NoLabel", {
      LINKID_DataType = "Number",
      INPID_InputControl = "CheckboxControl",
      INP_Integer = true,
      INP_Default = 1,
      IC_NoReset = true,
      INP_Passive = true,
      INP_DoNotifyChanged = true,
      ICS_ControlPage = "Common"
      })   

   InMtl = self:AddInput("Material Input", "MaterialInput", {
      LINKID_DataType = "MtlGraph3D",
      LINK_Main = 1,
      INP_SendRequest = false,
      INP_Required = false,
      })

   OutMtl = self:AddOutput("Material Output", "MaterialOutput", {
      LINKID_DataType = "MtlGraph3D",
      LINK_Main = 1,
      })            
end
 
function Process(req)
   local Enabled = (InEnable:GetValue(req).Value > 0.5)
   local mtl   

   if Enabled then
      mtl = InMtl:GetSource(math.floor(req.Time+0.5), req:GetFlags())
   else
      mtl = InMtl:GetSource(req.Time, req:GetFlags())
   end
   
   OutMtl:Set(req, mtl)
end

function NotifyChanged(inp, param, time)
   if inp == InHideDiamonds then
      if param.Value == 0 then
         InEnable:SetAttrs({IC_NoReset = false,})
         InEnableB:SetAttrs({IC_NoReset = false,})   
      else
         InEnable:SetAttrs({IC_NoReset = true,})
         InEnableB:SetAttrs({IC_NoReset = true,})
      end
   elseif inp == InHideLabels then
      if param.Value == 0 then
         InEnable:SetAttrs({IC_NoLabel = false,})
         InEnableB:SetAttrs({IC_NoLabel = false,})
      else
         InEnable:SetAttrs({IC_NoLabel = true,})
         InEnableB:SetAttrs({IC_NoLabel = true,})
      end
   end
end
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Artenis

  • Posts: 35
  • Joined: Thu Apr 04, 2024 3:32 pm
  • Real Name: Raphael KUHN

Re: How to switch (activate/deactivate) replacematerial/shad

PostSat Mar 22, 2025 5:09 pm

Thanks again KrunoSmithy and Chad for your time and answers.

You speak of these things such as shaders and motion blur as if they are personal choice of yours. There is nothing to bealive, it's a fact. You add to render time as you increase number of calculations.


You're right, it's motion blur that requires more computing time not shader.

You also posted before on navigation in 3D space if I'm not mistaken. You seem to struggle with connecting nodes as well. Maybe you need to get over the basics of using the program before trying something more complex.


I'm aware of this, but before I ask a question on the forum, I look first at the guide, then at the YouTube tutorials, then at the blackmagic forum. I recently watched all the blackmagic tutorials on motion graphics and 3D compositing.

Since you have never answered last question I ask either, which was what is is that you animating in the first place, you ignore advice on how to do basic node connections and continued to do so, and your node structure looks terribly inefficient and counter productive.


No explanation of the “switch node” in the Blackmagic 19.1 guide! (I searched for “switch” in the adobe search field and found no results).
If I haven't example I can't correct myself.
edit: sorry, i'm completely wrong. it's an adobe acrobat search problem. page 2403

I've understood my misunderstanding of the shader and motion and I solved the problem of the switch node and SwitchAnything too.

For example, once again you didn't utilize one of the inputs of "switch anything" and last time you didn't do it for the "replace material" either. Now after Chad gave you a comment about it, you ignored it like you did last time when I gave you a comment on the navigating 3D scene that you asked for.


About Navigating 3D scene I can't reproduce right now the problem. As for the 3d scene navigation problem, I think it's due to poor cache or RAM management on my MBPro. In any case, it's not the first time I've encountered the rotation problem in 3D plane navigation.

I didn't ignore Chad's advice because I didn't understand it: in my second post I did link SwitchAnything to ReplaceMaterial and Merge3D as in the examples provided.
However, I hadn't yet assimilated the simple logic that a condition requires two input elements and an output. And to think I often use it in PHP .

In the one you shared here, you have a bunch of lights for which I see no purpose whatsoever. Half the stuff you used is not needed as far as I can see. The shader in your example is also not needed, you can get pretty much the same with a fast noise texture. And at that size, it's all you would need if you wanted something that looks like that.


I agree with you, in the example they are useless.
I didn't know you could use a noise node as a texture and then apply it to a ReplaceMaterial for a cube . I'm actually using a noise node for this clip.
Even if you're right about the size of my elements, this animation will continually evolve and I plan to use a scale, so I prefer to keep the kas_MetalGalvanized texture.


With all do respect, I suggest you spend couple of weeks learning the basics of program before trying again.


Once again you're right, but it's very difficult to find video or written tutorials for each node combination.
As I said above, I always look in the Blackmagic guide before asking my questions and some terms don't exist despite the 4000+ pages.

edit: Having had a search problem in adobe acrobat, my previous comment is wrong, except for the node names which are translated by the software and which are difficult to translate for a search in the manual.


finally I succeeded with Switch(Swi) also with SwitchAnything :
Code: Select all
{
   Tools = ordered() {
      MediaOut1_2 = MediaOut {
         CtrlWZoom = false,
         Inputs = {
            Index = Input { Value = "0", },
            Input = Input {
               SourceOp = "Renderer3D1_1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 3404.71, 1898.89 } },
      },
      Renderer3D1_1 = Renderer3D {
         CustomData = { ToolVersion = 2, },
         Inputs = {
            MotionBlur = Input { Value = 1, },
            Quality = Input { Value = 8, },
            SampleSpread = Input { Value = 2.5, },
            GlobalOut = Input { Value = 143, },
            Width = Input { Value = 720, },
            Height = Input { Value = 1280, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D2_1_1_1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 3285.1, 1899.78 } },
      },
      Merge3D2_1_1_1 = Merge3D {
         Inputs = {
            PassThroughLights = Input { Value = 1, },
            SceneInput1 = Input {
               SourceOp = "PremierEssai_2",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 3155.27, 1900.65 } },
      },
      PremierEssai_2 = Transform3D {
         NameSet = true,
         EnabledRegion = TimeRegion { { Start = -5, End = 143.9999 } },
         Inputs = {
            SceneInput = Input {
               SourceOp = "Merge3D1_4",
               Source = "Output",
            },
            ["Transform3DOp.Translation"] = Input { Value = -1, },
            ["Transform3DOp.Translate.X"] = Input { Value = 0.00238192579831753, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.0605553166586205, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.0272258989570263, },
            ["Transform3DOp.Rotate.X"] = Input {
               SourceOp = "PremierEssai_2XRotation",
               Source = "Value",
            },
            ["Transform3DOp.Rotate.Y"] = Input { Value = 5, },
            ["Transform3DOp.PivotNest"] = Input { Value = -1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.X"] = Input { Value = 2.205, }
         },
         ViewInfo = OperatorInfo { Pos = { 3027.92, 1900.92 } },
      },
      PremierEssai_2XRotation = BezierSpline {
         SplineColor = { Red = 255, Green = 128, Blue = 128 },
         CtrlWZoom = false,
         NameSet = true,
         KeyFrames = {
            [13] = { -480, RH = { 15.6666666666667, -315 } },
            [21] = { 15, LH = { 18.3333333333333, -150 }, Flags = { Linear = true } }
         }
      },
      Switch1 = Switch {
         Inputs = {
            Input0 = Input {
               SourceOp = "ReplaceMaterial3D1_1_3",
               Source = "Output",
            },
            Input1 = Input {
               SourceOp = "Cube_1_Vert_4",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 2891.77, 1814.5 } },
         Colors = { TileColor = { R = 0.0823529411764706, G = 0.384313725490196, B = 0.517647058823529 }, }
      },
      Merge3D1_4 = Merge3D {
         Inputs = {
            PassThroughLights = Input { Value = 1, },
            SceneInput1 = Input {
               SourceOp = "Cube_1_Vert_4",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "Switch1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 2890.18, 1901.14 } },
      },
      ReplaceMaterial3D1_1_3 = ReplaceMaterial3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Cube_1_Vert_4",
               Source = "Output",
            },
            MaterialIDLimitMode = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "ShaderPipeRouter_1_3",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 7, }
         },
         ViewInfo = OperatorInfo { Pos = { 2749.86, 1813.78 } },
      },
      kas_MetalGalvanized_1_3 = GroupOperator {
         NameSet = true,
         CustomData = { Path = { Map = { ["Setting:"] = "Macros:/KickAss ShaderZ/Native ShaderZ/Industrial/" } }, Settings = {
            }, HelpPage = "https://www.steakunderwater.com/wesuckless/viewtopic.php?p=25255#p25255" },
         Inputs = ordered() {
            Comments = Input { Value = "\"kas_MetalGalvanized\" creates an industrial sheet metal material. \n\nCopyright Credits \nkas_Parkland.exr\n\nCreative Commons:\nEgg mountain at afternoon \n\nBy:\nhttps://hdrmaps.com \n\nIs licensed under:\nCC BY 2.0", },
            TextureMap = InstanceInput {
               SourceOp = "TextureInputSwitchElseFuse_1_3",
               Source = "Input1",
               Name = "TextureMap",
            },
            BackgroundTextureMap = InstanceInput {
               SourceOp = "BackgroundTextureInputSwitchElseFuse_1_3",
               Source = "Input1",
               Name = "BackgroundTextureMap",
            },
            EnvironmentMap = InstanceInput {
               SourceOp = "EnvironmentMapInputSwitchElseFuse_1_1_3",
               Source = "Input1",
               Name = "EnvironmentMap",
            }
         },
         Outputs = {
            Material = InstanceOutput {
               SourceOp = "ShaderPipeRouter_1_3",
               Source = "Output",
               Name = "Material Output",
            }
         },
         ViewInfo = GroupInfo {
            Pos = { 2749.93, 1759.84 },
            Flags = {
               AllowPan = false,
               AutoSnap = true
            },
            Size = { 674.94, 251.013, 459.064, 21.3808 },
            Direction = "Horizontal",
            PipeStyle = "Direct",
            Scale = 1,
            Offset = { -1381.99, -284.889 }
         },
         Tools = ordered() {
            ParklandLoader_1_3 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_Parkland.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
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
                  ["Clip1.OpenEXRFormat.RedName"] = Input { Value = FuID { "R" }, },
                  ["Clip1.OpenEXRFormat.GreenName"] = Input { Value = FuID { "G" }, },
                  ["Clip1.OpenEXRFormat.BlueName"] = Input { Value = FuID { "B" }, },
                  ["Clip1.OpenEXRFormat.AlphaName"] = Input { Value = FuID { "A" }, },
                  Comments = Input { Value = "Copyright Credits \nkas_Parkland.exr\n\nCreative Commons:\nEgg mountain at afternoon \n\nBy:\nhttps://hdrmaps.com \n\nIs licensed under:\nCC BY 2.0", }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 313.5 } },
            },
            AgedSteelPlateLoader_1_3 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_AgedSteelPlate.jpg",
                     FormatID = "JpegFormat",
                     StartFrame = -1,
                     LengthSetManually = true,
                     TrimIn = 0,
                     TrimOut = 0,
                     ExtendFirst = 0,
                     ExtendLast = 0,
                     Loop = 0,
                     AspectMode = 0,
                     Depth = 0,
                     TimeCode = 0,
                     GlobalStart = 0,
                     GlobalEnd = 0
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 313.5 } },
            },
            GalvanizedSheetMetal_1_3 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_GalvanizedSheetMetal.jpg",
                     FormatID = "JpegFormat",
                     StartFrame = -1,
                     LengthSetManually = true,
                     TrimIn = 0,
                     TrimOut = 0,
                     ExtendFirst = 0,
                     ExtendLast = 0,
                     Loop = 0,
                     AspectMode = 0,
                     Depth = 0,
                     TimeCode = 0,
                     GlobalStart = 0,
                     GlobalEnd = 0
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               ViewInfo = OperatorInfo { Pos = { 1210, 313.5 } },
            },
            EnvironmentMapInputSwitchElseFuse_1_1_3 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "ParklandLoader_1_3",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 346.5 } },
               Version = 100
            },
            TextureInputSwitchElseFuse_1_3 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "AgedSteelPlateLoader_1_3",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 346.5 } },
               Version = 100
            },
            ShaderPipeRouter_1_3 = PipeRouter {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Input = Input {
                     SourceOp = "MetalGalvanizedReflect_1_3",
                     Source = "MaterialOutput",
                  }
               },
               ViewInfo = PipeRouterInfo { Pos = { 1540, 478.5 } },
               Colors = { TileColor = { R = 0.0823529411764706, G = 0.384313725490196, B = 0.517647058823529 }, }
            },
            MetalGalvanizedReflect_1_3 = MtlReflect {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  BackgroundMaterial = Input {
                     SourceOp = "GalvanizedPhong_1_3",
                     Source = "MaterialOutput",
                  },
                  ["Reflection.GlancingStrength"] = Input { Value = 0, },
                  ["Reflection.FaceOnStrength"] = Input { Value = 0.52, },
                  ["Reflection.Falloff"] = Input { Value = 1.9946667, },
                  ["Reflection.Color.Material"] = Input {
                     SourceOp = "ParkandSphereMap_1_3",
                     Source = "MaterialOutput",
                  },
                  ["Reflection.Intensity.Material"] = Input {
                     SourceOp = "RedToAlphaChannelBooleans_1_3",
                     Source = "Output",
                  },
                  ["Refraction.RefractiveIndex.RGB"] = Input { Value = 1.0065, },
                  MaterialID = Input { Value = 82, }
               },
               ViewInfo = OperatorInfo { Pos = { 1375, 478.5 } },
            },
            ParkandSphereMap_1_3 = SphereMap {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Rotation = Input { Value = 1, },
                  ["Rotate.Y"] = Input { Value = -65, },
                  Image = Input {
                     SourceOp = "ParklandBlur_1_3",
                     Source = "Output",
                  },
                  MaterialID = Input { Value = 15, }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 412.5 } },
            },
            GalvanizedPhong_1_3 = MtlPhong {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Diffuse.Color.Material"] = Input {
                     SourceOp = "GalvanizedColorCorrector_1_3",
                     Source = "Output",
                  },
                  ["Specular.Nest"] = Input { Value = 1, },
                  ["Specular.Color.Blue"] = Input { Value = 0.866666666666667, },
                  ["Specular.Intensity"] = Input { Value = 0.5, },
                  ["Specular.Intensity.Material"] = Input {
                     SourceOp = "RedToAlphaChannelBooleans_1_3",
                     Source = "Output",
                  },
                  ["Specular.Exponent"] = Input { Value = 1, },
                  ["Transmittance.Nest"] = Input { Value = 1, },
                  ["Transmittance.Color.Red"] = Input { Value = 1, },
                  ["Transmittance.Color.Green"] = Input { Value = 1, },
                  ["Transmittance.Color.Blue"] = Input { Value = 1, },
                  MaterialID = Input { Value = 78, }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 412.5 } },
            },
            GalvanizedColorCorrector_1_3 = ColorCorrector {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  WheelSaturation1 = Input { Value = 3, },
                  WheelTintAngle1 = Input { Value = -0.01, },
                  WheelTintLength1 = Input { Value = 1, },
                  MasterRGBContrast = Input { Value = 0.83, },
                  MasterRGBGamma = Input { Value = 0.56, },
                  MasterRGBBrightness = Input { Value = -0.2, },
                  ColorRanges = Input {
                     Value = ColorCurves {
                        Curves = {
                           {
                              Points = {
                                 { 0, 1 },
                                 { 0.4, 0.2 },
                                 { 0.6, 0 },
                                 { 1, 0 }
                              }
                           },
                           {
                              Points = {
                                 { 0, 0 },
                                 { 0.4, 0 },
                                 { 0.6, 0.2 },
                                 { 1, 1 }
                              }
                           }
                        }
                     },
                  },
                  Input = Input {
                     SourceOp = "BackgroundTextureInputSwitchElseFuse_1_3",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 379.5 } },
            },
            RedToAlphaChannelBooleans_1_3 = ChannelBoolean {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ToAlpha = Input { Value = 5, },
                  Background = Input {
                     SourceOp = "AgedBrightnessContrast_1_3",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1045, 478.5 } },
            },
            AgedBrightnessContrast_1_3 = BrightnessContrast {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Saturation = Input { Value = 0, },
                  Low = Input { Value = 0.4289855, },
                  High = Input { Value = 0.626087, },
                  Input = Input {
                     SourceOp = "TextureInputSwitchElseFuse_1_3",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 379.5 } },
            },
            ParklandBlur_1_3 = Blur {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Filter = Input { Value = FuID { "Gaussian" }, },
                  XBlurSize = Input { Value = 15, },
                  Input = Input {
                     SourceOp = "EnvironmentMapInputSwitchElseFuse_1_1_3",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 379.5 } },
            },
            BackgroundTextureInputSwitchElseFuse_1_3 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "GalvanizedSheetMetal_1_3",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 346.5 } },
               Version = 100
            }
         },
      },
      Cube_1_Vert_4 = Cube3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.058, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.096, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 0.05, },
            ["SurfaceCubeInputs.Width"] = Input { Value = 0.8, },
            ["SurfaceCubeInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Normals.Scale"] = Input { Value = 0, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            MtlFace = Input { Value = 2, },
            ["Front.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Front.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725490196078, },
            ["Front.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Front.MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["Right.MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["Left.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.12, },
            ["Left.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.28, },
            ["Left.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.1, },
            ["Left.MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.575, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.559, },
            ["Bottom.MtlStdInputs.MaterialID"] = Input { Value = 5, },
            ["Top.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.572549019607843, },
            ["Top.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.556862745098039, },
            ["Top.MtlStdInputs.MaterialID"] = Input { Value = 6, },
            ["Back.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Back.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725507259369, },
            ["Back.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Back.MtlStdInputs.MaterialID"] = Input { Value = 8, }
         },
         ViewInfo = OperatorInfo { Pos = { 2693.9, 1900.59 } },
      }
   }
}
Online
User avatar

KrunoSmithy

  • Posts: 4352
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Warnings: 1
  • Real Name: Kruno Stifter

Re: How to switch (activate/deactivate) replacematerial/shad

PostSat Mar 22, 2025 6:00 pm

Now that you included a render 3D node, I see you are using software renderer, which is generally a lot slower than hardware render. I suggest you use Hardware renderer. Depending on the kind of things you are using, try to turn off update for anything that does not need to be animated such as images which will speed up rendering. Since I don't know what the final version will look like here are those two tweaks to speed it up.

By the way, switch node and switch modifiers have officially been added by Blackmagic only in the last version or so, but similar functionality existed in third party made tools like the mentioned switch anything, so you won't find official documentation for it by Blackmagic.

I added some lights as well and I added auto domain at the end to limit rendering to what you are actually outputting.

Code: Select all
{
   Tools = ordered() {
      kas_MetalGalvanized_1_4 = GroupOperator {
         NameSet = true,
         CustomData = { Path = { Map = { ["Setting:"] = "Macros:/KickAss ShaderZ/Native ShaderZ/Industrial/" } }, Settings = {
            }, HelpPage = "https://www.steakunderwater.com/wesuckless/viewtopic.php?p=25255#p25255" },
         Inputs = ordered() {
            Comments = Input { Value = "\"kas_MetalGalvanized\" creates an industrial sheet metal material. \n\nCopyright Credits \nkas_Parkland.exr\n\nCreative Commons:\nEgg mountain at afternoon \n\nBy:\nhttps://hdrmaps.com \n\nIs licensed under:\nCC BY 2.0", },
            TextureMap = InstanceInput {
               SourceOp = "TextureInputSwitchElseFuse_1_4",
               Source = "Input1",
               Name = "TextureMap",
            },
            BackgroundTextureMap = InstanceInput {
               SourceOp = "BackgroundTextureInputSwitchElseFuse_1_4",
               Source = "Input1",
               Name = "BackgroundTextureMap",
            },
            EnvironmentMap = InstanceInput {
               SourceOp = "EnvironmentMapInputSwitchElseFuse_1_1_4",
               Source = "Input1",
               Name = "EnvironmentMap",
            }
         },
         Outputs = {
            Material = InstanceOutput {
               SourceOp = "ShaderPipeRouter_1_4",
               Source = "Output",
               Name = "Material Output",
            }
         },
         ViewInfo = GroupInfo {
            Pos = { 2316.19, 123.656 },
            Flags = {
               AllowPan = false,
               AutoSnap = true
            },
            Size = { 674.94, 251.013, 459.064, 21.3808 },
            Direction = "Horizontal",
            PipeStyle = "Direct",
            Scale = 1,
            Offset = { -1381.99, -284.889 }
         },
         Tools = ordered() {
            ParklandLoader_1_4 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_Parkland.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
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
                  ["Clip1.OpenEXRFormat.RedName"] = Input { Value = FuID { "R" }, },
                  ["Clip1.OpenEXRFormat.GreenName"] = Input { Value = FuID { "G" }, },
                  ["Clip1.OpenEXRFormat.BlueName"] = Input { Value = FuID { "B" }, },
                  ["Clip1.OpenEXRFormat.AlphaName"] = Input { Value = FuID { "A" }, },
                  Comments = Input { Value = "Copyright Credits \nkas_Parkland.exr\n\nCreative Commons:\nEgg mountain at afternoon \n\nBy:\nhttps://hdrmaps.com \n\nIs licensed under:\nCC BY 2.0", }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 313.5 } },
            },
            AgedSteelPlateLoader_1_4 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_AgedSteelPlate.jpg",
                     FormatID = "JpegFormat",
                     StartFrame = -1,
                     LengthSetManually = true,
                     TrimIn = 0,
                     TrimOut = 0,
                     ExtendFirst = 0,
                     ExtendLast = 0,
                     Loop = 0,
                     AspectMode = 0,
                     Depth = 0,
                     TimeCode = 0,
                     GlobalStart = 0,
                     GlobalEnd = 0
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 313.5 } },
            },
            GalvanizedSheetMetal_1_4 = Loader {
               Clips = {
                  Clip {
                     ID = "Clip1",
                     Filename = "Macros:/KickAss ShaderZ/Assets/kas_GalvanizedSheetMetal.jpg",
                     FormatID = "JpegFormat",
                     StartFrame = -1,
                     LengthSetManually = true,
                     TrimIn = 0,
                     TrimOut = 0,
                     ExtendFirst = 0,
                     ExtendLast = 0,
                     Loop = 0,
                     AspectMode = 0,
                     Depth = 0,
                     TimeCode = 0,
                     GlobalStart = 0,
                     GlobalEnd = 0
                  }
               },
               CtrlWShown = false,
               NameSet = true,
               ViewInfo = OperatorInfo { Pos = { 1210, 313.5 } },
            },
            EnvironmentMapInputSwitchElseFuse_1_1_4 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "ParklandLoader_1_4",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 346.5 } },
               Version = 100
            },
            TextureInputSwitchElseFuse_1_4 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "AgedSteelPlateLoader_1_4",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 346.5 } },
               Version = 100
            },
            ShaderPipeRouter_1_4 = PipeRouter {
               HoldOutput = true,
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Input = Input {
                     SourceOp = "MetalGalvanizedReflect_1_4",
                     Source = "MaterialOutput",
                  }
               },
               ViewInfo = PipeRouterInfo { Pos = { 1540, 478.5 } },
               Colors = { TileColor = { R = 0.0823529411764706, G = 0.384313725490196, B = 0.517647058823529 }, }
            },
            MetalGalvanizedReflect_1_4 = MtlReflect {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  BackgroundMaterial = Input {
                     SourceOp = "GalvanizedPhong_1_4",
                     Source = "MaterialOutput",
                  },
                  ["Reflection.GlancingStrength"] = Input { Value = 0, },
                  ["Reflection.FaceOnStrength"] = Input { Value = 0.52, },
                  ["Reflection.Falloff"] = Input { Value = 1.9946667, },
                  ["Reflection.Color.Material"] = Input {
                     SourceOp = "ParkandSphereMap_1_4",
                     Source = "MaterialOutput",
                  },
                  ["Reflection.Intensity.Material"] = Input {
                     SourceOp = "RedToAlphaChannelBooleans_1_4",
                     Source = "Output",
                  },
                  ["Refraction.RefractiveIndex.RGB"] = Input { Value = 1.0065, },
                  MaterialID = Input { Value = 82, }
               },
               ViewInfo = OperatorInfo { Pos = { 1375, 478.5 } },
            },
            ParkandSphereMap_1_4 = SphereMap {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Rotation = Input { Value = 1, },
                  ["Rotate.Y"] = Input { Value = -65, },
                  Image = Input {
                     SourceOp = "ParklandBlur_1_4",
                     Source = "Output",
                  },
                  MaterialID = Input { Value = 15, }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 412.5 } },
            },
            GalvanizedPhong_1_4 = MtlPhong {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ["Diffuse.Color.Material"] = Input {
                     SourceOp = "GalvanizedColorCorrector_1_4",
                     Source = "Output",
                  },
                  ["Specular.Nest"] = Input { Value = 1, },
                  ["Specular.Color.Blue"] = Input { Value = 0.866666666666667, },
                  ["Specular.Intensity"] = Input { Value = 0.5, },
                  ["Specular.Intensity.Material"] = Input {
                     SourceOp = "RedToAlphaChannelBooleans_1_4",
                     Source = "Output",
                  },
                  ["Specular.Exponent"] = Input { Value = 1, },
                  ["Transmittance.Nest"] = Input { Value = 1, },
                  ["Transmittance.Color.Red"] = Input { Value = 1, },
                  ["Transmittance.Color.Green"] = Input { Value = 1, },
                  ["Transmittance.Color.Blue"] = Input { Value = 1, },
                  MaterialID = Input { Value = 78, }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 412.5 } },
            },
            GalvanizedColorCorrector_1_4 = ColorCorrector {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  WheelSaturation1 = Input { Value = 3, },
                  WheelTintAngle1 = Input { Value = -0.01, },
                  WheelTintLength1 = Input { Value = 1, },
                  MasterRGBContrast = Input { Value = 0.83, },
                  MasterRGBGamma = Input { Value = 0.56, },
                  MasterRGBBrightness = Input { Value = -0.2, },
                  ColorRanges = Input {
                     Value = ColorCurves {
                        Curves = {
                           {
                              Points = {
                                 { 0, 1 },
                                 { 0.4, 0.2 },
                                 { 0.6, 0 },
                                 { 1, 0 }
                              }
                           },
                           {
                              Points = {
                                 { 0, 0 },
                                 { 0.4, 0 },
                                 { 0.6, 0.2 },
                                 { 1, 1 }
                              }
                           }
                        }
                     },
                  },
                  Input = Input {
                     SourceOp = "BackgroundTextureInputSwitchElseFuse_1_4",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 379.5 } },
            },
            RedToAlphaChannelBooleans_1_4 = ChannelBoolean {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ToAlpha = Input { Value = 5, },
                  Background = Input {
                     SourceOp = "AgedBrightnessContrast_1_4",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1045, 478.5 } },
            },
            AgedBrightnessContrast_1_4 = BrightnessContrast {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Saturation = Input { Value = 0, },
                  Low = Input { Value = 0.4289855, },
                  High = Input { Value = 0.626087, },
                  Input = Input {
                     SourceOp = "TextureInputSwitchElseFuse_1_4",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 990, 379.5 } },
            },
            ParklandBlur_1_4 = Blur {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Filter = Input { Value = FuID { "Gaussian" }, },
                  XBlurSize = Input { Value = 15, },
                  Input = Input {
                     SourceOp = "EnvironmentMapInputSwitchElseFuse_1_1_4",
                     Source = "Output",
                  }
               },
               ViewInfo = OperatorInfo { Pos = { 1430, 379.5 } },
            },
            BackgroundTextureInputSwitchElseFuse_1_4 = Fuse.SwitchElse {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Switch = Input { Value = 1, },
                  Else = Input { Value = 2, },
                  Input2 = Input {
                     SourceOp = "GalvanizedSheetMetal_1_4",
                     Source = "Output",
                  },
                  Comments = Input { Value = "The \"SwitchElse.fuse\" is used to automatically switch the surface material between user supplied imagery, and the fallback option of the internal \"default\" imagery. This input switching happens when nothing is connected to the  surface material's \"GroupOperator\" based \"TextureMap\" and \"EnvironmentMap\" input connections.", }
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 346.5 } },
               Version = 100
            }
         },
      },
      Switch1_1 = Switch {
         Inputs = {
            Input0 = Input {
               SourceOp = "ReplaceMaterial3D1_1_4",
               Source = "Output",
            },
            Input1 = Input {
               SourceOp = "Cube_1_Vert_5",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 2466.1, 200.74 } },
         Colors = { TileColor = { R = 0.0823529411764706, G = 0.384313725490196, B = 0.517647058823529 }, }
      },
      ReplaceMaterial3D1_1_4 = ReplaceMaterial3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Cube_1_Vert_5",
               Source = "Output",
            },
            MaterialIDLimitMode = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "ShaderPipeRouter_1_4",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 7, }
         },
         ViewInfo = OperatorInfo { Pos = { 2316.19, 200.74 } },
      },
      DirectionalLight1 = LightDirectional {
         CtrlWZoom = false,
         Inputs = {
            ["ShadowLightInputs3D.ShadowsEnabled"] = Input { Value = 1, },
            ["ShadowLightInputs3D.ShadowMapSize"] = Input { Value = 2048, }
         },
         ViewInfo = OperatorInfo { Pos = { 2776.93, 171.456 } },
      },
      Merge3D2_1_1_2 = Merge3D {
         Inputs = {
            PassThroughLights = Input { Value = 1, },
            SceneInput1 = Input {
               SourceOp = "PremierEssai_3",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "DirectionalLight1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 2776.93, 226.284 } },
      },
      PremierEssai_3 = Transform3D {
         NameSet = true,
         EnabledRegion = TimeRegion { { Start = -5, End = 143.9999 } },
         Inputs = {
            SceneInput = Input {
               SourceOp = "Merge3D1_5",
               Source = "Output",
            },
            ["Transform3DOp.Translation"] = Input { Value = -1, },
            ["Transform3DOp.Translate.X"] = Input { Value = 0.00238192579831753, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.0605553166586205, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.0272258989570263, },
            ["Transform3DOp.Rotate.X"] = Input {
               SourceOp = "PremierEssai_3XRotation",
               Source = "Value",
            },
            ["Transform3DOp.Rotate.Y"] = Input { Value = 5, },
            ["Transform3DOp.PivotNest"] = Input { Value = -1, },
            ["Transform3DOp.Pivot.X"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.X"] = Input { Value = 2.205, }
         },
         ViewInfo = OperatorInfo { Pos = { 2649.58, 226.554 } },
      },
      PremierEssai_3XRotation = BezierSpline {
         SplineColor = { Red = 255, Green = 128, Blue = 128 },
         CtrlWZoom = false,
         NameSet = true,
         KeyFrames = {
            [13] = { -480, RH = { 15.6666666666667, -315 } },
            [21] = { 15, LH = { 18.3333333333333, -150 }, Flags = { Linear = true } }
         }
      },
      Renderer3D1_3 = Renderer3D {
         CustomData = { ToolVersion = 2, },
         Inputs = {
            MotionBlur = Input { Value = 1, },
            Quality = Input { Value = 8, },
            SampleSpread = Input { Value = 2.5, },
            GlobalOut = Input { Value = 500, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            AutoCropDataWindow = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D2_1_1_2",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL" }, },
            ["RendererOpenGL.AntiAliasing.Channels.RGBA.HighQuality.Enable"] = Input { Value = 1, },
            ["RendererOpenGL.AntiAliasing.Presets.Color.Supersampling.HighQuality.Rate"] = Input { Value = 3, },
            ["RendererOpenGL.AntiAliasing.Presets.Color.Multisampling.LowQuality.SampleCount"] = Input { Value = 2, },
            ["RendererOpenGL.AntiAliasing.Presets.Color.Multisampling.HighQuality.SampleCount"] = Input { Value = 3, },
            ["RendererOpenGL.AntiAliasing.Presets.Aux.Supersampling.HighQuality.Rate"] = Input { Value = 3, },
            ["RendererOpenGL.AntiAliasing.Presets.Aux.Multisampling.LowQuality.SampleCount"] = Input { Value = 2, },
            ["RendererOpenGL.AntiAliasing.Presets.Aux.Multisampling.HighQuality.SampleCount"] = Input { Value = 3, },
            ["RendererOpenGL.AccumQuality"] = Input { Value = 32, },
            ["RendererOpenGL.LightingEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.MaximumTextureDepth"] = Input { Value = 3, }
         },
         ViewInfo = OperatorInfo { Pos = { 2906.76, 225.414 } },
         SubInputsData = {
            RendererOpenGL = {
               Version = 1
            }
         }
      },
      AutoDomain1 = AutoDomain {
         Inputs = {
            Input = Input {
               SourceOp = "Renderer3D1_3",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 3062.02, 225.414 } },
      },
      Cube_1_Vert_5 = Cube3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.058, },
            ["Transform3DOp.PivotNest"] = Input { Value = 1, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.096, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.05, },
            ["Transform3DOp.Scale.Z"] = Input { Value = 0.05, },
            ["SurfaceCubeInputs.Width"] = Input { Value = 0.8, },
            ["SurfaceCubeInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Controls.Normals.Scale"] = Input { Value = 0, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            MtlFace = Input { Value = 2, },
            ["Front.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Front.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725490196078, },
            ["Front.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Front.MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["Right.MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["Left.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.12, },
            ["Left.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.28, },
            ["Left.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.1, },
            ["Left.MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.575, },
            ["Bottom.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.559, },
            ["Bottom.MtlStdInputs.MaterialID"] = Input { Value = 5, },
            ["Top.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.572549019607843, },
            ["Top.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.556862745098039, },
            ["Top.MtlStdInputs.MaterialID"] = Input { Value = 6, },
            ["Back.MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["Back.MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.713725507259369, },
            ["Back.MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["Back.MtlStdInputs.MaterialID"] = Input { Value = 8, }
         },
         ViewInfo = OperatorInfo { Pos = { 2138.23, 287.38 } },
      },
      Merge3D1_5 = Merge3D {
         Inputs = {
            PassThroughLights = Input { Value = 1, },
            SceneInput1 = Input {
               SourceOp = "Cube_1_Vert_5",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "Switch1_1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 2486.51, 287.38 } },
      }
   }
}
Offline
User avatar

Chad Capeland

  • Posts: 3272
  • Joined: Mon Nov 10, 2014 9:40 pm

Re: How to switch (activate/deactivate) replacematerial/shad

PostSat Mar 22, 2025 7:09 pm

Artenis wrote:No explanation of the “switch node” in the Blackmagic 19.1 guide! (I searched for “switch” in the adobe search field and found no results).
If I haven't example I can't correct myself.
edit: sorry, i'm completely wrong. it's an adobe acrobat search problem. page 2403


Hey BMD, this is another example of the difficulty in new users finding the proper documentation for tools...
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Artenis

  • Posts: 35
  • Joined: Thu Apr 04, 2024 3:32 pm
  • Real Name: Raphael KUHN

Re: How to switch (activate/deactivate) replacematerial/shad

PostThu Mar 27, 2025 12:15 pm

You are right another time KrunoSmithy.
thanks for your suggestion, I'll analyze it (script).

I recently learned that the Hardware render option allows you to use the graphics card rather than just the software.
For the example provided I simply forgot to add it, but I'm now adding it for each fusion compositon.
Does DR offer an option for triggering hardware rendering automatically or by clicking on a checkbox as soon as:
1- a new project is opened?
2- when a fusion composition is added?
3- when a 3D rendering node is added?

Chad, yes sometimes it's very difficult.

Despite the colossal amount of work Blackmagic has put into making this free, high-performance software (for which I am grateful), I regret that the guide consists of a single 4000-page pdf, instead of creating files by theme or workspace (media, cut, edit, merge, etc).
The same goes for the demonstration videos created by Blackmagic: I think it's a real shame that none of them explain the logic behind associating nodes.
For example, in a composition of 3D elements, I wanted to add a softglow to a cube! It took me several hours to understand (unless other solutions are possible) that I had to create a separate node circuit for this cube so that it would have its own 3D rendering, and that the softglow node would only work with a simple Merge after this 3D render node.
Although page 2166 alludes to this, it does not explain that the “SofGlow” node is incompatible with 3D elements.
Having previously worked with C4D, the logic isn't the same. But I'm adapting.

Return to Fusion

Who is online

Users browsing this forum: Google [Bot], KrunoSmithy and 32 guests