How to get nearest neighbor/billinear HYBRID scaling in AE - and why we need it!

34,353
0
2019-04-16に共有
On the one hand, this is super nerdy and niche.
On the other hand, it seems like all major NLEs should have already had this ages ago.
Update: Apparently, this is usually called "sharp bilinear."
AEP file: www.dropbox.com/s/27aumftdqa2akg9/NEAREST%20NEIGHB…
Image it references: www.dropbox.com/s/aog7iql4nwq225g/correct%20res%20…
Another image: www.dropbox.com/s/oq5r610e4k7c5f6/Perfect%20100%20…
Taran's massive list of feature requests and bug reports for creative software:
docs.google.com/spreadsheets/d/1dVJb7kI_ZETLavrplf…

コメント (20)
  • So sharp-billinear? This technique is fairly common in pixel-art titles. Sonic Mania is a prime example.
  • @Camhin1
    Linus is so lucky to have you as an editor!
  • Why do I wander down these rabbitholes. Macros, Color, Scaling. Obsession.
  • Taran you must be such a headache for the adobe developers lol.
  • I don't understand or going to use this but there is just something so interesting about whatever Taren talks about!!
  • Taran is slowly becoming the Louis Russman of Adobe products
  • found my way here from that (super frustrating) Adobe forum thread -- thanks so much for this, Taran!
  • @hlfan
    Your "fancy math" breaks under 100 percent/shouldn't you scale down bilinear? If you do the following: slider = SLIDER /100; deduct = 100*Math.ceil(slider); answer = 100*slider/Math.ceil(slider); …it works with a slider in percent and avoids the infinite values under 100
  • This is actually perfect. Not just for video editing, but also non-integer stretching on emulators, so the screen can be 4:3 without it looking distorted.
  • @simplywhy
    Taran you're a life saver for all, I've learnt so much from you. Thanks a lot, you're the best.
  • @Akselmoi
    I'm not video editor but this is still really fascinating.
  • @simplywhy
    Linus should give you a raise for making the vids more awesome looking.
  • @EposVox
    TIL After Effects has Nearest Neighbor at all... I don't know AE well.
  • You bring me information that I didn't know I wanted and every time I am so happy I clicked on your video! Thanks!
  • @jared2b
    I always enjoy Tarans' random videos they teach me something and they are a welcome surprise.
  • I am happy to there somebody thinking seriously and create great solutions about this hard problems who isn't a developer.
  • this is my version, if you want the aep then let me know Bilinear scale: var scale = thisComp.layer("Control").effect("Scale")("Slider"); var nearest_scale = comp("Nearest Neighbor").layer("Image").transform.scale[0]; var altered_scale; if (scale <= 100) altered_scale = scale; else altered_scale = (((scale-nearest_scale)/nearest_scale)*100)+100; [altered_scale, altered_scale] Nearest neighbor scale: var scale = comp("Bilinear").layer("Control").effect("Scale")("Slider"); var altered_scale; if (scale <= 100) altered_scale = 100; else altered_scale = scale - (scale % 100); [altered_scale, altered_scale] both scale variables just lead to a slider control, hope this helps. also bare in mind that i might not be the best programmer in the world and this probably isn't perfect, feel free to tell me if anythings wrong.