It is currently Sat Jul 06, 2024 8:55 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: [SOLVED] stop feathering/anti-aliasing on gray heightmaps
PostPosted: Fri Oct 28, 2022 8:57 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
GIMP Version: M
Operating System: Linux
GIMP Experience: Experienced User



I use GIMP to create heightmaps where white is "top" and black is "bottom" and "in-betweens" are grays.

What's happening--you experts will recognize--is that when I delete the pixels in a selection, pixels on the edge of what remains are replaced by a mix of pixels to maintain, I suppose, some sort of "visual" perception--to reduce the detection of "jaggies" I seem to recall from early computer graphics days.

These sorts of pixels play havoc with the image's destiny as a heightmap.

For my purposes, I want to delete pixels on one side of a selection and leave pixels on the other side unaltered.

I've noticed it before and have been somehow able to come up with a Ptolemaic way or another to remove the artifacts, but I just redd that a "selection" (marching ants) is not really a hard edge but the path through the middle of (something important I forgot: no, I remember now) "pixels that are half-selected," where pixels "in" the selection are connoted by "white" (in a selection representation somewhere) and those "outside" the selection as black, or v.v.

I've also seen a reference that says the "QuickMask" tool might be the answer, but the grayscale nature of my images make its highlighted "red-now-gray" area of the QM difficult to detect. Furthermore, I cannot figure out how to paint out the pixels I want to delete with black. "Selection tools" do not all seem to work the normal way in the QuickMask.

I gleaned the essentials of QM from this tutorial; namely, that:
One makes a selection in an image and then clicks on the red-bordered QuickMask icon in the lower-left corner of your image.
A translucent red mask will appear around the selection, representing the outside of the selection.
When the dashed QuickMask button is pressed again to go back into normal selection mode, anything red will not be selected, and anything clear will be.
While the mask is active [you can see it listed, and visible by default, in the Channels tab], GIMP operates on the mask.

The documentation says:
In QuickMask mode, the selection is shown as a translucent screen overlying the image, whose transparency at each pixel indicates the degree to which that pixel is selected. By default the mask is shown in red, but you can change this if another mask color is more convenient. The less a pixel is selected, the more it is obscured by the mask. Fully selected pixels are shown completely clear.
In QuickMask mode, many image manipulations act on the selection channel rather than the image itself. This includes, in particular, paint tools. Painting with white selects pixels, and painting with black unselects pixels. You can use any of the paint tools, as well as the bucket fill and gradient fill tools, in this way. Advanced users of GIMP learn that “painting the selection” is the easiest and most effective way to delicately manipulate the image.

As an example, I want to select a circle in an overlying all-white layer to frame what is beneath, while leaving all the edge pixels of the layer white, and not sprinkled with shades of gray.

If I do it by selecting a circle and then deleting the selection, as I said it replaces some edge pixels with gray values.

In QuickMask, I tried to Select a circle I want to delete, invert the selection to have the QM be the circle itself, and then bucket-fill that circular mask with black. I expect then when I go disable the quick mask, the layer acted upon will have no pixels (or transparent I guess) in the circle, and the edges will be unchanged. QuickMask does not permit painting the non-QM area.

(And now I'm thinking I should try it with a Plain Old Black and White Layer Mask. Indeed, this gives me what I want: On a toy white image, I mask out the center to black/transparent, and the outside stays white, even at the edge. EDIT: I spoke too soon; I went back to try it on my real-world image and the pixels did change.)

Earlier I had an idea that the behavior might arise from some Image setting, such as:
Image->Precision->PerceptualGamma
Image->ColorMgmt->Enable
or possibly in Edit->Preferences, say:
ColorMgmt->RenderingIntent [Perceptual, say, as against AbsoluteColorimetric]
but changing them, at least while in-picture, did not change the behavior I saw.

The question buried in there is:
Given my desire to work on heightmaps that will not have grayscales auto-adjusted by GIMP algorithms are there some settings I could make to get this?

Thank you.

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Last edited by gramp on Sat Oct 29, 2022 12:25 pm, edited 1 time in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Help stop feathering/anti-aliasing "helper" on gray heightmaps
PostPosted: Sat Oct 29, 2022 2:54 am  (#2) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
Select > Sharpen

_________________
Image


Top
 Post subject: Re: Help stop feathering/anti-aliasing "helper" on gray heightmaps
PostPosted: Sat Oct 29, 2022 5:04 am  (#3) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2439
Quote:
...snip..some sort of "visual" perception--to reduce the detection of "jaggies" ...For my purposes, I want to delete pixels on one side of a selection and leave pixels on the other side unaltered....


edit: oh well, that was a waste of time ;)

_________________
Image


Last edited by rich2005 on Sat Oct 29, 2022 6:23 am, edited 1 time in total.

Top
 Post subject: Re: Help stop feathering/anti-aliasing "helper" on gray heightmaps
PostPosted: Sat Oct 29, 2022 5:57 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
Rich,

If I do want anti-aliasing on one side and not the other, I can't recognize that I do. I want one side to be unaliased, and the other side to just go away, anti-aliased or not, :).

However if what you say is right, and I wanted both sides of something unaliased, my natural response would be to duplicate the layer and generate opposite unaliased sides on each before recombining.

Happily, at this point, I won't have to try to figure out if that will work--or even what I'm trying to say exactly--because Ofnut pointed out the answer in the documentation.

WHICH, apparently, I could have found by searching for "feather" or "anti-alias" in the documentation, rather than "quickmask".

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Post subject: Re: Help stop feathering/anti-aliasing "helper" on gray heightmaps
PostPosted: Sat Oct 29, 2022 6:07 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
ofnuts wrote:

Thank you. I'll post it here, because it, and its reference are both short:
4.10. Sharpen

The Sharpen command reduces the amount of blur or fuzziness around the edge of a selection. It reverses the effect of the Feather Selection command. The new edge of the selection follows the dotted line of the edge of the old selection. Anti-aliasing is also removed.
[Note] Note

Please do not confuse this command with the Sharpen (Unsharp Mask) filter.
4.10.1. Activating the Command

You can access this command from the image menubar through Select → Sharpen.


And the reference to "Feathering a Selection":
4.9. Feather

The Feather command feathers the edges of the selection. This creates a smooth transition between the selection and its surroundings. You normally feather selection borders with the “Feather Edges” option of the selection tools, but you may feather them again with this command.
4.9.1. Activating the Command

You can access this command from the image menubar through Select → Feather.


Following my usual perspicacity, very possibly (I don't have time to look it up), I had not observed a "Feathering" option for Selection. If there's still time, I'd like to learn more about the tool I use many times a week...

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Post subject: Re: Help stop feathering/anti-aliasing "helper" on gray heightmaps
PostPosted: Sat Oct 29, 2022 6:30 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
gramp wrote:
Following my usual perspicacity, very possibly (I don't have time to look it up), I had not observed a "Feathering" option for Selection. If there's still time, I'd like to learn more about the tool I use many times a week...


And there it is, right beneath a checkbox for "Antialiasing" which has always been enabled as a "Rectangle/Ellipse Selection" option, and which I had never paid attention too, although I have the Options tab open regularly for other things, fixing, centering, sizing, locating, etc. However, I'm noticing now that while I can enable and disable Feathering, which has been disabled, I cannot disable Antialiasing, which of course I now want to do but which is also grayed-out. [Oh. "Antialiasing is irrelevant for Rectangular Selections because it never crosses a pixel", so no aliasing. It has been reported as a bug that the option should be depicted in the Off state when it is grayed-out for this reason. In elliptical selections, Antialiasing is in fact toggle-able.]

So, for my purposes, I'll toggle it off and then Edit->Preferences:ToolOptions:SaveToolsNow. I'll likely be back in a few days to ask "Why do my selections suddenly not anti-alias anymore..." :eyeroll:

Thanks, folks.


Attachments:
RectSelectOptionsTab.png
RectSelectOptionsTab.png [ 33.77 KiB | Viewed 988 times ]

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."
Top
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Never stop...

1

No new posts Traffic stop

3

No new posts Attachment(s) G'MIC filters stop working part II - Error 203 on update

4

No new posts timer plug-in acts sort of like a stop watch w/wo TRACKING CODE

1



* Login  



Powered by phpBB3 © phpBB Group