12-18-2022, 11:48 PM
(12-18-2022, 09:16 PM)rickk Wrote:(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.Thanks Ofnuts....quite useful.
The "50" gradients have the default midpoint position, and the "75" one have the midpoint dragged to 75% of the range.
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.