Gimp-Forum.net
Weighted Blend - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Older Gimp versions (2.8, 2.6....) (https://www.gimp-forum.net/Forum-Older-Gimp-versions-2-8-2-6)
+--- Thread: Weighted Blend (/Thread-Weighted-Blend)



Weighted Blend - Animusmontus - 01-05-2019

Is there a plugin or a means to weight a shaped blend to certain predetermined points instead of the normal center of the shape?


RE: Weighted Blend - Ofnuts - 01-05-2019

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]



RE: Weighted Blend - Animusmontus - 01-06-2019

Thanks for the help, but that will not work. I will keep trying to write a script to do the work.


RE: Weighted Blend - rich2005 - 01-06-2019

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


RE: Weighted Blend - Ofnuts - 01-06-2019

(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-path-tools/files/scripts/ofn-gradient-along-path.zip/download


RE: Weighted Blend - Animusmontus - 03-01-2019

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).


RE: Weighted Blend - Ofnuts - 03-01-2019

(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?


RE: Weighted Blend - Animusmontus - 03-24-2019

Height Map Rough


RE: Weighted Blend - Ofnuts - 03-24-2019

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