Post Reply 

Gradient - Blend Along a Rounded Corner?

Jan 24, 2012, 12:42 (This post was last modified: Jan 24, 2012 13:04 by Fretman.)
Post: #1
Gradient - Blend Along a Rounded Corner?
I'm trying to make a rounded-corner box with a gradient-style border. Obviously, the straight sides of the box are easy to create the effect for, but not so the rounded-corners.

How to I get the gradient to follow the curve - to blend from the curved edge - rather than just giving me a linear gradient as if I was doing it from a rectangular corner?

I tried some other gradient types, there didn't seem to be anything that did the trick.

I'll try to attach a quick test file, if it lets me, to illustrate what I'm talking about. Note how the gradient cuts out diagonally across the rounded corner rather than curving and following the corner around.

Or is there a different way to create this kind of border?

Attached File(s) Thumbnail(s)
Find all posts by this user
Quote this message in a reply
Jan 24, 2012, 16:32 (This post was last modified: Jan 24, 2012 16:32 by Fretman.)
Post: #2
RE: Gradient - Blend Along a Rounded Corner?
(Jan 24, 2012 14:19)ofnuts Wrote:  That's what the "dimpled" gradient is for. It stretches the gradient from the border of t e selection to the center. This may require to use a gradient which is uniform on most of its range.

The other solution is to use my "Wrapmap" filter

The dimpled gradient didn't do it right (first attachment). I found I can get the effect by selecting a smaller rounded rectangle inside the larger one, feathering it then deleting it (second attachment). This leads me to another beginner question I have: how do I scale down a selection evenly... and position it perfectly in the center?

Thanks for your Wrapmap link, looks like that could be useful.

Attached File(s) Image(s)
Find all posts by this user
Quote this message in a reply
Jan 29, 2012, 11:38
Post: #3
RE: Gradient - Blend Along a Rounded Corner?
(Jan 25, 2012 11:58)ofnuts Wrote:  Come to think of it, in many cases there is a solution that doesn't involve a specially designed gradient. When you use a plain black-to-white gradient, the pixel RGB values are a direct function of the position of the pixel. The "Levels" and, more graphically, the "Curves" tool are merely establishing a mapping from input value to output values. Since the gradient is mapping position to values, applying gradient then curve lets you map positions to arbitrary values. For instance to make a double border inside an arbitrary shape:

Don't really understand any of that, hehe. Thanks anyway. Looks like I have a lot to learn.
Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  how to blend straight edges into background?? kshaeblue21 1 295 Aug 11, 2017 03:30
Last Post: ythgilb
  [SOLVED]Weighted Blend in GEGL library mIXpRo 2 312 Oct 6, 2014 07:47
Last Post: mIXpRo
  Twitter logo on top of outline of Africa with color gradient tommycarstensen 0 569 Jun 22, 2014 23:13
Last Post: tommycarstensen
Information Gradient Text Looks Sharp Softly 0 312 May 19, 2014 05:04
Last Post: Softly
  How to fill a ractangle area with a gradient that fits it Darker 1 501 Apr 12, 2014 14:25
Last Post: ferren

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS