• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
510

Nearest neighbor scaling (sampling) - simple and vital

Engaged ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

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.
Idea Under review
TOPICS
Effects

Views

12.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Pinned Reply

Adobe Employee , Jan 24, 2023 Jan 24, 2023
Currently, Premiere uses the Lanczos method for intrinsic scale and rotation. Lanczos is an exceptionally high-quality interpolation method which generally yields better results than bicubic, bilinear or nearest neighbor. From reading the forum post, it seems that up-scaling is the real issue here. I suggest looking at the Detail-Preserving Upscale effect in After Effects. It does a really good job and gives you some parameters to tweak to fit your specific content.

Votes

Translate

Translate
68 Comments
LEGEND ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

That forum post hurt to read

Votes

Translate

Translate

Report

Report
Engaged ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

Apparently, there is a Premiere plugin that will do this. I haven't tried it yet, but I hear that although it has Nearest Neighbor, it is very slow to work. https://aescripts.com/gpuresize/
I'd still very strongly prefer to get this in vanilla Premiere.

Votes

Translate

Translate

Report

Report
Participant ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

This is a simple idea but really important for a lot of editors.

Votes

Translate

Translate

Report

Report
Explorer ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

Crazy that premiere doesn't have this. They should either implement nearest neighbor, or give the option to disable interpolation altogether!

Votes

Translate

Translate

Report

Report
Engaged ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

IMPORTANT:
Additionally, a hybrid of Nearest Neighbor and Bilinear would also be very useful.
I made a video just to explain how it works:
https://www.youtube.com/watch?v=fKV1JFE0_Nk&feature=youtu.be
And here's a screenshot that makes it very clear:
https://i.imgur.com/Zu8aXBS.png

Votes

Translate

Translate

Report

Report
LEGEND ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

Yes

Votes

Translate

Translate

Report

Report
Engaged ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

@Francis Crossman
Thank you for reading and responding to this feature request, but, with all due respect, you don't understand what we're asking for.
Detail-Preserving Upscale does NOT solve the problem of preserving sharp pixel edges. I've created another comparison to prove it to you.
This is an extreme example, but the differences between Nearest Neighbor and Lanczos are still noticeable even at 200% and 300%. I can upload more comparisons if you would like.
I've also uploaded the original sprite so that you can try it yourself. On a 1080p timeline, scale link_sprite.gif to 4000% and you will see the same result.

Votes

Translate

Translate

Report

Report
Engaged ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

@Francis Crossman
I've created a comparison of several up-scaling methods for you to look at. (all upscale comparisons.png)
As you can see, only Nearest Neighbor provides the desired result with sharp pixel edges - all other methods, including detail-preserving upscale, are blurry.
Here's a direct link to the sprite so that you can try it yourself:
https://i.imgur.com/Mdnm5lr.gif
Put this into a 1080p Premiere sequence and up-scale it to 3000%, and you will see the same blurry result.

(Note: If you open it in Photoshop and zoom in, it WILL retain its sharp pixel edges, because Photoshop's canvas (correctly) uses Nearest Neighbor for that.)

Votes

Translate

Translate

Report

Report
LEGEND ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

Hi there,
Couldn't you use GPU Resize https://aescripts.com/gpuresize/ ?
Cheers
Antoine

Votes

Translate

Translate

Report

Report
LEGEND ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

"which generally yields better results"

better is relative to what you want to scale

Votes

Translate

Translate

Report

Report
LEGEND ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

Any thoughts on RedGiant's Instant4K vs. PPro's basic upscale? I think the 4K is a pinch better because you can adjust a few settings, but, it's a plugin and not processed by the gpu, so it adds time to an export. It's always something with this software. Any thoughts would be highly appreciated. I'm wondering if PPro is better, but there doesn't seem to be any tests or data on the issue other than 'salesman' pitches online. I wish there was a 3rd party test on those 2.

Votes

Translate

Translate

Report

Report
Engaged ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

@antoinellorca
https://twitter.com/TaranVH/status/1112874478952800256
GPUresize sucks for Premiere. If you just want 200% or 300% nearest neighbor upscale, you have to calculate the exact Width and Height dimensions manually. And if it goes beyond the frame edges, the X and Y position is offset.
Also, there's an arbitrary limit (8192) to how far I can upscale using nearest neighbor. So there are 3 things wrong with this implementation.
...
It's also very slow to render, which it shouldn't be, as nearest neighbor is the most basic, least processor-intensive scaling method, when done properly.
...
Currently (Aug 2019) linking to an AE composition that uses "draft" mode is still the best/easiest method for getting nearest neighbor into Premiere.

Votes

Translate

Translate

Report

Report
Engaged ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
LEGEND ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

Thanks for the info Taran. Is it slower because Effects cannot use the GPU inside PPro ?

Votes

Translate

Translate

Report

Report
Community Beginner ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

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!

Votes

Translate

Translate

Report

Report
Engaged ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

@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

Votes

Translate

Translate

Report

Report
Community Beginner ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

@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 🙂

Votes

Translate

Translate

Report

Report
Engaged ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

@phil 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!

Votes

Translate

Translate

Report

Report
Community Beginner ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

@TaranVH That is true and speeds up my workflow at least a little bit until this gets implemented *nudge nudge* 😉

Votes

Translate

Translate

Report

Report
Engaged ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community Beginner ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

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 🙂

Votes

Translate

Translate

Report

Report
Explorer ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
New Here ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

Nearest neighbor video upscale for retro gaming (nes snes genesis ps1 atari gameboy ds etc)

ive been using premier pro for 10 years and it would be a nice feature to have select able upscaling option next to the standard video scale controls. right now premier only does bicubic scaling. nearest neighbor would allow any 2d sprite based game to to be pixel perfect instead of blurry. ive tried paid for 3rd party software plug ins but it just doesn't work. so having this feature naively would be really useful for any one making videos with old video game footage captured via emulator window. or just simply wanting to keep the pixels sharp for some project.

Votes

Translate

Translate

Report

Report
New Here ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

@antoinellorca Autokroma that plugin is useless. i own it. it crashes constantly when in use.

Votes

Translate

Translate

Report

Report
New Here ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

Watch this video adobe. Lots of persuasive reasons to add this!
https://www.youtube.com/watch?v=bUCc5NGEthA

Votes

Translate

Translate

Report

Report