DOF too deep - need to blur background

megabit wrote on 5/5/2012, 4:38 AM
Editing my classical music videos I usually do not need any special video effects. However, in the current project using material shot by somebody else (when I was disabled due to my post-surgery neck spine condition), one of the cameras was recording the pianist towards the audience and the operator didn't care to apply shallow enough DOF. The result is very distracting - people's faces in the background are in focus, just as the pianist himself...

So I've been thinking about blurring the audience while masking the pianist out and leaving him in focus. However, given I only can do very basic masking in Vegas, no matter how I try i always end up with a look as per the screen grab below (from another video, BTW):



Even though the model was not 100% stationary, a simple mask with lots of feathering works OK - but the result is a little "dreamy" and unrealistic...

Using the above method in my music video is questionable, as for the sake of consistency, I'd probably need to apply a similar dreamy look to all the other cameras, and this is not necessarily what the producer wants.

So, my question is: which third party plug-in would provide me with more precise and trackable masking, so that - with the pianist moving a lot - the mask could always follow his silhouette precisely, making it possible to blur the background audience without feathering the border?

I have not much experience in techniques like this, so I'm open to all suggestions; also - should a third-party software really be necessary - it'd be nice if a fully functional trial version existed :)

Thanks in advance,

Piotr

PS. BTW, the screen grab is from my FS100 video - I'm still amazed by how virtually noiseless it is!

AMD TR 2990WX CPU | MSI X399 CARBON AC | 64GB RAM@XMP2933  | 2x RTX 2080Ti GPU | 4x 3TB WD Black RAID0 media drive | 3x 1TB NVMe RAID0 cache drive | SSD SATA system drive | AX1600i PSU | Decklink 12G Extreme | Samsung UHD reference monitor (calibrated)

Comments

paul_w wrote on 5/5/2012, 5:53 AM
Could you track the mask with the pianist using keyframes?
Using the half and divide method and placing keyframes until the mask follows the talent convincingly enough (animating the mask). Then reduce feathering to get closer.
If that's not an option, then auto tracking would be needed.

Paul.
megabit wrote on 5/5/2012, 6:03 AM
This is what I mean Paul - trackable mask. Unfortunately, it would be very difficult to create in Vegas with a precision that would allow no feathering, and this is what's essential for maintaining the "real" look...

AMD TR 2990WX CPU | MSI X399 CARBON AC | 64GB RAM@XMP2933  | 2x RTX 2080Ti GPU | 4x 3TB WD Black RAID0 media drive | 3x 1TB NVMe RAID0 cache drive | SSD SATA system drive | AX1600i PSU | Decklink 12G Extreme | Samsung UHD reference monitor (calibrated)

paul_w wrote on 5/5/2012, 6:18 AM
OT: "I'm still amazed by how virtually noiseless it is".. yes, was shooting at ISO16000 yesterday.. yes grainy but still useable! (secret experiment to be released later) haha.

auto tracking plugin for Vegas, i don't know, but i would like that too. Will watch this thread with interest.

Paul.
Tech Diver wrote on 5/5/2012, 12:52 PM
Of third-party plugins, Boris BCC Z-Focus is a rack focus simulator based on a gradient mask of any shape and pattern. As with nearly all Boris plugins, it can be auto-tracked. I don't know if this is part of the Vegas BCC plugin set, but is it definitely part of the Red plugin.

Peter
megabit wrote on 5/5/2012, 3:08 PM
From this list

- it doesn't look like the Vegas version contains Z-focus...

Piotr

AMD TR 2990WX CPU | MSI X399 CARBON AC | 64GB RAM@XMP2933  | 2x RTX 2080Ti GPU | 4x 3TB WD Black RAID0 media drive | 3x 1TB NVMe RAID0 cache drive | SSD SATA system drive | AX1600i PSU | Decklink 12G Extreme | Samsung UHD reference monitor (calibrated)

TheHappyFriar wrote on 5/5/2012, 3:56 PM
Can you difference mask?

If there's any aliasing at all them I'm betting you don't get as clean as mask as you're thinking. Might just be easiest to do it by hand via a pan/crop mask.
Woodenmike wrote on 5/5/2012, 4:15 PM
New Blue has a rack focus plug in its video effects II that i have used with pretty good success...more natural looking bokeh effect than just applying a blur and masking etc. It is easy to key-frame within the parameters of Vegas and if your subject and camera isn't moving around too much, you might not even have to key-frame very much, just as though you would have if the DOF was set properly in the first place.
farss wrote on 5/5/2012, 5:02 PM
I have done something like this. Less than 10 second shot of a trumpet player. Shot during rehearsals and the musicians were wearing civies, guy behind the trumpet had a T shirt with big bold stripes. It took hours drawing the mask around the valves and the fingers as they moved.
The rotoscoping is only part of the problem, one today made much, much easier thanks to AE's Rotobrush tool. If you had a whole performance to do I'd suggest you'd pay for the cost of AE and the time to learn it on that one job alone. It really is magic:



You're still probably going to have to spend time tweaking. Even watching an Adobe guy demo it with that footage he was very honest about the limitations. That short in the demo makes it easy for the trackers because there's good chroma / luma separation between the subject and background.

There's another problem, one that I didn't realise until I'd done all that rotoscoping by hand to create the mask in Vegas.

How to simulate the blur?
The problem is that if you pull the subject out of the background and blur the background plate at the edge of where the subject was you have nothing, the camera didn't record what was behind the subject. As you add the blur, at the mask edge, it blurs the alpha channel and you end up with a halo around the subject.
So I tried a different approach, just blur the entire frame with the subject in it and comp just the subject over the top. Argh, another problem. Pixels from the subject are now blurred into the background creating a different but equally odd effect at the edges of the mask.

I kind of gave up at that point. I applied a tiny amount of blur to the background and desaturated it. Overall that was enough to save the shot and the shot was short enough for the audience not to realise what was going on.

In hindsight I should have done the thing in AE because it has edge aware FXs etc that help avoid this problem. You can also shrink and expand masks, you can even keyframe the amount of shrink / expand applied to the mask.

Bob.
DataMeister wrote on 5/5/2012, 10:28 PM
If you are buying After Effects new, then wait for CS6 to be released before you start the work (if possible). Hopefully that will be tomorrow. From the previews it looks like they incorporated much more of the content aware features to help with the rotoscoping tasks.

Plus with the new Creative Cloud option you can use it for one month for just $80.
paul_w wrote on 5/6/2012, 7:00 AM
Very interesting using the RotoBrush in AE. May i ask someone to explain the workflow between Vegas and AE. By that i mean what rendering format or import/export into AE is needed to be able to edit in Vegas and Roto in AE.

Thanks
Paul.
megabit wrote on 5/6/2012, 7:04 AM
Yeah, looks like I'd need another software (thanks Bob for pointing towards AE) rather than a Vegas plug-in. Unfortunately, this single project doesn't justify the investment :(

Or do you think the learning curve would be flat enough to get this particular job done using just the 30-days trial?

:)

Piotr

AMD TR 2990WX CPU | MSI X399 CARBON AC | 64GB RAM@XMP2933  | 2x RTX 2080Ti GPU | 4x 3TB WD Black RAID0 media drive | 3x 1TB NVMe RAID0 cache drive | SSD SATA system drive | AX1600i PSU | Decklink 12G Extreme | Samsung UHD reference monitor (calibrated)

farss wrote on 5/6/2012, 8:19 AM
"Or do you think the learning curve would be flat enough to get this particular job done using just the 30-days trial?"

It'd certainly be a sensible starting point.
Please be aware, no one here, including me, has a real clue as to how amenable the task you're trying to do is to any solution. Despite all the seemingly magic tools available today (for a price) even the best Hollywood has to work with at times still requires a 100 rotoscope craftsmen working for a week to get a 10 second scene fixed.

Bob.
megabit wrote on 5/10/2012, 4:31 AM
Well, so I installed the AE 6.0 trial, and tested rotobrushing some of my footage...

Wile the automatic mask creation (following edges intelligently, and of course tracked with time/motion) is wonderful, there are actually 2 drawbacks:

- the rendering process in AE is surprisingly slow; one second of a 2-layer comp taking several minutes to render, and then some to export to avi!

- the mask border is never clean enough for a realistic type of video my music production is; that means it must be feathered anyway - and the final result is not much different than my quick and dirty trials with Vegas crude masking...

Piotr

AMD TR 2990WX CPU | MSI X399 CARBON AC | 64GB RAM@XMP2933  | 2x RTX 2080Ti GPU | 4x 3TB WD Black RAID0 media drive | 3x 1TB NVMe RAID0 cache drive | SSD SATA system drive | AX1600i PSU | Decklink 12G Extreme | Samsung UHD reference monitor (calibrated)

farss wrote on 5/10/2012, 7:55 AM
"Wile the automatic mask creation (following edges intelligently, and of course tracked with time/motion) is wonderful, there are actually 2 drawbacks:"

Having watched the demo done live I'm not surprised really. Whatever magic Adobe have woven into that tool it has to involve an awefull lot of number crunching.

I still think your biggest challenge isn't going to be the mask. From my feeble efforts I could find no way to simulate a shallow DOF when I was keeping one object sharply in focus and something behind it was being blurred. It took me a while to fathom how a lens could do that and what was missing in the all-in-focus image that stopped me. I think what happens is the light in effect "bends" around the in-focus object. You can see that pretty dramatically if you focus on something distant and put say a pencil much closer to the lens. The pencil is not just blurred, you can see through it.

Bob.
paul_w wrote on 5/10/2012, 9:13 AM
Bob, rather than the light bending around the pencil, which i would say is not the case, its more like two images being superimposed on one on another. The distant object is in focus (image 1) and the closer pencil is totally blurred and therefore has no body (image 2). Layer those together and the pencil looks see through. Does that stack up?

Paul.
farss wrote on 5/10/2012, 9:32 AM
"Bob, rather than the light bending around the pencil, which i would say is not the case, its more like two images being superimposed on one on another. The distant object is in focus (image 1) and the closer pencil is totally blurred and therefore has no body (image 2). Layer those together and the pencil looks see through. Does that stack up?"

No, of course the light doesn't actually bend, my bad but to explain it properly is difficult with diagrams but I'll try.

When something is in focus all the rays of light from one point converge, they are focussed,
Something that isn't in focus the rays of light don't converge. Now if you draw all those sets of rays you will get the idea, even more interesting is drawing the rays with the iris closed (shallow DOF) compared to the iris open (deep DOF).

There is something on the web that shows this very well.

Found this.

Look at the sets of lines, put something close to the lens. Some of the rays can trace from behind a close object through the lens. They're not bent, still straight. Hope that helps.

Bob.
PeterDuke wrote on 5/10/2012, 9:50 AM
No. I think the problem is the bounding of the blurring process. You want it to blur within the background but its boundary has to be sharp. It must not look across the boundary and grab pixels from the main subject.

I have struck this with processing still images if I try to remove artefacts from a clear blue sky by blurring the sky and nothing else. What I have done is separate the sky and foreground into two layers/objects (depending on editor terminology), clone the sky over where the foreground was to give the blur something to grab across the boundary, and then apply blur. Flatten/combine layers/objects and that's it.
paul_w wrote on 5/10/2012, 10:04 AM
yes, and isn't that what the mask is for, to define the object boundary. From what i understand, (and thanks Bob for clearing up the bending light point), once the mask is defined, this is the only area in focus and the rest can then be blurred for a shallow DOF look. If the mask quality and tracking is accurate enough then the effect should look convincing. So isn't the whole problem with accurate mask tracking?

Paul.
PeterDuke wrote on 5/10/2012, 10:11 AM
No. Although it only blurs the part within the mask, it looks across the mask boundary to grab pixels to calculate the blur to apply within the mask (at least that's what happens with Corel Photo-paint. I haven't tried anything else).