# Directional pixel spread?

**URL:** https://forum.logik.tv/t/directional-pixel-spread/10655
**Category:** Flame Questions
**Tags:** batch
**Created:** [May 14, 2024, 5:29pm UTC](https://forum.logik.tv/t/directional-pixel-spread/10655 "2024-05-14T17:29:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![GPM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/gpm/32/4224_2.png) [@GPM](https://forum.logik.tv/u/GPM)
#### Post date: [May 14, 2024, 5:29pm UTC](https://forum.logik.tv/t/directional-pixel-spread/10655/1 "2024-05-14T17:29:09Z")

</div>

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

---

<div class="post-metadata">

### Author: ![PlaceYourBetts](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/placeyourbetts/32/6852_2.png) [@PlaceYourBetts](https://forum.logik.tv/u/PlaceYourBetts)
#### Post date: [May 14, 2024, 6:29pm UTC](https://forum.logik.tv/t/directional-pixel-spread/10655/2 "2024-05-14T18:29:54Z")

</div>

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

Directional #object obliterator

---

<div class="post-metadata">

### Author: ![cnoellert](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/cnoellert/32/559_2.png) [@cnoellert](https://forum.logik.tv/u/cnoellert)
#### Post date: [May 14, 2024, 6:31pm UTC](https://forum.logik.tv/t/directional-pixel-spread/10655/3 "2024-05-14T18:31:58Z")

</div>

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.

 ![Screenshot 2024-05-14 at 11.20.48 AM](https://us1.discourse-cdn.com/flex020/uploads/thedepartmentofexternalservices/original/2X/0/003aab3abfd636b28c2a873661e60ba2301c7731.jpeg)

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.)

 ![Screenshot 2024-05-14 at 11.05.33 AM](https://us1.discourse-cdn.com/flex020/uploads/thedepartmentofexternalservices/original/2X/a/a84ebb02f74c819778a818c94c70c0818c718457.jpeg)

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.

 ![Screenshot 2024-05-14 at 11.13.12 AM](https://us1.discourse-cdn.com/flex020/uploads/thedepartmentofexternalservices/original/2X/b/bb8ceb0a12df9eb3c6a1d251680115ba568e50e7.png)

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.

 ![Screenshot 2024-05-14 at 11.14.46 AM](https://us1.discourse-cdn.com/flex020/uploads/thedepartmentofexternalservices/original/2X/f/f5ec46040ca1516f2596be39049a9d8fda104853.jpeg)

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.

---

<div class="post-metadata">

### Author: ![philm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/philm/32/9286_2.png) [@philm](https://forum.logik.tv/u/philm)
#### Post date: [May 14, 2024, 6:39pm UTC](https://forum.logik.tv/t/directional-pixel-spread/10655/4 "2024-05-14T18:39:19Z")

</div>

Lovely explanation Chris.  
Thanks for sharing.

---

<div class="post-metadata">

### Author: ![GPM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/gpm/32/4224_2.png) [@GPM](https://forum.logik.tv/u/GPM)
#### Post date: [May 14, 2024, 6:41pm UTC](https://forum.logik.tv/t/directional-pixel-spread/10655/5 "2024-05-14T18:41:53Z")

</div>

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

---

<div class="post-metadata">

### Author: ![bryanb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/bryanb/32/136_2.png) [@bryanb](https://forum.logik.tv/u/bryanb)
#### Post date: [May 14, 2024, 8:09pm UTC](https://forum.logik.tv/t/directional-pixel-spread/10655/6 "2024-05-14T20:09:15Z")

</div>

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).
