Jump to: Board index » General » Fusion

Zooming on still jpg crops final image with black bars

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

Nathan Shirley

  • Posts: 72
  • Joined: Fri Jan 12, 2018 6:43 am

Zooming on still jpg crops final image with black bars

PostMon Dec 09, 2019 5:33 am

New to Fusion here. I've got a still image I want to pan/zoom animate in Fusion using a transform node (for more control since transform is so limited in Edit). The image's aspect ratio is 4:3, while my timeline is 16:9 (my intended render aspect ratio).

When I zoom in on the still image in Fusion and then switch to Edit, the image is cropped on the sides (black bars). I assume it's trying to keep the output of this image at 4:3, but of course I want it to fill the 16:9 frame. I don't see any settings in Fusion's "transform" panel to ignore the original aspect ratio... and really I'm surprised it doesn't do this by default.

I must be missing something obvious.
Offline

Sander de Regt

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

Re: Zooming on still jpg crops final image with black bars

PostMon Dec 09, 2019 4:38 pm

It sounds like you've input the image in your Resolve timeline.

The easiest way (probably) to achieve what you want is by creating a blank Fusion clip in your timeline (which is 16:9 I presume) and then import your image in the Fusion page itself. Then you can merge it on top of your mediain and you will get a 16:9 result.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

Nathan Shirley

  • Posts: 72
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Zooming on still jpg crops final image with black bars

PostMon Dec 09, 2019 8:27 pm

Thanks, yes that's what I did (image in timeline).

So I've now added a "Fusion Composition" in my timeline, and looking at it in Fusion I've done the following:

Imported my image which shows as the only "MediaIn" node. I then run that into a "Transform" node and then into "MediaOut."

When I zoom in using the "transform" node it still crops the sides as before...

I'm obviously missing something very basic.
Offline

xunile

  • Posts: 918
  • Joined: Mon Apr 23, 2018 5:21 am
  • Real Name: Eric Eisenmann

Re: Zooming on still jpg crops final image with black bars

PostTue Dec 10, 2019 1:46 am

You can try a "Resize" node after the MediaIn node and set it to 1920x1080. Then connect it to a Transform node. If you set the Resize node to 3840x2160 the image will be less compressed and still fill the 1920x1080 of the Timeline.
Attachments
2019-12-09 (3).png
2019-12-09 (3).png (896.89 KiB) Viewed 616 times
2019-12-09 (4).png
2019-12-09 (4).png (966.31 KiB) Viewed 616 times
Win 10 Home
Intel Core I7-7700HQ 32 GB 1 TB NVME SSD 1 TB SATA SSD
GTX-1060-6GB
Resolve 16.1.2
Offline

Nathan Shirley

  • Posts: 72
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Zooming on still jpg crops final image with black bars

PostTue Dec 10, 2019 4:50 am

Thanks, but when I use a resize node and set it to a 16:9 aspect ratio (like 1920x1080 or 3840x2160) it stretches the image out horizontally to fit that aspect ratio (distorting it) rather than expanding the "canvas." It looks like your image is getting stretched out horizontally too.

There's got to be some way to do this right?
Offline

Nathan Shirley

  • Posts: 72
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Zooming on still jpg crops final image with black bars

PostTue Dec 10, 2019 5:30 am

Just read this has to be done in 3D apparently. For anyone wondering how, here's how I set it up:

Add a "Fusion Composition" to your timeline in "Edit"
With the playhead on that clip, open Fusion.
Import your image into Fusion, it will be generated in a "MediaIn" node.
You'll need to add and connect the following notes between "MediaIn" and "MediaOut" (left to right):
"ImagePlane3D"
"Renderer3D"
"Transform"

Once all 5 nodes are connected, you should be able to use the "Transform" node to zoom/pan. I tried to do this in "ImagePlane3D" directly, without the Transform node, but it seems to limit how far you can zoom in... before the image just disappears.
Offline

Sander de Regt

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

Re: Zooming on still jpg crops final image with black bars

PostTue Dec 10, 2019 9:15 am

No. You don't need to do this in 3D.

You just have to make sure that you're taking the right approach.

In the Fusion page create a 16x9 background (Full HD or Ultra HD) and merge the original 4x3 image on top of it. Now you can use either the merge size/rotate/position options or put a transform between the 4x3 image and the merge set to its default settings and you should be done.

There is absolutely no reason to ever do this in 3D.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

Nathan Shirley

  • Posts: 72
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Zooming on still jpg crops final image with black bars

PostTue Dec 10, 2019 9:51 am

Ah first a background node. Thanks very much, that does work.

Now if they could just lift that 16k resolution limit it would be great.
Offline

Sander de Regt

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

Re: Zooming on still jpg crops final image with black bars

PostTue Dec 10, 2019 9:55 am

If you do a little preparation in advance you can work around that pretty easily.
Just divide up your image in sections in an image ditor that do fit in the limit and then link them all together in the Fusion page. It takes a little work, but once you know how you should be able to do it in 5 minutes tops.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

Nathan Shirley

  • Posts: 72
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Zooming on still jpg crops final image with black bars

PostTue Dec 10, 2019 10:07 am

Thanks for the suggestion, I figured there should be a work around. Chopping the image up won't be a problem. Linking them and getting them to all pan in unison with lots of keyframes sounds challenging, but I'll give it a try.
Offline

Sander de Regt

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

Re: Zooming on still jpg crops final image with black bars

PostTue Dec 10, 2019 10:34 am

You have to link them all together in a way that you only need to add one set of keyframes.
Take a look at the off-set modifiers and simple expressions to get you started.
Like I said: once you know it, you can set it up in about 5 minutes.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

Nathan Shirley

  • Posts: 72
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Zooming on still jpg crops final image with black bars

PostTue Dec 10, 2019 8:59 pm

I was able to stitch two large images together using separate transform nodes for each, and then using one global transform node later in the chain to move the entire thing in unison. My GPU wasn't happy though...

After a quick look at using an expression to link two nodes I think I understand how that could work too. Would doing it this way be more efficient from a computational standpoint? At this point my 6 GB GPU is frequently crashing Resolve moving these two (less than 3 MB mono) images.

Thanks again, I appreciate the help.
Offline

Nathan Shirley

  • Posts: 72
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Zooming on still jpg crops final image with black bars

PostWed Dec 11, 2019 9:04 am

Last issue with this that I for some reason can't figure out. I can now get this to work with JPEGs, but not for PNGs. The PNGs also seem to need a background in order to not be cropped, but once a background is added it seems to be masking the PNG, so whatever color (or lack of color based on alpha) the background has, the PNG takes it on.
Offline

Sander de Regt

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

Re: Zooming on still jpg crops final image with black bars

PostWed Dec 11, 2019 9:11 am

In the PNG loader find the post multiply by alpha setting and toggle it to see if that makes a difference.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

Nathan Shirley

  • Posts: 72
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Zooming on still jpg crops final image with black bars

PostWed Dec 11, 2019 9:51 am

Just tried it, it does nothing. I also tried an AlphaMultiply node with no luck. It's definitely the background node that's messing it up, but adjusting the alpha settings there don't help either.
Offline

Sander de Regt

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

Re: Zooming on still jpg crops final image with black bars

PostWed Dec 11, 2019 10:02 am

That's weird. Any chance you can post the PNG in question? And/or your current setup?
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

Nathan Shirley

  • Posts: 72
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Zooming on still jpg crops final image with black bars

PostWed Dec 11, 2019 10:24 am

Sure, here's the PNG. I don't have Resolve running currently, but off the top of my head, The PNG is over a background node being fed into MediaOut. I've tried this with other nodes too, merged together, with a transform node, changed order of background, with and without a loader node, etc., everything I could think of.

Hoping I'm just missing something obvious since I'm new to Fusion.
Attachments
Piano Revealed.png
Piano Revealed.png (230.28 KiB) Viewed 546 times
Offline
User avatar

Bryan Ray

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

Re: Zooming on still jpg crops final image with black bars

PostWed Dec 11, 2019 2:56 pm

No time to investigate your PNG, but I thought I'd offer a suggestion about your efficiency problem. Add a Crop node after your last Transform to trim off all the pixels outside the canvas. View through that Crop. Once you've performed the move, there's no reason to keep the rest of the quilt in memory. It may not help a lot, since you might still be unable to process the Transforms on the GPU due to insufficient VRAM, but it might at least improve your Viewport performance.
Bryan Ray
http://www.bryanray.name
http://www.musevfx.com
Offline

Sander de Regt

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

Re: Zooming on still jpg crops final image with black bars

PostWed Dec 11, 2019 3:52 pm

I don't see anything weird with it.
This is the result I'm getting:
Code: Select all
{
   Tools = ordered() {
      Loader1 = Loader {
         Clips = {
            Clip {
               ID = "Clip1",
               Filename = "C:\\Users\\Sander de Regt\\Desktop\\Piano Revealed.png",
               FormatID = "PNGFormat",
               StartFrame = -1,
               LengthSetManually = true,
               TrimIn = 0,
               TrimOut = 0,
               ExtendFirst = 0,
               ExtendLast = 0,
               Loop = 0,
               AspectMode = 0,
               Depth = 1,
               TimeCode = 0,
               GlobalStart = 0,
               GlobalEnd = 0
            }
         },
         CtrlWZoom = false,
         Inputs = {
            Depth = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            ["Clip1.PNGFormat.PostMultiply"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 16.5 } },
      },
      Background1 = Background {
         Inputs = {
            GlobalOut = Input { Value = 500, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 0.654, },
            TopLeftGreen = Input { Value = 0.437526, },
            TopLeftBlue = Input { Value = 0.437526, },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 49.5 } },
      },
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Loader1",
               Source = "Output",
            },
            Size = Input { Value = 0.351617145731222, },
            Angle = Input { Value = -358.361335071735, },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 495, 49.5 } },
      }
   }
}
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

Nathan Shirley

  • Posts: 72
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Zooming on still jpg crops final image with black bars

PostWed Dec 11, 2019 6:33 pm

I'm sure I'm doing some basic thing wrong with my nodes then. Trying to read that code it looks like you've got the PNG in a loader node, going into a background node, going into a merge node, going into MediaOut. Is that right?

When I do the same (or one of many variants) the PNG has a black mask over it, and the background is transparent, and the PNG is partially cut off on the right side.
Offline

xunile

  • Posts: 918
  • Joined: Mon Apr 23, 2018 5:21 am
  • Real Name: Eric Eisenmann

Re: Zooming on still jpg crops final image with black bars

PostWed Dec 11, 2019 6:35 pm

Nathan Shirley wrote:I'm sure I'm doing some basic thing wrong with my nodes then. Trying to read that code it looks like you've got the PNG in a loader node, going into a background node, going into a merge node, going into MediaOut. Is that right?

When I do the same (or one of many variants) the PNG has a black mask over it, and the background is transparent, and the PNG is partially cut off on the right side.


You can copy the code and paste it into your Node Editor.

Here is what it looks like on my PC when I merge your PNG with a transparent background.
Attachments
2019-12-11.png
2019-12-11.png (298.83 KiB) Viewed 525 times
2019-12-11 (1).png
2019-12-11 (1).png (857.63 KiB) Viewed 525 times
Win 10 Home
Intel Core I7-7700HQ 32 GB 1 TB NVME SSD 1 TB SATA SSD
GTX-1060-6GB
Resolve 16.1.2
Offline

Nathan Shirley

  • Posts: 72
  • Joined: Fri Jan 12, 2018 6:43 am

Re: Zooming on still jpg crops final image with black bars

PostWed Dec 11, 2019 7:28 pm

Ah, thanks so much both of you! I'm still thinking half in layers rather than nodes. I now understand the proper way to set this up.
Offline

xunile

  • Posts: 918
  • Joined: Mon Apr 23, 2018 5:21 am
  • Real Name: Eric Eisenmann

Re: Zooming on still jpg crops final image with black bars

PostWed Dec 11, 2019 7:34 pm

Nathan Shirley wrote:Ah, thanks so much both of you! I'm still thinking half in layers rather than nodes. I now understand the proper way to set this up.


You're welcome, glad you got it working.
Win 10 Home
Intel Core I7-7700HQ 32 GB 1 TB NVME SSD 1 TB SATA SSD
GTX-1060-6GB
Resolve 16.1.2

Return to Fusion

Who is online

Users browsing this forum: Google Feedfetcher and 11 guests