Jump to: Board index » General » Fusion

Portal in 3D

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

CaptainNoAction

  • Posts: 55
  • Joined: Sun Jan 02, 2022 3:31 am
  • Real Name: Matt Lewis

Portal in 3D

PostSun Mar 12, 2023 10:01 pm

There are a few videos of drones flying through a portal. I have been trying to do this in Fusion but am coming up short. Reference videos below. Any help would be appreciated. Thanks.

edit- probably should point out my hangup. I can make an outer ring appear put can't get the video inside of the ring with a clear background on the plane. I tried an image but that doesn't work. I can somewhat produce the desired results without 3D tracking but... I tried and delayed the background video, so both going at the same time but that works in my limited knowledge as a separate file. ie the global controls. Not sure of how best to accomplish but there is nothing I could find on the internet with Davinci. I watched videos that used AE but I have no practice with that program and it doesn't make too much sense with reverse engineering.

[url]https://youtu.be/QGdhwnIhjnY/url]

[url]https://youtu.be/7oY_JKfAksA/url]

My one of many workflows:
Attachments
portal.jpg
portal.jpg (1014 KiB) Viewed 1210 times
Win 10 Pro
AMD Ryzen 9 7950X3D
nVidia GeForce RTX 4090
192 GB RAM
Corsair 1200HX PSU
DR Studio
Offline

bentheanimator

  • Posts: 638
  • Joined: Mon May 13, 2019 10:38 pm
  • Location: Minneapolis, MN
  • Real Name: Ben Hall

Re: POrtal in 3D

PostMon Mar 13, 2023 3:54 am

You're almost there. The only thing I see missing is the alpha for the outside of your portal. Where ever you got the portal from there should be a way to make a black and white map of what's outside the portal and what's inside. Three are may ways to do the alpha for the image but the easiest will be to make a new bg, set the color to black and the alpha to 1. Then merge the portal image on top of the bg with a merge tool. Then plug the black and white map into the blue mask triangle of the v merge. Now you have an alpha'ed image that you can plug into your image plane.

If you can't get a black and white from the portal then you can always use a Ply tool to hand create the mask going into the merge.
Resolve & Fusion Studio 19.0.1 Build 6
Windows 11
Intel 12900K @ 5.1GHz | 64GB RAM | RTX4090 | 2TB NVME System | 4TB NVME Scratch

MacOS 12.7.2
MacBook Pro 13,3 | 16GB | Radeon 460 4GB | 256GB System | 256GB Scratch
Offline

CaptainNoAction

  • Posts: 55
  • Joined: Sun Jan 02, 2022 3:31 am
  • Real Name: Matt Lewis

Re: POrtal in 3D

PostMon Mar 13, 2023 10:21 pm

Thanks Ben I appreciate the help. I need to add more details as to what I am trying to accomplish. I want a video in the portal that you fly to/through/into it. I can add the portal, have to add a lumakeyer, and the portal is there, in scene, not moving. The alpha matte that came with the portal is the problem. I need to put the background video on the alpha matte. I have tried in the edit tab to separate the 2 videos and arrange them so when you go through the portal, the second video takes over. Next, a compound clip and then lastly is a fusion clip. Not sure what is the correct method.

I was successful in doing what I want but adding it to the 3D world and placing it on an Image Plane 3D is where I am stuck.

On the Image Plane 3D I would have the portal, alpha matte and the video. But then the video became blurry as you go into the portal. I have tried an image, same thing.

I cant quite figure out what you are telling me to do. What is the v merge?
Win 10 Pro
AMD Ryzen 9 7950X3D
nVidia GeForce RTX 4090
192 GB RAM
Corsair 1200HX PSU
DR Studio
Offline

Sander de Regt

  • Posts: 3864
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: POrtal in 3D

PostTue Mar 14, 2023 7:36 am

Did you just put the image plane in the 3D world or did you do a 3D track to put it in there, so it grows with your camera movement?
As far as I can tell (I haven't watched the whole video) the original example is effectively just a fancy circle wipe. The movement of the two actual shots should be close to each other to begin with.
So in your case, you don't want (or need) the video that you'r portalling into to be in the 3D world.
The movement of the shot should be enough. You want the outside of your portal to be your first video and the inside to be your second video. So all you need effectively is to 'cut out' the inside of the portal.
Am I correct in that assumption?

Can you share what you have so far? Either in screenshots or in comps?
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

CaptainNoAction

  • Posts: 55
  • Joined: Sun Jan 02, 2022 3:31 am
  • Real Name: Matt Lewis

Re: POrtal in 3D

PostWed Mar 15, 2023 1:22 am

Thanks for helping Sander.

I tracked the scene with Syntheyes, imported to DR Studio Fusion and then placed an ImagePlane3D on a point then added the Portal and Alpha Matte. It grows with the camera movement I would say. It positioned in 3D and the size stays the same.

Assumption is correct, here is where I am at now-
I figured out the portal and video inside the portal on the alpha matte. My issue is the video in the portal, as you get closer, becomes blurred and increases in size. Thus ruining the perspective. I want the video inside the portal to start as soon as the drone goes through/video fills the screen and maintains the correct perspective. So no zoom in.

Will this work or do you need more info?-
Attachments
portal example.jpg
portal example.jpg (616.18 KiB) Viewed 938 times
Win 10 Pro
AMD Ryzen 9 7950X3D
nVidia GeForce RTX 4090
192 GB RAM
Corsair 1200HX PSU
DR Studio
Offline

Sander de Regt

  • Posts: 3864
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: POrtal in 3D

PostWed Mar 15, 2023 7:35 am

Well. You're pretty close already.
Just don't put the video you're transitioning to in the 3D world.
(maybe don't even use the video you're coming from either)

Instead of the video you're going into, you want that part to be transparent.
So set the matte property of your image plane to 'is matte' this will create a hole in your render.
You can then use this hole to make the transition in 2D.

If you copy/paste the following code in your Fusion node area, you will see what I did there.


Code: Select all
{
   Tools = ordered() {
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "ThisShapeRendersTransparent",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 495, 82.5 } },
      },
      ThisShapeRendersTransparent = Shape3D {
         NameSet = true,
         Inputs = {
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.16, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.564, },
            ["MtlStdInputs.MaterialIDNest"] = Input { Value = 1, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfacePlaneInputs.Matte.Nest"] = Input { Value = 1, },
            ["SurfacePlaneInputs.Matte.IsMatte"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, }
         },
         ViewInfo = OperatorInfo { Pos = { 220, 82.5 } },
      },
      Camera3D1 = Camera3D {
         NameSet = true,
         CustomData = {
            Settings = {
               [1] = {
                  Tools = ordered() {
                     Camera3D1 = Camera3D {
                        Inputs = {
                           ApertureW = Input { Value = 0.831496062992126 },
                           AoV = Input { Value = 19.2642683071402 },
                           ["Stereo.Mode"] = Input { Value = FuID { "OffAxis" } },
                           ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1 },
                           ApertureH = Input { Value = 0.467716535433071 },
                           FilmGate = Input { Value = FuID { "BMD_URSA_4K_16x9" } },
                           ["MtlStdInputs.MaterialID"] = Input { Value = 1 }
                        },
                        Name = "Camera3D1",
                        CtrlWZoom = false,
                        NameSet = true,
                        ViewInfo = OperatorInfo { Pos = { 550, 214.5 } },
                        CustomData = {
                        }
                     }
                  }
               },
               [6] = {
                  Tools = ordered() {
                     Camera3D1 = Camera3D {
                        Inputs = {
                           FLength = Input { Value = 49.0568334445481 },
                           ["Transform3DOp.Translate.Z"] = Input { Expression = "self.ImageInput.Metadata.Translate.Z" },
                           ImagePlaneEnabled = Input { Value = 0 },
                           AoV = Input {
                              Value = 19.2642683071402,
                              Expression = "self.ImageInput.Metadata.RSCameraFOV or self.ImageInput.Metadata['rs/camera/fov']"
                           },
                           AovType = Input { Value = 1 },
                           ["Transform3DOp.Rotate.Y"] = Input { Expression = "self.ImageInput.Metadata.Rotate.Y" },
                           ApertureH = Input { Value = 0.9 },
                           FilmGate = Input { Value = FuID { "HD" } },
                           ["Transform3DOp.Rotate.X"] = Input { Expression = "self.ImageInput.Metadata.Rotate.X" },
                           ["Transform3DOp.Translate.X"] = Input { Expression = "self.ImageInput.Metadata.Translate.X" },
                           PlaneOfFocus = Input { Expression = "self.ImageInput.Metadata.RSCameraDOFFocusDistance or self.ImageInput.Metadata['rs/camera/DOFFocusDistance']" },
                           FilmBack = Input { Value = 1 },
                           ["Transform3DOp.Rotate.RotOrder"] = Input { Value = FuID { "ZXY" } },
                           ["MtlStdInputs.MaterialID"] = Input { Value = 1 },
                           ["Stereo.Mode"] = Input { Value = FuID { "OffAxis" } },
                           ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1 },
                           ["Transform3DOp.Translate.Y"] = Input { Expression = "self.ImageInput.Metadata.Translate.Y" },
                           ApertureW = Input { Value = 1.6 },
                           ["Transform3DOp.Rotate.Z"] = Input { Expression = "self.ImageInput.Metadata.Rotate.Z" }
                        },
                        CtrlWZoom = false,
                        NameSet = true,
                        ViewInfo = OperatorInfo { Pos = { 387, 145 } },
                        CustomData = {
                        }
                     }
                  }
               }
            }
         },
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 1.0792468, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.8999921, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 4.0779169, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -11.8000001907349, },
            ["Transform3DOp.Rotate.Y"] = Input { Value = 14.1999998092651, },
            AoV = Input { Value = 16.8421470342172, },
            FLength = Input { Value = 18.2123442718302, },
            ["Stereo.Mode"] = Input { Value = FuID { "OffAxis" }, },
            FilmBack = Input { Value = 1, },
            FilmGate = Input { Value = FuID { "HD" }, },
            ApertureW = Input { Value = 0.3775, },
            ApertureH = Input { Value = 0.2123, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 440, 16.5 } },
      },
      Shape3D1 = Shape3D {
         Inputs = {
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, }
         },
         ViewInfo = OperatorInfo { Pos = { 220, 16.5 } },
      },
      Renderer3D1 = Renderer3D {
         CustomData = {
            ToolVersion = 2,
         },
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 82.5 } },
      },
      Note1 = Note {
         CtrlWZoom = false,
         Inputs = {
            Comments = Input { Value = "This shape has its matte property set to 'is matte' which forces the renderer 3D to render this part of the image transparant.", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 220, 115.5 },
            Flags = {
               Expanded = true
            },
            Size = { 196, 181.364 }
         },
      }
   }
}
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

CaptainNoAction

  • Posts: 55
  • Joined: Sun Jan 02, 2022 3:31 am
  • Real Name: Matt Lewis

Re: POrtal in 3D

PostWed Mar 15, 2023 5:56 pm

[quote="Sander de Regt"]Well. You're pretty close already.

Just don't put the video you're transitioning to in the 3D world.
-Ok, removed. But my portal is gone.

(maybe don't even use the video you're coming from either)
-Not sure what you mean.

Instead of the video you're going into, you want that part to be transparent.
So set the matte property of your image plane to 'is matte' this will create a hole in your render.
You can then use this hole to make the transition in 2D.
-Unfortunately, I am lost. I checked the "Is Matte" on the ImagePlane3D node and now have a grayscale checkerboard. All my nodes are not 3D.

If you copy/paste the following code in your Fusion node area, you will see what I did there.
-I did and I am trying to follow. Is this a general node tree of what I have done?
Win 10 Pro
AMD Ryzen 9 7950X3D
nVidia GeForce RTX 4090
192 GB RAM
Corsair 1200HX PSU
DR Studio
Offline

Sander de Regt

  • Posts: 3864
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: POrtal in 3D

PostWed Mar 15, 2023 6:45 pm

If you want to, you can send me a DM and the comp, so I can help you set it up.

As soon as you add an imageplane, you have a 3D node, so yes, all your nodes are 3D.
It's just the loaders/media-ins and the output of the Renderer3d that are 2D.
So if you have a checkerboard in your render where the incoming video used to be, that's a good thing.
Now you can merge the image with the checkerboard (the output of the renderer3d) over your incoming image and you should be done. Unless you broke something somewhere else along the line.

My nodes were a proof of concept to show you how setting a 3D shape to 'is matte' will let you punch a hole in another shape, which is what you're after.
Sander de Regt

ShadowMaker SdR
The Netherlands

Return to Fusion

Who is online

Users browsing this forum: No registered users and 13 guests