Gimp-Forum.net
How to make a solid black bar fade out? - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: How to make a solid black bar fade out? (/Thread-How-to-make-a-solid-black-bar-fade-out)



How to make a solid black bar fade out? - R3XXY - 07-09-2021

HI everyone, I'm trying to make a solid black bar at the bottom of a layer to use as a backgrond for text. I'd like the black bar to fade out vertically, but I can't find a way to make a nice smooth fade. I've tried using the Graident tool but the fade out is much too sudden, not a nice gradual fade.

I want to then save that as a project so I can just add in new images and text.

Can anyone help?

TIA


RE: How to make a solid black bar fade out? - Erisian - 07-09-2021

Sometimes if I am using the gradient tool on a layer mask, I have to zoom out quite a way so I can begin and end the gradient well outside the image. This gives a smoother gradient. It is possible to create a new FG/BG gradient so that you can adjust how smoothly it changes but I am not too familiar with that method.


RE: How to make a solid black bar fade out? - rich2005 - 07-09-2021

Quote:.. I'm trying to make a solid black bar at the bottom of a layer to use as a backgrond for text. I'd like the black bar to fade out vertically, but I can't find a way to make a nice smooth fade.

" A nice smooth fade " There are some things that can occur. Apply a gradient to a grayscale image or an indexed image and 'banding' can be obvious.

Try and avoid those formats and if banding is still a problem promote the image to RGB 16 bit  Image -> Mode -> 16 bit  larger file size but more shades available.

Then the standard FG (black) to transparency gradient might need tweeking. You can add stops to break up the gradient and make it more customisable. 

Not easy to show banding, however this a short demo:  https://i.imgur.com/j0iSy5m.mp4 

and attached that gradient. Might / might not be useful. Easy to make your own. unzip put in C:\Users\"yourname"\AppData\Roaming\GIMP\2.10\gradients


RE: How to make a solid black bar fade out? - R3XXY - 07-10-2021

Most of that went over my head, I'm something of a noob, but thanks for the detailed reply. I will look into the things you suggested.


RE: How to make a solid black bar fade out? - rickk - 07-10-2021

(07-10-2021, 10:48 AM)R3XXY Wrote: Most of that went over my head, I'm something of a noob, but thanks for the detailed reply. I will look into the things you suggested.

I'm somewhat of a n00b, too.  One thing you might try is to create a second layer the size of your eventual black bar, and give it an alpha channel (layer>transparency>add_alpha_channel, in the menuing system)

Then with your bucket-fill tool in "erase" mode, make that smaller layer invisible.

With black set as your foreground color, select the gradient tool, and down in the "gradient tool options" click on the little gradient icon, and a menu should pop open. Select  "FG to Transparent" from that menu.

Then click and drag your cursor over the smaller invisible layer, from bottom to top (one click below, then one click above the smaller layer). The end points that are plotted are moveable. you can click the top dot, and move it farther away to "stretch out" the shading of the gradient. Same is true for the bottom dot.

You can also click on the line between the  two dots, to create additional control points that can be moved up or down to give you finer control over how the gradient is spread.

Once you get the gradient to your satisfaction, then put your text on the same smaller layer.

Then, once everything is to your liking, merge the smaller layer (having both the gradient and text on it) down onto the background layer that has your desired image on it.

The reason I prefer this method is because it allows you to stretch the gradient control tool beyond the boundaries of the smaller layer without affecting the main image.

Just make sure that you make the smaller layer completely transparent to start with, and use the "FG to transparent" mode in your gradient

Here is an example with somewhat unusual coloring, for emphasis

[Image: s8afIFZ.png]


RE: How to make a solid black bar fade out? - R3XXY - 07-10-2021

I should have been more specific in my intiial post, The gradient itself isn't a problem, it's how smoothly it fades into transparency, I don't want a definite line like in the example above.


RE: How to make a solid black bar fade out? - rickk - 07-10-2021

(07-10-2021, 08:50 PM)R3XXY Wrote: I should have been more specific in my intiial post, The gradient itself isn't a problem, it's how smoothly it fades into transparency, I don't want a definite line like in the example above.

It's always better to post a picture with your question, even if it is a bad picture.

Assuming you make a text-gradient layer as described earlier, you could then use the airbrush tool in erase mode to "thin-out" the lighter gradient  end. I'd suggest you use one of the reduced hardness brushes such as the Hardness 050 brush .....and perhaps even consider reducing the opacity of the airbrush tool to get the right effect. Several attempts might be needed as you feel out the tool, determining how much you want to thin. Then, once your have it right, merge down to the main image.

Remember, holding the "shift" and "crtl" keys down together will lock your airbrush tool into a straight line when you make your stroke. Smile

Something else that I just discovered myself, but AFTER getting your black bar with gradient partially done,... you can apply the gradient tool in "erase" mode as well, to thin out the leading edge of the gradient. Again you'd want to use the "FG to Transparent" gradient, but this time plotting your first gradient tab above the light edge of the small layer, and the second tab only part way down. And again, you can fine tune it with the opacity control. Just bear in mind that doing so adjusts the opacity of the erasure....odd concept but once you try it you'll see what I mean.....the "undo" function is your friend.


RE: How to make a solid black bar fade out? - PixLab - 07-11-2021

It's not the gradient the problem, it's your brain => the human brain!
Yes every single human living on this planet has a brain visual interpretation/solving problem (except me -> but I'm not from Earth nor a human  Big Grin )

More seriously Wink
A good reference would be > https://en.wikipedia.org/wiki/Optical_illusion (the two first draws on the right side tell a lot how the human brain works)

Having said that, let's get back on your gradient problem and how to solve it for you to see what you would like to see.

First thing first it's all about how bright or dark is your background using a black to transparent gradient (opposite is true with a white to transparent gradient)

See how smooth is the gradient WITHOUT any background!
https://imgur.com/UvxvcIl

Let's start with different shades of gray and the very same gradient on those different grays

a 25% gray background give a smooth gradient as the background is dark

https://imgur.com/iOpDjhm

a 50% gray gradient we start to see a "contraction" of the smoothness of the gradient near the dark area, but it's the very same gradient!

https://imgur.com/I4Cz4kC

with a white we fell it's cutting short at the black area, thus STILL the very same gradient...

https://imgur.com/YVauV07

with Colors now

Bright colors: we feel that the gradient is also contracted at the bottom, thus not as smooth as it should be, but it is still the very same gradient

https://imgur.com/EMfWtLS

Dark colors: Now We feel that the gradient is smooth, but it's the same gradient like all the examples above

https://imgur.com/QPcwZTs

OK, these explanations and comparison don't fit well as we are blending pixels so those examples are not right in the strict sense! But you got the picture Wink

But how to solve the problem?

Erisian gave one solution, which I have to use as well and works fine.
Thanks a lot Erisian!

(07-09-2021, 01:53 PM)Erisian Wrote: Sometimes if I am using the gradient tool on a layer mask, I have to zoom out quite a way so I can begin and end the gradient well outside the image.  This gives a smoother gradient.  It is possible to create a new FG/BG gradient so that you can adjust how smoothly it changes but I am not too familiar with that method.
How to stretch out the gradient > https://imgur.com/9C6TqHj

An alternative solution is to made 1 full gradient + 1 gradient in a selection

https://imgur.com/83il73f

There is many workaround solutions, you will need to do some trial and error to find out what's the best for your image (you never posted a sample for us to help you to find the best solution)

In all case, I hope this will help Wink