Directional pixel spread?

Hello. I’ve had plenty of jobs where I create a clean BG using the FG matte plus Pixel Spread contract – it can do pretty quick and decent work in a lot of cases. But sometimes the shot needs more of a directional pixel spread, in order for the contracted plate not to contort in unwanted directions, etc.

Anyone know of either a tool or a hack with existing tools to be able to control the contraction directionally?

Thanks in advance for any thoughts.

@lewis @miles

2 Likes

Matte > Multiply > Blur (directional RGB+A) > Divide > Comp

Directional #object obliterator

3 Likes

If I understand what you want @GPM you can use PixelSpread in vector warp mode.

Basic idea is create a zero’d out UV map which you then move in the direction you want your pixel spread to go. So as a quick and dirty example I add a plate to an action. Create an extended bicubic surface. In the action output add and output, set it to UV and enable all objects.

Next I need to lay out some verts on my surface which I will use to create the direction I want the pixel spread to follow based on their offset from their original position. So I subdivide the mesh, reposition some of the UV points around the car and then copy my UV shape back to the verts on the extended bicubic so that my UVs and vert positions match. Lastly, I move that keyframe back one frame (since we’re in pro-mode autokey-wise.)

Next, on that same frame, we need to move the verts in the direction that we want the pixel spread to go… so I’ll move the back of the car inward. Autokey is still on so there’s a keyframe at the current frame and the previous frame.

We’ll add a mux to hold the previous frame and another mux to hold the current frame. Then we add a comp node to subtract where we started from from where we want to go. This will create a vector pointing in the direction we want to pixel spread.

Then add a pixel spread node. Connect the original image as front, the output of the comp node as vector input and change the mode to vector (at which point the node will stop complaining. Set the origin to 0,0 because UV maps start drawing at 0,0 and set the vector x gain to the x aspect and the y vector gain to 1. In my case the aspect was 1.437:1 so I set it to 1.44 in x and 1 in y. Then you adjust the distance and spread blur to taste.

This is like a super simple example of course–you can warp that image all around even overlap and combine with blurs and whatnot.

Edit: One little thing worth mentioning is that the gain number are multipliers for the distance parameter. So if you drive distance to a point where it’s not going any further multiply your gains by 10 or 100 or whatever to make the distance more sensitive.

12 Likes

Lovely explanation Chris.
Thanks for sharing.

2 Likes

Wow, great stuff. I’ll give this a shot when I have some time to play. Thanks a bunch, Chris & Richard.

3 Likes

If it’s a simple direction like left/right up/down you can also use the Object Obliterator matchbox and just blur the x or y. (Similar to Richard’s comment).

1 Like