Jump to: Board index » General » Fusion

subtract object from other object ?

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

Wolfgang Baer

  • Posts: 37
  • Joined: Mon Mar 09, 2015 4:55 pm

subtract object from other object ?

PostMon Nov 06, 2017 5:33 pm

Sorry, noob here.

I like to make a flat type of scene, where a box that rotates reveals a logo projected onto it. First, an empty site of the box is alingned with the wall, so one cannot see it. Then the box rotates and reveals the logo. At the end the logo side of the box is alinged to the wall, so no border is visible.

Got the wall, got the box, got the rotation. But how to cut the wall, so that the box is fully visible while rotating?

Thought I can make a copy of the rotating box and use it as a matte for the wall. Unfortunately it is not only "matting" the wall but also the rotating box.

Difficult to explain. Hope the images help.

Matte_1.png
Matte_1.png (23.43 KiB) Viewed 1062 times

Matte_2.png
Matte_2.png (32.47 KiB) Viewed 1062 times

Matte_3.png
Matte_3.png (111.58 KiB) Viewed 1062 times


Code: Select all
{
   Tools = ordered() {
      Shape3D1_1 = Shape3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Shape3D1_2",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfacePlaneInputs.Matte.Nest"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.Nest"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, }
         },
         ViewInfo = OperatorInfo { Pos = { 757, 104 } },
      },
      Shape3D1 = Shape3D {
         Inputs = {
            ["Transform3DOp.Translate.Z"] = Input { Value = -0.25, },
            ["Transform3DOp.Rotate.X"] = Input {
               SourceOp = "Shape3D1XRotation",
               Source = "Value",
            },
            Shape = Input { Value = FuID { "SurfaceCubeInputs" }, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Width"] = Input { Value = 0.5, },
            ["SurfaceCubeInputs.Matte.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.ObjectID.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 899, 104 } },
      },
      Shape3D1XRotation = BezierSpline {
         SplineColor = { Red = 255, Green = 128, Blue = 128 },
         NameSet = true,
         KeyFrames = {
            [0] = { 0, RH = { 20, 30 }, Flags = { Linear = true } },
            [60] = { 90, LH = { 40, 90 } }
         }
      },
      Shape3D1_2 = Shape3D {
         CtrlWZoom = false,
         Inputs = {
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["Transform3DOp.Translate.Z"] = Input { Value = -0.0633223161795296, },
            ["Transform3DOp.Rotate.X"] = Input { Value = 90, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 0.291, },
            Shape = Input { Value = FuID { "SurfaceCubeInputs" }, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Width"] = Input { Value = 0.5, },
            ["SurfaceCubeInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Lighting.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Matte.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.Matte.IsMatte"] = Input { Value = 1, },
            ["SurfaceCubeInputs.BlendMode.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.BlendMode.SW.Gain"] = Input { Value = 0, },
            ["SurfaceCubeInputs.Controls.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.ObjectID.Nest"] = Input { Value = 1, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 587, 105 } },
      },
      SpotLight1 = LightSpot {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = -0.221424994598323, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 1.61410558943538, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.404680242329843, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -57.5092026772909, },
            ["Transform3DOp.Rotate.Y"] = Input { Value = 5.36662791855633, },
            ["Transform3DOp.Rotate.Z"] = Input { Value = 6.59118162281811, },
            ConeAngle = Input { Value = 90, },
            ["ShadowLightInputs3D.Nest"] = Input { Value = 1, },
            ["ShadowLightInputs3D.ShadowMapSize"] = Input { Value = 2652, },
         },
         ViewInfo = OperatorInfo { Pos = { 1007, 13 } },
      },
      Camera3D1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.Z"] = Input { Value = 3.48912863216175, },
            AoV = Input { Value = 19.2642683071402, },
            ["Stereo.Mode"] = Input { Value = FuID { "OffAxis" }, },
            FilmGate = Input { Value = FuID { "BMD_URSA_4K_16x9" }, },
            ApertureW = Input { Value = 0.831496062992126, },
            ApertureH = Input { Value = 0.467716535433071, },
            ControlVis = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 3, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
         },
         ViewInfo = OperatorInfo { Pos = { 1138, 13 } },
      },
      Renderer3D1 = Renderer3D {
         CustomData = {
            ToolVersion = 2,
         },
         Inputs = {
            GlobalOut = Input { Value = 150, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D1_1",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL" }, },
            ["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
            ["RendererSoftware.ShadowsEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.LightingEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.ShadowsEnabled"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 1248, 208 } },
      },
      Merge3D1_1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "SpotLight1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1075, 207 } },
      },
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "Shape3D1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 789, 207 } },
      }
   }
}
noob
Offline

Okke Verbart

  • Posts: 290
  • Joined: Tue Jan 17, 2017 8:40 pm

Re: subtract object from other object ?

PostMon Nov 06, 2017 6:10 pm

If I'm understanding your objective correctly, you could make the "wall" out of multiple shapes (instead of a cut-out). See example below:

Code: Select all
{
   Tools = ordered() {
      left_box = Shape3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = -1.5, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 1, },
            Shape = Input { Value = FuID { "SurfaceCubeInputs" }, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 3, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 4, }
         },
         ViewInfo = OperatorInfo { Pos = { 400, -21 } },
      },
      right_box = Shape3D {
         NameSet = true,
         SourceOp = "left_box",
         Inputs = {
            SceneInput = Input { },
            ["Transform3DOp.Translation"] = Input { },
            ["Transform3DOp.Translate.X"] = Input { Value = 1.5, },
            ["Transform3DOp.Rotation"] = Input { },
            ["Transform3DOp.PivotNest"] = Input { },
            ["Transform3DOp.ScaleNest"] = Input { },
            ["Transform3DOp.TargetNest"] = Input { },
            MaterialInput = Input { },
            ["MtlStdInputs.Diffuse.Nest"] = Input { },
            ["MtlStdInputs.Specular.Nest"] = Input { },
            ["MtlStdInputs.Transmittance.Nest"] = Input { },
            ["MtlStdInputs.MaterialIDNest"] = Input { },
            StartEndRenderScripts = Input { },
            ["SurfaceCubeInputs.Visibility.Nest"] = Input { },
            ["SurfaceCubeInputs.Lighting.Nest"] = Input { },
            ["SurfaceCubeInputs.Matte.Nest"] = Input { },
            ["SurfaceCubeInputs.BlendMode.Nest"] = Input { },
            ["SurfaceCubeInputs.Controls.Nest"] = Input { },
            ["SurfaceCubeInputs.ObjectID.Nest"] = Input { },
         },
         ViewInfo = OperatorInfo { Pos = { 578, -30 } },
      },
      Text1 = TextPlus {
         CtrlWZoom = false,
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Red = Input { Value = 1, },
            Alpha = Input { Value = 1, },
            Size = Input { Value = 0.5, },
            Font = Input { Value = "Open Sans", },
            StyledText = Input { Value = "LOGO", },
            Style = Input { Value = "Bold", },
            ManualFontKerningPlacement = Input {
               Value = StyledText {
                  Array = {
                  },
                  Value = ""
               },
            },
            ShadingGradient1 = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 814, -48 } },
      },
      rotating_box = Cube3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 1, },
            ["Transform3DOp.Rotate.X"] = Input {
               SourceOp = "rotating_boxXRotation",
               Source = "Value",
            },
            ["SurfaceCubeInputs.SizeLock"] = Input { Value = 0, },
            ["SurfaceCubeInputs.Width"] = Input { Value = 2, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 5, },
            FrontMaterialInput = Input {
               SourceOp = "Text1",
               Source = "Output",
            },
            MtlFace = Input { Value = 5, },
            ["Front.MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["Right.MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ["Left.MtlStdInputs.MaterialID"] = Input { Value = 5, },
            ["Bottom.MtlStdInputs.MaterialID"] = Input { Value = 6, },
            ["Top.MtlStdInputs.MaterialID"] = Input { Value = 7, },
            ["Back.MtlStdInputs.MaterialID"] = Input { Value = 8, },
         },
         ViewInfo = OperatorInfo { Pos = { 769, 71 } },
      },
      rotating_boxXRotation = BezierSpline {
         SplineColor = { Red = 255, Green = 128, Blue = 128 },
         NameSet = true,
         KeyFrames = {
            [0] = { 180, RH = { 20, 120 }, Flags = { Linear = true } },
            [60] = { 0, LH = { 40, 60 }, Flags = { Linear = true } }
         }
      },
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "upper_box",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "lower_box",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "left_box",
               Source = "Output",
            },
            SceneInput4 = Input {
               SourceOp = "right_box",
               Source = "Output",
            },
            SceneInput5 = Input {
               SourceOp = "rotating_box",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 574, 123 } },
      },
      lower_box = Shape3D {
         NameSet = true,
         Inputs = {
            Shape = Input { Value = FuID { "SurfaceCubeInputs" }, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["SurfaceCubeInputs.SizeLock"] = Input { Value = 0, },
            ["SurfaceCubeInputs.Width"] = Input { Value = 4, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 371, 130.5 } },
      },
      upper_box = Shape3D {
         NameSet = true,
         SourceOp = "lower_box",
         Inputs = {
            SceneInput = Input { },
            ["Transform3DOp.Translation"] = Input { },
            ["Transform3DOp.Translate.Y"] = Input { Value = 2, },
            ["Transform3DOp.Rotation"] = Input { },
            ["Transform3DOp.PivotNest"] = Input { },
            ["Transform3DOp.ScaleNest"] = Input { },
            ["Transform3DOp.TargetNest"] = Input { },
            MaterialInput = Input { },
            ["MtlStdInputs.Diffuse.Nest"] = Input { },
            ["MtlStdInputs.Specular.Nest"] = Input { },
            ["MtlStdInputs.Transmittance.Nest"] = Input { },
            ["MtlStdInputs.MaterialIDNest"] = Input { },
            StartEndRenderScripts = Input { },
            ["SurfaceCubeInputs.Visibility.Nest"] = Input { },
            ["SurfaceCubeInputs.Lighting.Nest"] = Input { },
            ["SurfaceCubeInputs.Matte.Nest"] = Input { },
            ["SurfaceCubeInputs.BlendMode.Nest"] = Input { },
            ["SurfaceCubeInputs.Controls.Nest"] = Input { },
            ["SurfaceCubeInputs.ObjectID.Nest"] = Input { },
         },
         ViewInfo = OperatorInfo { Pos = { 371, 239 } },
      }
   }
}
www.ablackbirdcalledsue.com
Offline

Wolfgang Baer

  • Posts: 37
  • Joined: Mon Mar 09, 2015 4:55 pm

Re: subtract object from other object ?

PostMon Nov 06, 2017 6:20 pm

Yes, that would work. Thanks a lot.

How did you get the Box: side, top, left, etc. connectors to put the logo only on one side?
I don't see how you made those materials. I can only see mat 1, 2, 3 etc. slider in the material tab.
noob
Offline

Okke Verbart

  • Posts: 290
  • Joined: Tue Jan 17, 2017 8:40 pm

Re: subtract object from other object ?

PostMon Nov 06, 2017 6:25 pm

Hi - the connectors are there for each side, so if you only connect to one connector, it only shows on one side :-). If you then check the materials tab in the node, you can see that I set all other sides to white.

BTW - that one is a Cube3D rather than a shape3D...you couldn't do the same thing with a shape3d (at least not easily)
www.ablackbirdcalledsue.com
Offline

Wolfgang Baer

  • Posts: 37
  • Joined: Mon Mar 09, 2015 4:55 pm

Re: subtract object from other object ?

PostMon Nov 06, 2017 6:27 pm

Ah, ok.
thanks again.
noob
Offline

Umberto Uderzo

  • Posts: 265
  • Joined: Fri Mar 13, 2015 12:19 am

Re: subtract object from other object ?

PostTue Nov 07, 2017 4:35 pm

Using projectors is a little bit trickier than using cube, but maybe it can be of some help.
You can project on non-cubic surfaces if you wish.

Code: Select all
{
   Tools = ordered() {
      Camera3D1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.288, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 2.6, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -6.62, },
            AoV = Input { Value = 34.85, },
            FLength = Input { Value = 18.9256203719952, },
            ["Stereo.Mode"] = Input { Value = FuID { "Mono" }, },
            FilmGate = Input { Value = FuID { "BMD_URSA_4K_16x9" }, },
            ApertureW = Input { Value = 0.831496062992126, },
            ApertureH = Input { Value = 0.467716535433071, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 280.5 } },
      },
      mrg_rotating = Merge3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Rotate.X"] = Input {
               SourceOp = "Merge3D2XRotation",
               Source = "Value",
            },
            SceneInput1 = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Projector3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 181.5 } },
      },
      Merge3D2XRotation = BezierSpline {
         SplineColor = { Red = 255, Green = 128, Blue = 128 },
         NameSet = true,
         KeyFrames = {
            [0] = { 180, RH = { 41.4, 66 }, Flags = { Linear = true } },
            [200] = { 0, LH = { 66.8, 0 } }
         }
      },
      Renderer3D1 = Renderer3D {
         CustomData = {
            ToolVersion = 2,
         },
         Inputs = {
            GlobalOut = Input { Value = 200, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "mrg_static",
               Source = "Output",
            },
            ["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 880, 181.5 } },
      },
      mrg_static = Merge3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Rotate.X"] = Input {
               SourceOp = "Merge3D1XRotation",
               Source = "Value",
            },
            SceneInput1 = Input {
               SourceOp = "mrg_rotating",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "DirectionalLight1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 181.5 } },
      },
      Merge3D1XRotation = BezierSpline {
         SplineColor = { Red = 255, Green = 128, Blue = 128 },
         NameSet = true,
         KeyFrames = {
            [200] = { 0, Flags = { Linear = true } }
         }
      },
      Shape3D1 = Shape3D {
         Inputs = {
            Shape = Input { Value = FuID { "SurfaceCubeInputs" }, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["SurfaceCubeInputs.SizeLock"] = Input { Value = 0, },
            ["SurfaceCubeInputs.Height"] = Input { Value = 0.47, },
            ["SurfaceCubeInputs.Depth"] = Input { Value = 0.09, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 3, }
         },
         ViewInfo = OperatorInfo { Pos = { 550, 115.5 } },
      },
      Projector3D1 = LightProjector {
         Inputs = {
            ["Transform3DOp.Translate.Z"] = Input { Value = 1.03038294752576, },
            Blue = Input { Value = 0, },
            Angle = Input { Value = 122.2, },
            ProjectiveImage = Input {
               SourceOp = "Text1",
               Source = "Output",
            },
            ProjectionMode = Input { Value = 1, },
            ProjectOnBackFaces = Input { Value = 0, },
            ["ShadowLightInputs3D.ShadowsEnabled"] = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 385, 82.5 } },
      },
      DirectionalLight1 = LightDirectional {
         Inputs = {
            ["Transform3DOp.Rotate.X"] = Input { Value = -29.1232604184188, },
            ["Transform3DOp.Rotate.Y"] = Input { Value = -44.6773436856456, },
            ["Transform3DOp.Rotate.Z"] = Input { Value = 2.34223666926846, },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 82.5 } },
      },
      Text1 = TextPlus {
         CtrlWZoom = false,
         Inputs = {
            GlobalOut = Input { Value = 200, },
            Width = Input { Value = 3000, },
            Height = Input { Value = 2000, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Size = Input { Value = 0.1581, },
            Font = Input { Value = "Open Sans", },
            StyledText = Input { Value = "LOGO", },
            Style = Input { Value = "Bold", },
            ManualFontKerningPlacement = Input {
               Value = StyledText {
                  Array = {
                  },
                  Value = ""
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 275, 82.5 } },
      }
   }
}

Return to Fusion

Who is online

Users browsing this forum: No registered users and 33 guests