It is currently Thu Sep 03, 2026 9:28 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 18 posts ] 
Author Message
 Post subject: Selection Angles
PostPosted: Wed Nov 21, 2012 2:10 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2769
is there a way to get sharp angles when you grow or shrink a selection ?

when i followed EK22's Lightning Weave tutorial, i shrank the selection of my text, and then cut, to get the frame of text
i read here in GC, that Gimp paints around the selection, when it shrinks or grows and thats why corners end up rounded
Image

so what do i have to do, when i want the shrinked selection to be as sharply angled as the original text instead of being rounded?
scale a path ?


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: Selection Angles
PostPosted: Wed Nov 21, 2012 2:16 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Nov 15, 2012
Posts: 949
Location: Mesa, AZ
:shock: I don't rightly know. That is an interesting question. I come across this problem, not so much with these signatures because the scale is too small, but when I work on my space scenes and end up scaling large selections for planets.

_________________
Image

I now have a Tumblr, check it out!


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 2:36 am  (#3) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
Esper wrote:
is there a way to get sharp angles when you grow or shrink a selection ?

when i followed EK22's Lightning Weave tutorial, i shrank the selection of my text, and then cut, to get the frame of text
i read here in GC, that Gimp paints around the selection, when it shrinks or grows and thats why corners end up rounded
Image

so what do i have to do, when i want the shrinked selection to be as sharply angled as the original text instead of being rounded?
scale a path ?

Scaling is a multiplication, "growing" an addition... But the path may be a solution: grow the selection, convert to path, and use the path editor to add angles.

_________________
Image


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 5:18 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Aug 30, 2012
Posts: 2174
Had a bit of a play, tried three versions, the first is just the text with the selection shrunk by 5 px and then deleted.
The second version is the text selected then the selection converted to a path and then the path stroked by 10px with line style/joint style set to mitre, If you leave your text selection on then the stroke path will automatically get cropped to the size of your text. Ok results not sure what happened to the top of the P.
The third version was me just trying out the bevel edge.

Image

_________________
Image


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 5:57 am  (#5) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
You can scale selections using the Scale Transform Tool :scale and this will retain the shape of the original selection, however, when doing this one is presented with the problem of where to position the resulting selection. This is particularly problematic when the selection is oddly shaped or comprises multiple regions (such as with selections derived from text).

Here is a graphical example of this (the white region is the original selection and the red indicates the outline after scaling).
Attachment:
scale-sel.png
scale-sel.png [ 13.34 KiB | Viewed 2559 times ]


Even if you were to position each individual region relative to its source, you still have to consider whether the location should be aligned relative to the shapes' centers, bottoms, tops, or side. There is no "right" answer.

Nonetheless, if you are not considered about any alignment with the original selection then scaling would be a viable option.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 6:05 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Aug 30, 2012
Posts: 2174
The only problem with the scaling of the text to create an inner cut out as that is what I think esper is after would mean having to do each letter individually.

_________________
Image


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 9:19 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Nov 15, 2012
Posts: 949
Location: Mesa, AZ
Yeah, and since in this particular case, the scaling occurs only to make an inner shadow that will be blurred anyways, it doesn't matter if it's rounded or not.

I have had issues with scaling circle selections when making planetary rings. Part of the process is to scale up circle selections and remove rings from a circular gradient. After upscaling a few times, a flat section becomes apparent at each direction that is undesirable. I think the paths method would probably work well for that and next time I'm working on a planet, I'll give that a shot.

_________________
Image

I now have a Tumblr, check it out!


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 10:32 am  (#8) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
ek22 wrote:
I have had issues with scaling circle selections when making planetary rings. Part of the process is to scale up circle selections and remove rings from a circular gradient. After upscaling a few times, a flat section becomes apparent at each direction that is undesirable. I think the paths method would probably work well for that and next time I'm working on a planet, I'll give that a shot.

A good way to correct for this is, after growing your selection, clicking within the grown selection with the Elliptical Select Tool. This will cause the resizing handles to appear. Move the mouse to the top resizing bar and then press the cursor left key on your keyboard. This will result in a "new" elliptical selection that is the same size as the original, but with the distortions caused by growing eliminated. Click in the center of the selection (or press ENTER) to accept this corrected selection.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 11:42 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Aug 30, 2012
Posts: 2174
Saulgoode - Thanks that little tip, just tried it out and the change between the 2 circles was quite surprising.

_________________
Image


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 12:13 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2769
i tried to shrink the selection and then stroking the path and choosing the linestyle
unfortunately thats no improvement, because the moment you shrink the selection it gets rounded and stroking the shrink selection turned into a path with sharp angles makes no big difference

scaling a path by 8px seems to be different in comparison to shrinking a selection by 8pxs, so thats not the solution either

one think i noticed is, when using layerfx for making a bevel, Gimp suddenly can make sharp angles for a shrinked selection...but how does the script achieve that ?
Attachment:
shrink.png
shrink.png [ 50.49 KiB | Viewed 2512 times ]


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 12:40 pm  (#11) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Esper wrote:
one think i noticed is, when using layerfx for making a bevel, Gimp suddenly can make sharp angles for a shrinked selection...but how does the script achieve that ?

When you shrink a selection, the sharpness of "outer angles" is retained but "inner angles" become rounded. When you grow a selection, the sharpness of "inner angles" is retained but "outer angles" become rounded.
Attachment:
SSsel-sg.png
SSsel-sg.png [ 13.57 KiB | Viewed 2518 times ]

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 1:20 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: Apr 07, 2010
Posts: 14182
Jeepers Saul, how do you know all that stuff. I wish I knew a quarter of it. :teeth

_________________
Image


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 1:42 pm  (#13) 
Offline
Script Coder
User avatar

Joined: Nov 06, 2012
Posts: 239
Location: Italy
Hi Esper. A possible way to achieve the result you want is to use repeatedly the "Erode" command (Filters->Generic->Erode).

Pratically, once you have created the selection, you must activate the QuickMask by clicking the special button placed in the lower left corner of the image window (or simply with Shift + Q), then run the "Erode" filter as many times as necessary to get the desired amount of shrinking; lastly, turn off the QuickMask in the same way you enabled it (Shift + Q), and you will eventually obtain a clipped version of the original selection without the unwanted rounded angles that the "Shrink" command inevitably produces.

The method may also be used for the opposite purpose, namely for enlarging a selection without getting rounded angles, with the difference that in such case you have to use the "Dilate" filter instead of the "Erode" one.

_________________
Gino D's GIMP scripts: https://sites.google.com/site/ginodonig/gimp-scripts


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 4:49 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2769
thanks Gino D !

interesting technique, i never used that filter before - it works but its not perfect
Attachment:
erode.png
erode.png [ 19.29 KiB | Viewed 2494 times ]


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 7:35 pm  (#15) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
molly wrote:
Jeepers Saul, how do you know all that stuff. I wish I knew a quarter of it. :teeth

I have contributed very little to GIMP development, but back around GIMP 2.2 I provided a patch to the "Select->Border" command that permits unfeathered borders (used to be that the Border dialog did not have a "Feather Border" checkbox; borders were always feathered). It took quite a bit of studying of the code for me to figure out what was going on (the code is actually quite ingenious) and that bordering process is closely related to the grow/shrink algorithm.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Selection Angles
PostPosted: Wed Nov 21, 2012 11:51 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Aug 30, 2012
Posts: 2174
Thanks GinaD,

This has certainly been an interesting thread, curious though because the erode filter is in the same section as the convolution matrix but my research has found nothing but is there some value you could enter into the matrix to shrink the image.

_________________
Image


Top
 Post subject: Re: Selection Angles
PostPosted: Thu Nov 22, 2012 12:40 am  (#17) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
he4rty wrote:
... is there some value you could enter into the matrix to shrink the image.

I don't think so. If I understand things correctly, dilation would require that the maximum value in the region covered by the kernel is used to produce the result; the convolution matrix only permits fixed scale factors.

I would recommend using "Filters->Distorts->Value propagate" to gain greater flexibility and finer control when dilating and eroding layers.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Selection Angles
PostPosted: Thu Nov 22, 2012 1:06 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Aug 30, 2012
Posts: 2174
Never having played with the matrix before its a very steep learning curve, If I get the E of esper looking good the S looks to flat on the curves, When I get the S looking ok I end up with A slight bevel on the Inside edges of E.

Image

_________________
Image


Top
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group