Gimp-Forum.net
Gradient used to mimic neutral density filter along horizon - 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: Gradient used to mimic neutral density filter along horizon (/Thread-Gradient-used-to-mimic-neutral-density-filter-along-horizon)

Pages: 1 2


Gradient used to mimic neutral density filter along horizon - gstalnaker - 12-25-2018

All,

After readying 10 pages from a search for "gradient" without finding something close to what I'd like, it's time to post to the Forum.

I've a landscape image. I want to simulate the affect of a neutral density filter. Steps fairly straight forward:

1. Layer 1 is base
2. Layer 2 (dup of Layer 1) is foreground edited as desired
3. Layer 3 (dup of Layer 1) is background edited as desired.
4. Layer 3 with mask; linear gradient applied to balance Layer 2 and Layer 3 across the horizon.

Applying the gradient, given how it works, creates a single, image-spanning horizonal at whatever angle, or not, I set. This is not optimal if, say, the horizon is a valley or is not flat. 

Q: is there some way of using the gradient tool such that it is not a flat gradient but follows some drawn line. For example, if I could pencil a line that follows the horizon that pass that to the gradient tool so that the gradient drawn is not "flat" but follows the non-flat horizon? I know I can actually draw a very wide brush using Hardness 025 but that does not come close to being as good as the gradient tool. I'd hoped that I might find "gradient along path" examples, but those are uniformly along the path and not across the path as I'm conceptualizing it.


RE: Gradient used to mimic neutral density filter along horizon - mholder - 12-26-2018

Without pictures this is kind of difficult to understand for me.
Maybe use the pencil/pen tool and paint with the gradient setting in the dynamic options, or create a path and stroke it with pen/pencil using the tool setting.


RE: Gradient used to mimic neutral density filter along horizon - Ofnuts - 12-26-2018

(12-26-2018, 12:13 AM)mholder Wrote: Without pictures this is kind of difficult to understand for me.
Maybe use the pencil/pen tool and paint with the gradient setting in the dynamic options,  or create a path and stroke it with pen/pencil using the tool setting.
  • In the example below, I assume the "sky" layer in on top
  • Enlarge the canvas by at least the width of the transition you want (you'll understand why later in the process)
  • Create your selection on the "horizon" (it should extend out of the layer and encompass the canvas)
  • Select>Grow by half the width of the transition
  • At a layer mask to the sky layer
  • Set the gradient tool to Shaped, spherical
  • Adjust the gradient on-canvas so that most of the color change is around your sky/ground border
[attachment=2424]



RE: Gradient used to mimic neutral density filter along horizon - rich2005 - 12-26-2018

Quote:2. Layer 2 (dup of Layer 1) is foreground edited as desired
3. Layer 3 (dup of Layer 1) is background edited as desired.
4. Layer 3 with mask; linear gradient applied to balance Layer 2 and Layer 3 across the horizon.

That is very close to an old plugin multi-band-blend Pulled it out of my archive. It does work with the flatpak (attached for you to play with) unzip - goes in user plugins folder.

Two layers to blend + a mask layer. I made a selection, fill with black in white. Gave it a good blur for a transition.

Apply plugin for a new blended layer. https://i.imgur.com/s2bVi2O.jpg

snags, make sure all layers either have/have-not alpha. No mix, or you get an error.


RE: Gradient used to mimic neutral density filter along horizon - gstalnaker - 12-26-2018

For anyone looking at this post, linked is an image that shows the problem to solve. A landscape (pond) with background valley left and right. The red line is the "horizon", i.e., the valley slopes, the blue dotted lines the long horizontal that results in extending either side of the valley, and the use of the gradient fill tool (blue to white) that creates a flat horizontal, in this case aligned with the extended dotted blue line that drops to the right. The problem is the area of the large triangle on the right where the lighter part of the gradient begins to wash out the trees.

https://www.dropbox.com/s/fbwnze4jf9pff5q/2018-12-26%2009_41_32-Action%20center.png?dl=0

Thanks rich2005. I'll give your plugin a go.

[EDIT] The blue gradient here is simply to show visually (using blue/white for the gradient colors) how use of a gradient is awkward in this situation. In my normal SOP, the gradient is applied on a mask on a layer and it is the typical black/white gradient.


RE: Gradient used to mimic neutral density filter along horizon - rich2005 - 12-26-2018

hmmm...might work

1. The original
2. A copy with the blue curve pulled to adjust the foliage and some of the reflections but leaves a blue caste over the clouds.

The mask can have hard edges. Black leaves the sky and bottom largely the same. White center blends the two layers. You need to experiment a little with the shape.

[Image: dgD4bmk.jpg]https://i.imgur.com/dgD4bmk.jpg


RE: Gradient used to mimic neutral density filter along horizon - gstalnaker - 12-26-2018

Thanks rich2005 -- I've downloaded your plugin and will give it a go.


RE: Gradient used to mimic neutral density filter along horizon - gstalnaker - 12-27-2018

rich2005 -- what does this mean: "flatpak (attached for you to play with) unzip "?

Both Windows Explorer Extract and 7zip can unzip your mbbx64.zip file. But the resulting extract does not yield a .py or .scm file but a binary object that Gimp does not load.

Thanks.


RE: Gradient used to mimic neutral density filter along horizon - rich2005 - 12-27-2018

I thought you might be using linux from your profile (hence linux flatpak gimp reference). That is a linux binary and of course does not work in Windows (or OSX).

The site is here https://code.google.com/p/gimp-mbb with a link to the now defunct gimp-plugin-registry site, so a Windows binary attached. I have tried it in a Win10 / Gimp 2.10.8 (VM) and it does work.

Going back to to the original post, using Gimp only tools. You might get a result with a selection and a mask
The selection a bit wider than envisaged and a good feather applied.
A black layer mask
A white-to-black gradient and the gradient in Shaped Spherical mode. https://docs.gimp.org/2.10/en/gimp-tool-gradient.html That applies the gradient following the edges of the selection.
In Gimp 2.10 you can adjust the gradient on the canvas. 

[Image: SY6EwGO.jpg]

Usually more work required after that, touch-up / blur / mess-about-with layer mask.....


RE: Gradient used to mimic neutral density filter along horizon - Ofnuts - 12-28-2018

Looking at your picture, i think the right way to do it is to use  luminosity mask.