How do I zoom an superimposed image without cropping?

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

Scott Gilbertson

  • Posts: 67
  • Joined: Thu Apr 02, 2015 2:14 pm
  • Location: Canada

How do I zoom an superimposed image without cropping?

PostSun Apr 05, 2015 9:26 pm

I have 1080p clips in the timeline, and I want to superimpose an alpha-masked image, shrinking that image. The image starts out at, say, 1000x1000 pixels, and I want to reduce it to a size somewhere around, say, 200x200, so that it fits nicely in a particular area of the underlying 1080p clip.

I do an alpha mask in "Color", so that the object in the image is isolated, and add it to my timeline with composite mode = normal. Then I zoom it in, either in "Color" or in the effect inspector. Either way, the problem is that the overall video winds up getting cropped to the reduced size of the overlaid image. That is, the area outside of the 200x200 square is black.

I would like the area outside my overlaid image to be treated as transparent, so that the underlying clip shows through. Is that possible? How?
Microsoft Windows 10 Pro
Xeon W3680, 48GB RAM, NVIDIA GeForce RTX 3050
Offline

Scott Gilbertson

  • Posts: 67
  • Joined: Thu Apr 02, 2015 2:14 pm
  • Location: Canada

Re: How do I zoom an superimposed image without cropping?

PostTue Apr 07, 2015 11:36 am

I came up with an ugly workaround, converting my image to a short video clip (every frame the same) externally, using ffmpeg. When I zoom out a maked video clip, the surrounding area is correctly transparent. The problem only affects stills, and it seems like a bug to me.
Microsoft Windows 10 Pro
Xeon W3680, 48GB RAM, NVIDIA GeForce RTX 3050
Offline
User avatar

Marc Wielage

  • Posts: 11052
  • Joined: Fri Oct 18, 2013 2:46 am
  • Location: Hollywood, USA

Re: How do I zoom an superimposed image without cropping?

PostTue Apr 07, 2015 11:31 pm

What if instead of a short video image you just created a TIFF and then stretched out the TIFF to the length of the timeline?
marc wielage, csi • VP/color & workflow • chroma | hollywood
Offline

Rohit Gupta

Blackmagic Design

  • Posts: 1631
  • Joined: Wed Aug 22, 2012 5:00 am

Re: How do I zoom an superimposed image without cropping?

PostWed Apr 08, 2015 3:34 am

Scott Gilbertson wrote:I have 1080p clips in the timeline, and I want to superimpose an alpha-masked image, shrinking that image. The image starts out at, say, 1000x1000 pixels, and I want to reduce it to a size somewhere around, say, 200x200, so that it fits nicely in a particular area of the underlying 1080p clip.

I do an alpha mask in "Color", so that the object in the image is isolated, and add it to my timeline with composite mode = normal. Then I zoom it in, either in "Color" or in the effect inspector. Either way, the problem is that the overall video winds up getting cropped to the reduced size of the overlaid image. That is, the area outside of the 200x200 square is black.

I would like the area outside my overlaid image to be treated as transparent, so that the underlying clip shows through. Is that possible? How?


Just put the clip on V2 on the edit page, and use the zoom and crop controls in the inspector to get it to the size you need.
Rohit Gupta

DaVinci Resolve Software Development
Blackmagic Design
Offline

Scott Gilbertson

  • Posts: 67
  • Joined: Thu Apr 02, 2015 2:14 pm
  • Location: Canada

Re: How do I zoom an superimposed image without cropping?

PostWed Apr 08, 2015 1:34 pm

Solved, although I claim my solution is a bug workaround.

When I'm using the qualifier tool to alpha-mask the image, I need to make sure the area outside the image is part of the mask, using a rectangular window sized so it's just inside the boundaries of the image (i.e. so a few pixel rows on each side of the image are masked out). Having done that, I can then resize back in the timeline inspector, to make the image fit where it's supposed to be. The surrounding area is properly transparent.

It seems to me that when you resize an image on top of a clip, the surrounding area should be transparent, regardless of what processing you've done on that image. That's exactly what happens when you resize a chroma-keyed video clip, but when you resize an image that's had the same qualifier used to make a mask, the surrounding area becomes opaque black. I claim my solution above is a workaround for a minor bug in DaVinci Resolve Lite 11.3.

Steps to reproduce the bug are:
  • Create a timeline with a video clip on V1 and an image (JPG, TIFF, etc. -- not a video clip) on V2. Select an image with a plain background and an object in the middle.
  • In "COLOR", add a serial node for your image, and use the qualifier tool to mask out the area surrounding the object in the middle.
  • Back in the timeline, zoom the V2 image to something less than 1.0
  • The V1 video gets cropped, with a black border, even though the zoomed-out image is not in front of that area. If in the first step you put a video on V2 instead of an image, it works fine.

Before, I was using only the qualifier to mask out the parts of my image I wanted transparent, and then zooming out using using the inspector back in the timeline. Doing that makes the area around the size-reduced image go black.

What was suggested in the previous replies works if you haven't alpha-masked the image using the qualifier tool, but not if you have done so.
Microsoft Windows 10 Pro
Xeon W3680, 48GB RAM, NVIDIA GeForce RTX 3050
Offline

Peter Cave

  • Posts: 3802
  • Joined: Thu Aug 23, 2012 6:45 am
  • Location: Melbourne, Australia

Re: How do I zoom an superimposed image without cropping?

PostThu Apr 09, 2015 12:25 am

This issue is to do with the image processing order. I just replicated your issue. When the qualifier is used in the color page, it sees the edit page transforms as part of the image. If you reduce the size so that black is visible around the edges in the edit page, then these edges are considered as active pixels. If you use a luminance only qualifier you will see the edges pop on and off as you go past the 50% luminance point.

Solution: resize the image in the edit page so no edges are visible. In the color page, use the qualifier and then do all final image scaling in the color page. There is no image quality loss doing it this way.

This is not really a bug, it's just the way the processing works as it's a serial image processing pipeline.
Resolve 18.6.6 Mac OSX 14.4.1 Sonoma
Mac Studio Max 32GB
Offline

Scott Gilbertson

  • Posts: 67
  • Joined: Thu Apr 02, 2015 2:14 pm
  • Location: Canada

Re: How do I zoom an superimposed image without cropping?

PostThu Apr 09, 2015 1:04 pm

This is not really a bug, it's just the way the processing works as it's a serial image processing pipeline.

Fair enough. It just seems strange to me that it works differently for stills vs. video clips.
Microsoft Windows 10 Pro
Xeon W3680, 48GB RAM, NVIDIA GeForce RTX 3050
Offline
User avatar

JPOwens

  • Posts: 1511
  • Joined: Fri Apr 12, 2013 8:04 pm
  • Location: Victoria, British Columbia, Canada

Re: How do I zoom an superimposed image without cropping?

PostSat Apr 11, 2015 2:57 am

Am I missing something in the discussion or are you adding a discrete alpha output to the node? Anything qualified with either an external matte, HSL, or power window should allow the lower layer to show through.

jPo
Offline

Scott Gilbertson

  • Posts: 67
  • Joined: Thu Apr 02, 2015 2:14 pm
  • Location: Canada

Re: How do I zoom an superimposed image without cropping?

PostWed Aug 05, 2015 2:47 pm

Seems better in 12b2. At least one attempt appeared to work. I was able to shrink my masked still image (TIF file), and the background of the underlying video remained full-size. No black frame.

Plus, I think the pitch and yaw transform sliders in 12b2 are new since 11.3. I can flip things in and out of frame with a page-turning or card-flipping kind of action. Nice.

JPOwens wrote:Am I missing something in the discussion or are you adding a discrete alpha output to the node? Anything qualified with either an external matte, HSL, or power window should allow the lower layer to show through.

jPo


I'm not sure I understand "discrete alpha output". My steps are:
  • select the still image in my timeline
  • go to "color"
  • use the qualifier and eyedropper the surround in my picture
  • right-click "Add alpha node"
  • join the alpha output of my qualifier node to the alpha node on the right

Then I go back to the timeline and zoom the track in context (the idea being to keyframe that zoom).
In 11.3, I get a black frame occluding the underlying video. In 12b2 I don't.
Microsoft Windows 10 Pro
Xeon W3680, 48GB RAM, NVIDIA GeForce RTX 3050

Return to DaVinci Resolve

Who is online

Users browsing this forum: asbx81, dev_willis, JPShots, panos_mts, SimonLL, webisodes and 364 guests