Skip to main content
TaranVH
Inspiring
January 24, 2023
Under Review

Nearest neighbor scaling (sampling) - simple and vital

  • January 24, 2023
  • 72 replies
  • 20483 views
After Effects allows you to use Bicubic, bilinear, and nearest neighbor ("draft") for scaling. (Also known as "sampling" or "interpolation.")

Premiere should absolutely have the option for the Motion effect to use Nearest Neighbor. (It would still be bicubic by default, as it is now.)

This is very important for sprite art, screenshots, screen recordings, etc.

Here is a forum thread on the issue from 2012, where most people unfortunately don't even understand what the problem is:
https://forums.adobe.com/thread/1061901

NOTE: The TRANSFORM effect currently has the option for bilinear and bicubic. It would be good to add nearest neighbor here, but that should not be the ONLY place where it is available. The Transform effect still has severe issues with buggyness, instability, and choppy movement. Again, it is important that the MOTION effect has the option for Nearest Neighbor.

72 replies

AntoineAutokroma
Known Participant
January 24, 2023
There is GPUResize for AEfx and PPro https://aescripts.com/gpuresize/
-------------------- AfterCodecs (Fast Exporter & Workflow Tools) and BRAW Studio (Fully featured Blackmagic RAW Importer & Panel Suite) for Adobe CC
Participating Frequently
January 24, 2023
Also bumping this thread, shouldn't need to add an extra PR-AE-PR round trip per clip, even if using dynamic link, to disable the lanczos interpolation. I haven't worked with the Premiere code but I'd assume there's a bypass that can be done?

Retro style is huge right now, there are tons of 80s review videos of not just shows and commercials, but especially for video games. That's what I do, I make the War Stories videos for Ars Technica, so I'm always using 720, 480, 240 videos, most in 4:3. But when scaling these up, that blur just mimics your eyes being blurry and it's hard to watch. Creates headaches, like walking around without glasses but still trying to see.

So with a bypass of the lanczos pipeline, is there a way to implement maybe not the exact code for "nearest neighbor" in PS, but something that functions likewise? It'd most likely be a hard effect, requiring pre-rendering to view like with Optical Flow, but that would be totally fine. It sure beats having to send to AE and back when there are dozens of clips. Sometimes dynamic link can get funky, especially if you needed to offline or change media locations. Plus there's the problem of those in/out points being locked when you replace with an AE comp, so you'd need to be at picture lock before being able to see what it looks like.

The hard crisp edges of the original pixels are a beautiful thing, especially important in these retro review videos. On the old displays the pixels were sharp due to the screen itself, those were the actual pixels that we used to see, so I believe it's very important to be able to preserve that data.

Thanks Adobe, hope you can add this feature soon! It's the age of retro, we need our 80s/90s pixels 🙂
TaranVH
TaranVHAuthor
Inspiring
January 24, 2023
***UPDATE:*** (because I can't edit the post)
Adobe redesigned their forums, and the thread I linked to seems to have gone missing. Here's a screenshot of the whole thread: https://imgur.com/sfw3i2N

To bump my response to Francis Crossman, which has gotten a bit buried:
Neither Lanczos nor Detail-Preserving Upscale can solve the problem of preserving sharp pixel edges - only Nearest Neighbor can. I've created all_upscale_comparisons.png to prove it (attached.)

And here is the the original sprite so that you can try it yourself:
https://i.imgur.com/Mdnm5lr.gif
On a 1080p timeline, scale the .gif to 4000% and you will see the same blurry results.
Participating Frequently
January 24, 2023
@TaranVH That is true and speeds up my workflow at least a little bit until this gets implemented *nudge nudge* 😉
TaranVH
TaranVHAuthor
Inspiring
January 24, 2023
@1735590 Yes, but if you use "Replace with after Effects composition," you don't even have to render it from AE and re-import to premiere... the whole thing gets rendered all at the same time at the end.
Yes, I wish Premiere could do Nearest Neighbor on its own, (thus this feature request) but dynamic linking to AE is the best solution for now. Certainly, better than rendering from Virtualdub!
Participating Frequently
January 24, 2023
@TaranVH I mean that I don't want to have to round-trip to a different software (even if it's from Adobe) for a feature as simple as manually picking an upscale algorithm. I wish it would work like time interpolation: Right click a clip and pick the algorithm, see the attached mock-up 🙂
TaranVH
TaranVHAuthor
Inspiring
January 24, 2023
@Phil Strahl
What do you mean? You can use link to AE and use After Effect's draft mode - it's the same as Nearest Neighbor.
Just make sure you set it to quality: Current settings.
There's also sharp-billinear scaling, which can be great for sprite art.
you should definitely watch this whole video: https://www.youtube.com/watch?v=fKV1JFE0_Nk
Participating Frequently
January 24, 2023
I'd love to have a per-clip option for the scaling algorithm as I work a lot with retro-game footage in tiny resolutions whose sharp pixel edges I want to preserve. Currently, the only way of not having them blur together is to do the scaling in VirtualDub and render out a new file which is tedious and feels unnecessary.

Please make nearest neighbor / integral scaling an option!
Inspiring
January 24, 2023
Thanks for the info Taran. Is it slower because Effects cannot use the GPU inside PPro ?
TaranVH
TaranVHAuthor
Inspiring
January 24, 2023
@Letty
Hmmm, it's possible that RedGiant's Instant4K "draft" might actually be nearest neighbor, but I don't know. I'll have to check it out sometime.