Jump to: Board index » General » Fusion

Image Plane 3D - Automatically resize when moving in Z

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

Dan Turmik

  • Posts: 22
  • Joined: Sun Apr 30, 2017 10:46 am

Image Plane 3D - Automatically resize when moving in Z

PostSat Mar 17, 2018 2:06 am

Hi!

I came across this Nuke Tutorial. Starting at 9m35s


He is setting up a Matte Painting where the Layers are projected on cards. When he moves the Cards in Z Space they automatically resize to fill the screen.

How could this be done in Fusion?
Offline

Okke Verbart

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

Re: Image Plane 3D - Automatically resize when moving in Z

PostSat Mar 17, 2018 8:05 am

EDIT: I forgot about feeding in an image into the camera directly... but I suppose with multiple images this may be more challenging.

Hey Dan - I don't know of such an easy way as in Nuke, but a workaround you can apply is by using a Simple Expression to size the ImagePlane3D depending on the z-distance. See example below (play around with the Z-offset in the Transform3D, and see how it automatically resizes the plane to the right size). I set this up by initially placing the Imageplane at a certain distance, then changed the scale to fit it perfectly (by using the perspective view on the merge3D). I then used the resulting scale value (1.66) in an expression to automatically link it.

Downside is of course that when you change the camera's angle of view/focal length etc it would stop working (you'd need to adjust the expression). Having said that, it should be relatively straightforward to incorporate the focal length in the simple expression too.

Oh, and btw, this one also assumes that the camera remains at position 0,0,0


Code: Select all
{
   Tools = ordered() {
      FastNoise1 = FastNoise {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 55, 16.5 } },
      },
      ImagePlane3D1 = ImagePlane3D {
         Inputs = {
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "FastNoise1",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 16.5 } },
      },
      Transform3D1 = Transform3D {
         CtrlWZoom = false,
         Inputs = {
            SceneInput = Input {
               SourceOp = "ImagePlane3D1",
               Source = "Output",
            },
            ["Transform3DOp.Translate.Z"] = Input { Value = -2.14, },
            ["Transform3DOp.Scale.X"] = Input {
               Value = 1.28915662650602,
               Expression = "-Transform3DOp.Translate.Z/1.66",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 275, 16.5 } },
      },
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Transform3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 440, 16.5 } },
      },
      Camera3D1 = Camera3D {
         Inputs = {
            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 = 2, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
         },
         ViewInfo = OperatorInfo { Pos = { 440, 247.5 } },
      }
   }
}
www.ablackbirdcalledsue.com
Offline
User avatar

Bryan Ray

  • Posts: 2485
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Image Plane 3D - Automatically resize when moving in Z

PostSat Mar 17, 2018 4:08 pm

Over at Steakunderwater, ChristopherNodal pointed out that a camera can see another camera's ImagePlane, so all you need to do is instance the camera and deinstance IDepth. Not sure if you get over there, Okke, so I thought it would be useful to mention it here, too.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Okke Verbart

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

Re: Image Plane 3D - Automatically resize when moving in Z

PostSun Mar 18, 2018 8:08 am

Ah, I didn't realise that! Thanks for that Bryan! Will definitely come in handy.
www.ablackbirdcalledsue.com
Offline
User avatar

Bryan Ray

  • Posts: 2485
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Image Plane 3D - Automatically resize when moving in Z

PostSun Mar 18, 2018 4:10 pm

Neither had I! It seems pretty obvious in hindsight, but my gast was pretty well flabbered when Christopher pointed it out.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com

Return to Fusion

Who is online

Users browsing this forum: Hendrik Proosa and 28 guests