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

Pixel art edges become jagged when rotated with nearest-neighbor interpolation

Community Beginner ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

While trying to rotate an image with Nearest-Neighbor interpolation at a 45 degree angle, the edges become overly jagged and not in a straight line.

 

When rotating the image, the preview shows the way I want the image to be, however, when I apply the changes, the edges become overly jagged and distorted. 

 

Is there any fix to this?

 

Examples are shown below.

 

Before rotation

imalreadyt76204691_0-1625807172969.png

Preview (Ideal)

imalreadyt76204691_1-1625807225564.png

After applying

imalreadyt76204691_2-1625807242682.png

 

Views

1.6K

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
Adobe
Community Expert ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

Go into Preferences > General and try Bicubic Automatic:

Screen Shot 2021-07-08 at 10.48.03 PM.png

Votes

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
Community Beginner ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

I want sharp edges, similar to nearest neighbor interpolation, just without the overly jagged edges shown. Bicubic Automatic tends to not have sharp edges and have miscolored pixels, as shown below. 

 

Screenshot_5.png

Votes

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
Community Expert ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

I'm assuming that you have a reason to use Nearest Neighbour. Maybe you are producing pixel art for your project?

So my idea was to rotate the rectangle with Bicubic Automatic which will use anti aliasing to soften the edge, and then use levels or Threshold to remove the aa and see if that produces a less ugly edge.  However, things got a bit weired on me.

 

AFAICT your rectangle is 60 pixels long and full white.  Rotating the white rectangle -45° looks like this.  I have turned off the pixel grid, and the zoom ration is 1200%.  There is obvious aa so I should be able to harden up the edge.

image.png

 

The same thing against a black background shows the aa as looking darker, so I'm guessing those pixels are still at, or close to, 255,255,255 but with reduced opacity.  This gave me a problem.

image.png

 

Threshold set all the way up to 255 had no effect on the white rectangle, because the aa pixels must already have been at 255,255,255 but with the afore mentioned reduced opacity.  Bummer!

 

image.png

Giving a Levels adjustment layer the entire canvas to work on did kill the aa

image.png

But if you clipped it to the white rectangle, you are back where you started from

image.png

 

So no help to you, but I enjoyed tracking down what was initially a bit of a mystery to me. I wonder if we can be of more help if you tell us why you needed to Nearest Neighbour?  Is it some sort of pixel art?  We do still get questions about pixel art so it must still be a thing.

Votes

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
Community Beginner ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

Interesting, yeah its for a largescale pixel art project. The pixel art I am creating must fit into a specific color pallete for it to work in the way I want it to. This is one of the reasons I don't want to use other antialiasing methods (along with thinking nearest neighbor looks better while working with pixel art in general)

Votes

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
Explorer ,
May 26, 2023 May 26, 2023

Copy link to clipboard

Copied

LATEST

Can someone from adobe explain why this is happening? Gimp is able to do this transforation as expected.

Votes

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