Jump to: Board index » General » Fusion

Aligning Objects

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

Chris North

  • Posts: 44
  • Joined: Mon Mar 09, 2015 2:27 pm

Aligning Objects

PostThu Dec 14, 2017 2:36 pm

Hello,

Couldn't find this in the manual - maybe I've missed something obvious. But is there a way to align 3D objects on a particular axis? Or to centre objects relative to others?

chris
Offline
User avatar

Marc van Vliet

  • Posts: 38
  • Joined: Thu Nov 13, 2014 1:42 pm

Re: Aligning Objects

PostFri Dec 15, 2017 10:52 am

Hi,

Please copy paste an example comp of what you are trying to accomplish.

Cheers,

Marc
Offline

Chris North

  • Posts: 44
  • Joined: Mon Mar 09, 2015 2:27 pm

Re: Aligning Objects

PostFri Dec 15, 2017 10:55 am

For example, I want to centre the X & Y of the camera with the 3DShape.

Code: Select all
{
   Tools = ordered() {
      Shape3D1 = Shape3D {
         CtrlWZoom = false,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.523223474893334, },
            ["Transform3DOp.Translate.Y"] = Input { Value = -0.503418802189864, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 1265, 247.5 } },
      },
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, 379.5 } },
         Colors = {
            TileColor = { R = 0.525490196078431, G = 0, B = 0.00784313725490196 },
            TextColor = { R = 0, G = 0, B = 0 },
         }
      },
      Camera3D1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = -0.801984826056138, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 1.0678535408965, },
            AoV = Input { Value = 19.2642683071402, },
            ["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 = 1, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 1100, 247.5 } },
         Colors = {
            TileColor = { R = 0.525490196078431, G = 0, B = 0.00784313725490196 },
            TextColor = { R = 0, G = 0, B = 0 },
         }
      }
   }
}
Offline
User avatar

Marc van Vliet

  • Posts: 38
  • Joined: Thu Nov 13, 2014 1:42 pm

Re: Aligning Objects

PostFri Dec 15, 2017 11:37 am

OK, I see the comp, silly question probably, but why not just set the xyz of both to 0 and move around the merge xyz.. then camera is centered on shape and locked together ...?
Offline

Chris North

  • Posts: 44
  • Joined: Mon Mar 09, 2015 2:27 pm

Re: Aligning Objects

PostFri Dec 15, 2017 1:27 pm

Yeah, could do. I was just hoping for a quick and easy way to align one object to another (like in Maya/Afx) on a particular axis as I often want to centre the camera or it's target on another object.

Perhaps there isn't a way other than typing in the values like you say.
Offline
User avatar

michael vorberg

  • Posts: 758
  • Joined: Wed Nov 12, 2014 8:47 pm
  • Location: stuttgart, germany

Re: Aligning Objects

PostFri Dec 15, 2017 2:27 pm

With some scripting it should doable
Offline
User avatar

Marc van Vliet

  • Posts: 38
  • Joined: Thu Nov 13, 2014 1:42 pm

Re: Aligning Objects

PostFri Dec 15, 2017 3:35 pm

You can open both camera and shape, then on the coords tab set camera target enabled, then right click xyz and set to expression, then pickwhip to the xyz of the shape..

Code: Select all
{
   Tools = ordered() {
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 0, 148.5 } },
         Colors = {
            TileColor = { R = 0.52156862745098, G = 0, B = 0.00784313725490196 },
            TextColor = { R = 0, G = 0, B = 0 },
         }
      },
      Shape3D1 = Shape3D {
         CtrlWZoom = false,
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.523223474893334, },
            ["Transform3DOp.Translate.Y"] = Input { Value = -0.503418802189864, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 0, 16.5 } },
      },
      Camera3D1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = -0.801984826056138, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 1.0678535408965, },
            ["Transform3DOp.UseTarget"] = Input { Value = 1, },
            ["Transform3DOp.Target.X"] = Input {
               Value = 0.523223474893334,
               Expression = "Shape3D1.Transform3DOp.Translate.X",
            },
            ["Transform3DOp.Target.Y"] = Input {
               Value = -0.503418802189864,
               Expression = "Shape3D1.Transform3DOp.Translate.Y",
            },
            ["Transform3DOp.Target.Z"] = Input { Expression = "Shape3D1.Transform3DOp.Translate.Z", },
            AoV = Input { Value = 19.2642683071402, },
            ["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 = 1, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { -165, 148.5 } },
         Colors = {
            TileColor = { R = 0.52156862745098, G = 0, B = 0.00784313725490196 },
            TextColor = { R = 0, G = 0, B = 0 },
         }
      }
   }
}
Offline

Chris North

  • Posts: 44
  • Joined: Mon Mar 09, 2015 2:27 pm

Re: Aligning Objects

PostFri Dec 15, 2017 5:03 pm

Hmmm. I wonder if a script or macro could be setup then to automate that...

Anyway - many thanks.

Return to Fusion

Who is online

Users browsing this forum: No registered users and 8 guests