Jump to: Board index » General » Fusion

lock plane of focus

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

Rick van den Berg

  • Posts: 1519
  • Joined: Tue Jun 02, 2015 7:47 am
  • Location: Netherlands

lock plane of focus

PostWed Jan 11, 2017 10:48 am

probably something simple, but i cant find a way to lock the camera plane of focus to an object?
Offline
User avatar

Chad Capeland

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

Re: lock plane of focus

PostWed Jan 11, 2017 12:53 pm

Rick van den Berg wrote:probably something simple, but i cant find a way to lock the camera plane of focus to an object?


You need the 3D euclidean distance between the camera and the object in a common (world) space. CoordTransformPosition will give you the positions, you'll need to calculate the distance with the square root of the sum of the squares of the component differences.
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Rick van den Berg

  • Posts: 1519
  • Joined: Tue Jun 02, 2015 7:47 am
  • Location: Netherlands

Re: lock plane of focus

PostThu Jan 12, 2017 8:23 am

thanks.. sound pretty hard though :ugeek:
Offline

Kel Philm

  • Posts: 650
  • Joined: Sat Nov 19, 2016 6:21 am

Re: lock plane of focus

PostThu Jan 12, 2017 6:55 pm

Read this link, it will explain it in more detail:

http://www.calculatorsoup.com/calculato ... points.php
Offline
User avatar

Pieter Van Houte

  • Posts: 879
  • Joined: Wed Nov 05, 2014 1:04 am

Re: lock plane of focus

PostTue Jan 17, 2017 8:10 am

Support We Suck Less on Patreon -> https://www.patreon.com/wesuckless

https://www.steakunderwater.com/wesuckless
Offline

Rick van den Berg

  • Posts: 1519
  • Joined: Tue Jun 02, 2015 7:47 am
  • Location: Netherlands

Re: lock plane of focus

PostMon Feb 06, 2017 9:49 am

thanks kel this could surely help alot.

pieter, i tried your fuse/script. it seems to be a super smart solution! but i guess due to the expression i cant get the focus to the front of the sphere, its stuck to the middle. and this is probably also a lack of knowledge about expressions from my side. :/

Code: Select all
{
   Tools = ordered() {
      PointLight1 = LightPoint {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 5.90813011733926, },
            ["Transform3DOp.Translate.Y"] = Input { Value = -3.64010503308166, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 2.24868940667389, },
         },
         ViewInfo = OperatorInfo { Pos = { 1100, 82.5 } },
      },
      Camera3D1 = Camera3D {
         CtrlWZoom = false,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input {
               SourceOp = "Publish4",
               Source = "Value",
            },
            ["Transform3DOp.Translate.Y"] = Input {
               SourceOp = "Publish5",
               Source = "Value",
            },
            ["Transform3DOp.Translate.Z"] = Input {
               SourceOp = "Publish6",
               Source = "Value",
            },
            ["Transform3DOp.UseTarget"] = Input { Value = 1, },
            ["Transform3DOp.Target.X"] = Input {
               SourceOp = "Publish1",
               Source = "Value",
            },
            ["Transform3DOp.Target.Y"] = Input {
               SourceOp = "Publish2",
               Source = "Value",
            },
            ["Transform3DOp.Target.Z"] = Input {
               SourceOp = "Publish3",
               Source = "Value",
            },
            AoV = Input { Value = 26.463829787234, },
            FLength = Input { Value = 25.2620166054879, },
            PlaneOfFocus = Input {
               SourceOp = "Distance3D1",
               Source = "Output",
            },
            ["Stereo.Nest"] = Input { Value = 1, },
            ["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, },
            ControlVis = Input { Value = 1, },
            PlaneOfFocusVis = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 825, 148.5 } },
      },
      Publish4 = PublishNumber {
      },
      Publish5 = PublishNumber {
         Inputs = {
            Value = Input { Value = -2.11315106125648, },
         },
      },
      Publish6 = PublishNumber {
         Inputs = {
            Value = Input { Value = -7.24581063570281, },
         },
      },
      Publish1 = PublishNumber {
      },
      Publish2 = PublishNumber {
         Inputs = {
            Value = Input { Value = -3.41774257854287, },
         },
      },
      Publish3 = PublishNumber {
         Inputs = {
            Value = Input { Value = -11.7191411346501, },
         },
      },
      Distance3D1 = Fuse.Distance3D {
         CtrlWZoom = false,
         NameSet = true,
         Inputs = {
            ["Point1.Translate.X"] = Input {
               SourceOp = "Publish4",
               Source = "Value",
            },
            ["Point1.Translate.Y"] = Input {
               SourceOp = "Publish5",
               Source = "Value",
            },
            ["Point1.Translate.Z"] = Input {
               SourceOp = "Publish6",
               Source = "Value",
            },
            ["Point2.Translate.X"] = Input {
               SourceOp = "Publish1",
               Source = "Value",
            },
            ["Point2.Translate.Y"] = Input {
               SourceOp = "Publish2",
               Source = "Value",
            },
            ["Point2.Translate.Z"] = Input {
               SourceOp = "Publish3",
               Source = "Value",
            },
         },
         Version = 2
      },
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "PointLight1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 934, 247.5 } },
      },
      Shape3D1 = Shape3D {
         Inputs = {
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 3, },
            ["Transform3DOp.Translate.X"] = Input {
               SourceOp = "Publish1",
               Source = "Value",
            },
            ["Transform3DOp.Translate.Y"] = Input {
               SourceOp = "Publish2",
               Source = "Value",
            },
            ["Transform3DOp.Translate.Z"] = Input {
               SourceOp = "Publish3",
               Source = "Value",
            },
            ["Transform3DOp.Rotate.X"] = Input { Value = -28.7323944, },
            ["Transform3DOp.Rotate.Y"] = Input { Value = 89.5774648, },
            Shape = Input { Value = FuID { "SurfaceSphereInputs" }, },
            MaterialInput = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
            ["MtlStdInputs.Specular.Nest"] = Input { Value = 1, },
            ["MtlStdInputs.Specular.Intensity"] = Input { Value = 0, },
            ["MtlStdInputs.Specular.Exponent"] = Input { Value = 100, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 4, }
         },
         ViewInfo = OperatorInfo { Pos = { 825, 247.5 } },
      },
      Renderer3D1 = Renderer3D {
         Inputs = {
            ["RendererSoftware.ShadowsEnabled"] = Input { Value = 1, },
            ["RendererSoftware.Channels.Nest"] = Input { Value = 1, },
            ["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL" }, },
            ["RendererOpenGL.Channels.Nest"] = Input { Value = 1, },
            ["RendererOpenGL.AccumulationEffects"] = Input { Value = 1, },
            ["RendererOpenGL.EnableAccumEffects"] = Input { Value = 1, },
            ["RendererOpenGL.AccumQuality"] = Input { Value = 40, },
            ["RendererOpenGL.DoFBlur"] = Input { Value = 0.390697674418605, },
            ["RendererOpenGL.LightingEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.ShadowsEnabled"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 1100, 247.5 } },
      },
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Text1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 247.5 } },
      },
      Background1 = Background {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 541, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftBlue = Input { Value = 0.75, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 440, 247.5 } },
      },
      Text1 = TextPlus {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Font = Input { Value = "Open Sans", },
            StyledText = Input { Value = "asdddasasdfaadfafas", },
            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 = { 440, 82.5 } },
      },
      Merge2 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Background2",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Renderer3D1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 1265, 346.5 } },
      },
      Background2 = Background {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 0.893333333333333, },
            TopLeftGreen = Input { Value = 0.453475608119698, },
            TopLeftBlue = Input { Value = 0.315552355564417, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1155, 346.5 } },
      }
   }
}

Return to Fusion

Who is online

Users browsing this forum: No registered users and 74 guests