12-18-2022, 10:09 AM (This post was last modified: 12-18-2022, 11:47 AM by Ofnuts.)
Out of curiosity, I made a graph to see the effect of the "blending function" in a gradient, and how it behaves if the midpoint is changed.
The "50" gradients have the default midpoint position, and the "75" one have the midpoint dragged to 75% of the range.
To replicate, adapt and run this code in the Python console, and copy/paste the result to a CSV that you feed to your favorite spreadsheet application.
(12-18-2022, 10:09 AM)Ofnuts Wrote: Out of curiosity, I made a graph to see the effect of the "blending function" in a gradient, and how it behaves if the midpoint is changed.
The "50" gradients have the default midpoint position, and the "75" one have the midpoint dragged to 75% of the range.
Thanks Ofnuts....quite useful.
So then what you are doing is changing the values (pointed to by the red arrows) on the sample line of this guide sheet that I made to help me sort out the ggr file structure?
(12-18-2022, 10:09 AM)Ofnuts Wrote: Out of curiosity, I made a graph to see the effect of the "blending function" in a gradient, and how it behaves if the midpoint is changed.
The "50" gradients have the default midpoint position, and the "75" one have the midpoint dragged to 75% of the range.
Thanks Ofnuts....quite useful.
So then what you are doing is changing the values (pointed to by the red arrows) on the sample line of this guide sheet that I made to help me sort out the ggr file structure?
Exactly. In practice I want to do a specific non-linear gradient, and I was wondering if I could make it more accurate by playing with the curve types and/or the mid-points (answer: curve type: no, but midpoint: perhaps).
Curved is interesting: the doc describes it as "Gradient varies more quickly on ends of the range than on its middle." but this is wrong, Curved is better that this: you use the midpoint to set where the middle value of the gradient will be, and it creates a smooth curve that goes through the three points.
Otherwise, looking at the curves moving the midpoint is in general a bad idea since if entails a sharp bend in the function that translates into a abrupt color change in the generated gradient. It is only useful with Linear (if you have several segments) or Curved (if you have only one).
Unless all of this can be smoothed by pdb.gimp_gradient_segment_range_blend_colors(name, start_segment, end_segment), but I have yet to figure that one out.
12-19-2022, 01:00 AM (This post was last modified: 12-19-2022, 01:01 AM by rickk.)
I recall a user coming here and lamenting how (in his experience) the color transition (range?) transpired too abruptly.
IMO. the gradient editor is remarkably robust, once the user gets cozy with that right-click menu. Which unfortunately does not give up it's secrets easily. For a user seeking a "two-click" solution, I believe they will be frustrated in most instances.
Takes some getting used to, with trial and error. And for most folks just wanting to bang out a meme, requiring more effort than they are willing to invest.
Have you considered spreading your color over multiple segments?
Instead of:
0 0.5 1
Maybe spread it over
0 0.25 0.5
0.5 0.75 1
Something like that just to get more control points...then play with the math to get the range spread to your satisfaction?
(12-19-2022, 01:00 AM)rickk Wrote: I recall a user coming here and lamenting how (in his experience) the color transition (range?) transpired too abruptly.
IMO. the gradient editor is remarkably robust, once the user gets cozy with that right-click menu. Which unfortunately does not give up it's secrets easily. For a user seeking a "two-click" solution, I believe they will be frustrated in most instances.
Takes some getting used to, with trial and error. And for most folks just wanting to bang out a meme, requiring more effort than they are willing to invest.
Have you considered spreading your color over multiple segments?
Instead of:
0 0.5 1
Maybe spread it over
0 0.25 0.5
0.5 0.75 1
Something like that just to get more control points...then play with the math to get the range spread to your satisfaction?
I currently generate the gradient with a script... 80 control points or so, it's just a variable :-) Just wondering if I can get something smoother with fewer control points. "Perfection isn't when there is nothing left to add, but when there is nothing left to remove."