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

Selection Maths in Affinity Photo - how is it done


Recommended Posts

46 minutes ago, >|< said:

The selection addition, subtraction and intersection operations are clearly not Boolean.

But it is. As I mentioned, a "marching ants" selection is independent of any layer. It just defines an area of the document, not what is in it. It is easy to see this: just create a new, empty document with a transparent background. Use any of the selection tools to create a selection. Every part of the document is either within the selection or it is not. These are the only two possibilities; thus the boolean nature of the operations.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

As I understand, Marching ants are shown for pixels that have 50% or more of luminosity value which means 128 to 255 or 0.5 to1.0.
But the calculations are done on the actual luminosity value of the pixel. Assuming a layer with all pixels having value less than 128,
no marching ant will be seen when we CNTRL+SHIFT+Left click but if you look at the pixel selection icon in channels, you can see
pixels are selected. If you then click and create a mask, this selection will come into the mask even though marching ants was never
shown. In PS , GIMP also, marching ants work the same way and PS gives a warning display when there are no pixels more than 50%
in the selection.

Link to comment
Share on other sites

54 minutes ago, >|< said:

You are confused and appear to have dreamt up your own definition of Boolean which conflicts with the rest of the world's definition. Well done.

Then what is your explanation for the test I suggested? There are no pixels, no layers, no anything besides a marching ants selection border. There are no values produced by these operations other than within or not within that border -- just two possible values, which is fully & completely consistent with this world's definition of boolean two value true or false logic.

44 minutes ago, unni said:

As I understand, Marching ants are shown for pixels that have 50% or more of luminosity value which means 128 to 255 or 0.5 to1.0.

You are describing one method for creating a selection. But as I have mentioned many times now, that selection is completely independent of any layer, including whatever pixel layer(s) have pixels with any luminosity value. If you do not believe this, make a selection by any method you want, & then delete all the layers of the document. The marching ants selection will still be there.

If that doesn't convince you, try making a selection with any of the provided selection tools on a layer containing something made with the built-in shape tools, the Pen Tool, or the Text tools. All those selection tools will completely ignore the contents of that layer, & any other layer containing the same types of objects because they are not pixel-based. The only method that selects the pixel boundary of those objects is the previously mentioned keyboard shortcut on the Layers panel, but the only thing you can do with that selection is to apply it to one or more pixel-based layers. It is neither destroyed or modified by doing that -- it remains a boolean, within or not within the boundary selection, independent of the luminosity values of any layer.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Just now, >|< said:

However, the marching ants are really boundaries between regions that are less than 50% selected and regions that are 50% or greater selected.

Nope. The marching ants define the boundary between regions that are selected & those that are not, period. There are no areas that are fractionally or partially selected. When you use feathering to modify a selection, it is still the effect on the pixels of those regions that changes, not the selection itself, and there will be no effect at all on resolution-independent objects unless they are rasterized, because otherwise they are not pixel-based.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

7 minutes ago, >|< said:

It seems that you are failing to appreciate that a pixel selection is itself composed of pixels and each pixel has a value from a range that is not limited to "fully selected" or "fully unselected".

Try this: create a document that has no pixel layers, just text & shape object layers, & maybe a placed image layer or two. Make your selection using whatever method you want, enclosing only a part of one or more of those layers. Next, apply as much feathering as you want to the selection & then select any of those non-pixel layers & try to erase just the selected & feathered part of the selected layer. If the selection really is not limited to fully selected, that should work, right? But as I am sure you already know, it does not work -- the entire layer is deleted.

What does that tell you about the nature of pixel-based selections, feathered or not?

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

3 minutes ago, >|< said:

Confused nonsense!

Nope. Like it or not it accurately & completely describes the way these operations work in the Affinity apps. The confusion is about what a marching ants selection actually is, the various methods that can be used to create them, & the effects they can have on the different types of layers the Affinity apps support.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

2 minutes ago, >|< said:

It tells me that the app is programmed to delete an object-selected non-Pixel object when the delete command is issued, regardless of whether there happens to be an active pixel selection.

Please read more carefully. I did not ask you to delete anything, just erase a part of a non-pixel object.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

2 minutes ago, >|< said:

LOL. Dream on. Maybe one of the developers of AP will try to help you see the errors in your ideas.

They are not just my ideas. They are what I have learned from actually using the selection tools, & from reading the Creating pixel selections help topic & the relevant sections of the Affinity Photo Workbook. Nowhere does any of this suggest marching ants selections apply to anything besides pixel-based layers or that the pixels can be "partially" selected. They are either selected or they are not, period, end of story.

I am not going to argue with you about this anymore. The underlying math clearly is boolean, with just one of two possible values for each selected pixel.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

11 hours ago, John Rostron said:

It would seem to me that you should be able to apply boolean operations to monochrome masks. Is that what you are trying to do?

None of the recent postings, including the OP has responded to this question. Masks can have various shades of grey and can be manipulated by the formulae described by @unni above. Selections are more abstract and cannot be manipulated in the same way.

I would like to see a response from one of the devs for Serif's take on this.

John

Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

4 hours ago, >|< said:

It looks to me like you don't want to continue because you've suddenly realised that you have been misinterpreting the behaviour of the app and writing nonsense in this thread.

Nope. There are no "partially selected" pixels in a marching ants pixel selection, not even when the selection is feathered. If you think otherwise, so be it, but that is wrong.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

4 hours ago, >|< said:

In an 8 bpc document, each selection pixel can have one of 256 possible values.

But each pixel is either selected or it is not selected.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

32 minutes ago, R C-R said:

But each pixel is either selected or it is not selected.

If that were the case, cutting a feathered selection and choosing ‘New from Clipboard’ wouldn’t give you any pixels at the same relative positions in both documents, but it does — as it must do, since otherwise you would lose the feathering in the original document.

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

3 minutes ago, αℓƒяє∂ said:

If that were the case, cutting a feathered selection and choosing ‘New from Clipboard’ wouldn’t give you any pixels at the same relative positions in both documents, but it does — as it must do, since otherwise you would lose the feathering.

I don't understand what you mean by pixels at the same relative positions in both documents. Relative to what? When I do as you suggest, the new document is not the same size as the original, nor are any of its pixels at the same coordinates relative to the origin of the original.

But regardless of if feathering is applied to the selection or not, every pixel location on the canvas is either part of the selection or it is not. In fact, this is still true even if the canvas has no layers or no layer is selected because pixel selections are independent of any layer. Making a selection & doing something with it -- whether that is feathering, resizing, moving, adding to or subtracting from it, or whatever -- are two different things. That should be evident from the no layer examples.

Maybe an analogy will make this distinction clearer. Consider a sack of marbles of different sizes & types. A boy is told he can select any 5 of them to keep. It does not matter which of them is of what size or type, or what he intends to do with them afterwards. This selection process is a boolean one because there are only two possibilities -- a marble is either a selected one or it is not.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

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.