Gimp-Forum.net

Full Version: Weighted Blend
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a plugin or a means to weight a shaped blend to certain predetermined points instead of the normal center of the shape?
Not directly, but you can:

1) apply a plain linear black to white gradient

[attachment=2457]

2) Use Curves (or, in the simpler cases, Levels) to map to another gradient.

[attachment=2458]

In other words, you can see the initial gradient as indicating how far you are from the border, and the Curves as mapping that distance from the border in to a grey level.

3) Once you are done, you can use Color>Map>Gradient map to transform that grayscale gradient in to any gradient:

[attachment=2459]
Thanks for the help, but that will not work. I will keep trying to write a script to do the work.
Maybe as a starting point for a script. RMA_path_blend.scm Uses two paths and there are snags - the paths must have the same number of nodes + empty space to fill in.

http://www.silent9.com/incoming/scripts/ about 4 down

Comparison: https://i.imgur.com/MZxztVw.jpg
(01-06-2019, 03:36 PM)Animusmontus Wrote: [ -> ]Thanks for the help, but that will not work. I will keep trying to write a script to do the work.

If its a script, you can replace the Curves by a Gradient map with a gradient created on the fly.

Otherwise show an example of what you want to do.

Something like this: http://gimp-wrapmap.sourceforge.net/

Or this: https://sourceforge.net/projects/gimp-pa...p/download
I am working on a height map. I have the land roughed in as a flat surface. The sea floor has been roughed in and edited. The mountains were already placed. I wanted a blend to go from the shore pixels to the mountain pixels. Using the builtin blend, the mountains would be surrounded by a hill. And I have recently given up on writing a script so far -- I keep running out of memory and am not sure where or what is eating the memory (16 GB or ram and 2 GB swap).
(03-01-2019, 02:16 PM)Animusmontus Wrote: [ -> ]I am working on a height map. I have the land roughed in as a flat surface. The sea floor has been roughed in and edited. The mountains were already placed. I wanted a blend to go from the shore pixels to the mountain pixels. Using the builtin blend, the mountains would be surrounded by a hill. And I have recently given up on writing a script so far -- I keep running out of memory and am not sure where or what is eating the memory (16 GB or ram and 2 GB swap).

Perhaps post an example picture?
I would try something like this:
  • get a selection on the shore line
  • then:
  • duplicate the initial layer
  • apply a blur
  • repeat a couple of times with increasing blurs
  • blend the layers: given them an opacoy of 1/N, N being their order in the stack from the bottom: lowest is 100%, next is 50%, then 33%, 25%...
With just two (60 and 120) blurs and stretching the contrast  a bit:

[attachment=2738]

Assuming that you start with the selection already set, it should not be too hard to script if you want many layers.

For script help, see https://www.gimp-forum.net/Forum-Scripting-questions