Repeat Last Pixel

Hi All

When I shrink something in 2d transform, I can repeat the last pixel out to create a nice neat edge on the fill. Like the attached image. I would like to do this with an image I have tracked. Can you think of how I can do this? The extrapolation in flame isnt quite doing it since it gives mirror repeat and Pixel Spread have some aberration to do with the filtering.

Diffuse ?

Tell me more

Is it too late to just expand your canvas in 2d transform with repeat last on and then feed that in as your front?

I don’t remember offhand what effect changing the resolution of an already tracked bilinear will have, but I assume it won’t be great. It may be something you can fix by messing with the surface UVs.

2 Likes

You can repeat diffuse maps in action.

I think it’s just tile and mirror repeat though randy, no last pixel repeat that I could see

I’ve done something like this before, just making your bigger canvas in 2d transform before it gets piped into action, then using the edit track channel function under the vertices of the bilinear or perspective surface to just change one frame of the corner pins so they’re pinned where they need to be and remain there without ditching all my shape keyframes or having to adjust every keyframe again. Results will certainly vary.

Sadly, I have to agree for now - in photoshop it just stretches out the last pixel - I feel sure I stumbled across a way to replicate this in flame…but I can remember for now.

You can do this with replicate. It’s a little convoluted, but I’ll try to explain.

Add a replica node to the image.
Set replications to 100
Set z position to -1
Go to the priority menu, select all layers and select z sort
return to replica and set z translation back to 0
adjust scale in the replica menu to taste. small increments are best. It might take some math to figure out what the value should be to replicate just the last pixel.

If you don’t like the fact that it scales unevenly in x and y, then go to the y scale in animation and add this expression: ((x-100)*[aspect ratio])+100. So if it was a normal HD image, [aspect ratio] would equal 1.7778. Turn proportional scaling off.

4 Likes

Expanding the resolution and painting the edges mostly is way faster than trying to find some technical solution

1 Like

I actually made a simple little rig in Action a couple months ago that does exactly this procedurally. Someone had asked similar in another post and I posted the setup of you want to find it. Or I can send it when I get back in town Monday.

1 Like

Because yes, unfortunately diffuse only has tile and mirror.

Are you doing a screen comp?

Natch

Howdy, johnt!

Assuming you’ve got a working Action with a nice track for your screen content… I then add a new Action output which is for the screen content only. The key to doing this is (after adding the output), in Action’s Output menu, tap on the “Use Background” box to toggle it to “Use Colour” – this gives you your screen content over black (default, but you can change the color). Make sure to add a Matte channel for this output and you now have your tracked screen content over black with its relevant matte.

Add a post-Action Pixel Spread set to Stretch->Expansion or Color Interpolate->Expansion and perform the comp outboard from Action and you should achieve very nice edges.

p.s. In Action, I recommend setting a crop softness of 5-7 for the layer (media) and using EWA+linear filtering .

This is more or less what I ended up doing thanks.

It’s a good workaround. I’m also keen to try @ytf replicate trick too!

And @GPM would enjoy seeing your solve.

Every day is a learning day.

Many thanks.

@johnt I think @GPM is referring to this which he kindly took time to build for me a few months ago:

1 Like

If your transform is in a single axis you could always still use 2D transform…

This was an hd source into a UHD backplate with an planar track driven transform from action. Just copy and paste the relevant transform data, manually set the output resolution to match the backplate size and set to last.

Jun-18-2022 11-22-57

Best,
Chris

1 Like

I imagine this might work on a bilinear etc with uv adjusted if 2d transform added after the fact. I’ve changed canvas size after setting bilinear. Note to self to try.

1 Like

Well if you want to add surface transforms like bilinear or whatnot, track the surface into place, distort it with whatever surface type you want, then make a copy of the surface with all the axis transforms included and assign it to a uv action output only. Make sure to hide it from your comp output.

View the UV output and expand the copied surface’s extents with a stupid high number so that the uv’s of that surface cover the whole rendered frame.

Add a Uv transform matchbox (or whatever it’s called), plug your original surface in and you should have exactly what you’re after.

Jun-18-2022 22-51-31

One extra node really.

Best,
Chris

5 Likes