Jump to content
You must now use your email address to sign in [click for more info] ×

Understanding Pixel Alignment, resample methods and effect on sharpness / blurriness


Recommended Posts

23 minutes ago, paolo.limoncelli said:

Yes I well know... We've been using AD since 2014... 😜

It also creates problems with slices' dimensions in Export Persona.

This is a long term glitch, and could be fixed to snap back to the closest integer (if the Force Pixel Alignment is ON), but could be very demanding for CPUs maybe? I guess switching complex vector art stuff could be tricky... Today I'm accustomed to the scroll-wheel over the input field to fix if weird things happen.

 

I was reading through the thread earlier and I read your response like the Move By Whole Pixels setting helps moving objects onto the grid, when it actually keeps them off.

So I felt like clarifying for anyone else who might missunderstand the setting at first like I did.

The scrollwheel trick is nifty! Thank you for sharing! Will make good use of that one :^)

Link to comment
Share on other sites

I should have better clarified... Sorry.

Force Pixel Alignment and Move By Whole Pixels are both very needed if you start a project with pixel perfect requirements.

This means that you are "creating" something from scratch: blank canvas, start drawing stuff...

Obviously if you turn MBWP ON when your starting project is not pixel perfect, it will retain the non pixel perfect alignment...

As you correctly said, it could make things even worse.

 

The white dog, making tools for artists, illustrators and doodlers

Link to comment
Share on other sites

@NotMyFault Thanks for this tutorial.

I have a few questions and would appreciate some guidance. I don't normally create small UI elements or icons in Photo (v.2.4.0 at present). I wasn't sure if your tutorial was aimed primarily at that type of work, or was also appropriate for general work. I occasionally use a grid, but not that often (usually only when constructing things that I want to be quite accurate).

Most of my AfPhoto work originates with RAW camera images, but I do sometimes add vector art and lines from Designer (or using the pen tool in AP) and do some compositing, often with imported images or new pixel layers, etc. I don't want to introduce blurriness or softness unintentionally. Also, I want to avoid clear areas along edges of images when exporting.

For general use...

1. Would you still advise setting the Pixel Decimal Places for Unit Types to a high value like "6" in Preferences for this type of work?

2. Should Force Pixel Alignment be left on most or all of the time?

3. Should Move by Whole Pixels normally be disabled?

4. What about Snapping options? Should snap to grid only be enabled when absolutely needed?

Any other guidance is also welcome. 

Thanks!

 

2017 15" MacBook Pro, 16 MB RAM, Ventura v13.6.6, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish

Link to comment
Share on other sites

22 hours ago, paolo.limoncelli said:

Force Pixel Alignment and Move By Whole Pixels are both very needed if you start a project with pixel perfect requirements.

If ‘Force Pixel Alignment’ is doing its job, why would you also need ‘Move By Whole Pixels’?

My problem has always been that in Preferences the option to ‘Move By Whole Pixels’ (MWP) is presented as a child of ‘Force Pixel Alignment’ (FPA), which means you can only change it when the parent option is enabled. I’ve never understood the logic behind MWP overriding FPA.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

13 minutes ago, Alfred said:

If ‘Force Pixel Alignment’ is doing its job, why would you also need ‘Move By Whole Pixels’?

It seems to me that the two options should be separate and mutually exclusive. If an object is already aligned to the pixel grid, either setting will ensure that it’s still aligned when you move it, otherwise it will become aligned (with FPA) or remain unaligned (with MWP).

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

Posted (edited)
1 hour ago, Ldina said:

1. Would you still advise setting the Pixel Decimal Places for Unit Types to a high value like "6" in Preferences for this type of work?

2. Should Force Pixel Alignment be left on most or all of the time?

3. Should Move by Whole Pixels normally be disabled?

4. What about Snapping options? Should snap to grid only be enabled when absolutely needed?

Any other guidance is also welcome. 

Hi @Ldina

1: yes. Once set it can stay and does no harm

2: depends on type of workflow. Generally yes. 
3: yes, disable it. There are very few exceptions where this may help. 
4: only activate those snapping options which you actually need and fully understand. Having unneeded options active can lead to unexpected wrong snapping, as options have a defined priority which is not well documented. E.g. snap by whole pixels overrules other snapping options, leading to snapping is impossible or getting bound to wrong candidate.

Edited by NotMyFault
Clarity

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

3 minutes ago, NotMyFault said:

3: no. There are very few exceptions where this may help

Thanks. I assume you meant that Move by Whole Pixels should normally be turned OFF for general workflows.

2017 15" MacBook Pro, 16 MB RAM, Ventura v13.6.6, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish

Link to comment
Share on other sites

1 hour ago, Alfred said:

My problem has always been that in Preferences the option to ‘Move By Whole Pixels’ (MWP) is presented as a child of ‘Force Pixel Alignment’ (FPA), which means you can only change it when the parent option is enabled. I’ve never understood the logic behind MWP overriding FPA.

The use case is still pixel perfect design, I know it could sound strange but sometimes you have to deal with non pixel perfect alignment too...

If you set Force Pixel Alignment for new assets, you could need MBWP off to fix optical alignment or find a different anti-alias rendering for stuff which is off-grid by design. This is the case o certain fonts and logos, whereas pixel perfect is not possible and a trade off is needed.

By Pixel Perfect design I do not mean pixel art, but mainly UI design for OEM.

 

 

The white dog, making tools for artists, illustrators and doodlers

Link to comment
Share on other sites

13 minutes ago, paolo.limoncelli said:

If you set Force Pixel Alignment for new assets, you could need MBWP off …

If you set FPA on, you usually will want MWP off, won’t you? If you need MWP enabled for any reason, you can simply switch it on for as long as it’s needed.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

  • Staff

Move By Whole pixels and why it's used in a context of a pixel perfect context/project was discussed various times before (1 , 2).
As other subjects It easy to understand when you have to deal with the problem in practise but it may sound vague in theory.
 

10 minutes ago, Alfred said:

If you set FPA on, you usually will want MWP off, won’t you? If you need MWP enabled for any reason, you can simply switch it on for as long as it’s needed.

Can you point out a specific use case where you want Move By Whole Pixels turned on and Force Pixel Alignment turned off? Move By Whole Pixels is intended to be used when you explicit need to place certain pixels off the pixel grid in a pixel perfect project.

Link to comment
Share on other sites

5 minutes ago, MEB said:

Move By Whole pixels and why it's used in a context of a pixel perfect context/project was discussed various times before.

I understand why it’s used in certain contexts, but I still don’t understand why it ever takes precedence over ‘Force Pixel Alignment’ (especially given that it’s presented under Preferences as a child of, and therefore dependent on, FPA).

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

6 minutes ago, MEB said:

Can you point out a specific use case where you need Move By Whole Pixels enabled and Force Pixel alignment disabled?

A horizontal or vertical line with 1px stroke width needs to be aligned to .5 fractional position. Once you placed it aligned to 1/2px, you need MBWP to keep it correctly aligned while moving it around.

 

 

 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Having only 3 states (radio buttons) would be much clearer and avoid any uncertainty:

  • none active
  • only FPA
  • only MBWP

Current FPA+MBWP opens the question which one takes priority and causes confusion.

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

  • Staff
26 minutes ago, NotMyFault said:

A horizontal or vertical line with 1px stroke width needs to be aligned to .5 fractional position. Once you placed it aligned to 1/2px, you need MBWP to keep it correctly aligned while moving it around.

That's is correct but does not answer the question, it just describes the use of the function.I meant generally speaking In which context/project types you need to move and keep a line mis-aligned on purpose with the pixel grid? It certainly is irrelevant if you are painting/drawing an illustration for example (unless it's a small pixel based illustration - a small icon or bitmap character for a game etc).

Link to comment
Share on other sites

1 hour ago, NotMyFault said:

A horizontal or vertical line with 1px stroke width needs to be aligned to .5 fractional position. Once you placed it aligned to 1/2px, you need MBWP to keep it correctly aligned while moving it around.

Sorry, but this is not a real scenario... Or maybe I misunderstood...  🤔

It is impossible to reproduce/visualise it correctly with non sub-pixel screen (high density)... That line will be blurred.

If you accept it blurred the pixel alignment is not a requirement, so no need to enable these options.

 

The white dog, making tools for artists, illustrators and doodlers

Link to comment
Share on other sites

1 hour ago, paolo.limoncelli said:

this is not a real scenario

This is exactly the real scenario.
Any centered odd stroke width – 1 px, 3 px, 5 px, 7 px, etc. – positioned at a right angle needs to be aligned to n.5 px at the absolute pixel grid to avoid antialiasing.
Except for closed shapes where we also can align a stroke either inside or outside the shape.

MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2

Link to comment
Share on other sites

The use case you've described needs sub-pixel snapping...  And you're no more in a "real" pixel scenario... 🙃

Turning off and using a classic grid snapping works best in this case.

I personally always avoid "open" vector lines, it is not a good design strategy for pixel perfect requirements, rounding errors are there and it takes time to double check stuff... No matter which APP are you using.

 

 

 

The white dog, making tools for artists, illustrators and doodlers

Link to comment
Share on other sites

5 hours ago, MEB said:

That's is correct but does not answer the question, it just describes the use of the function.I meant generally speaking In which context/project types you need to move and keep a line mis-aligned on purpose with the pixel grid? It certainly is irrelevant if you are painting/drawing an illustration for example (unless it's a small pixel based illustration - a small icon or bitmap character for a game etc).

I have no clue why MBHP exists. Users in general face 3 issues and need better support from Affinity apps:

  1. Avoid mis-alignment happens in the beginning
  2. Detect if mis-alignment has occurred (unintentionally, often unnoticed until orbits too late)
  3. Correct mis-alignment if possible.

FPA helps to a certain degree. MBHP is superfluous if Affinity would offer 1/2 pixel alignments as new option.

of course, other functions are required, too:

  1. a pure pixel art mode. Rejects any operation leading to misalignment, or gives a warning / approval request
  2. support to pixel art resize and rasterize for layers within a document (not the document with all layers)
  3. support to create pixel art lines (e.g. resample mode like  nearest neighbor per layer setting)
  4. Merge down including resample of lower 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.