A discussion on the Force Paint tool attribute in GIMP

There is some overlap and confusion between Force, Opacity and Hardness on the Paint tool in GIMP. I wonder what people think on this issue.

Force, as I now understand its purpose, is to provide a dynamic change in the character of the alpha mask. As though more force is applied to the stroke. This is good, it effectively changes the contrast of the alpha mask in response to stylus pressure. This slider can be used to better simulate traditional media like charcoal, pastel, chalk, graphite.

The Force slider is calibrated this way:

( 0 … 49) reduced brush alpha mask values, the brush becomes more transparent.
50, the default value, no modification of the brush alpha mask values
(51 … 100) 2x the brush alpha mask values, the brush becomes more opaque, contrast is increased.

I’m suggesting changing the parameter name to ‘Contrast’, with calibration like this:

0, the default value, no modification of the brush alpha mask values, zero Contrast
100, 2x the brush alpha mask values

  • The media opacity is never reduced, leaving that to the Opacity attribute
  • The name describes what it does to the brush mask

A tool-tip might be “The brush contrast is increased as if more force was applied”

The code currently multiplies the mask value by the Force value (0, 1), scaling and then clamping?
So the change might be to scale between 1 and 2, rather than 0 and 2.

Note: pressure = Force

/* The simple pressure profile
 *
 * It is: I'(I) = MIN (2 * pressure * I, 1)
 */
class SimplePressure
{
  gfloat scale;

public:
  SimplePressure (gdouble pressure)
  {
    scale = 2.0 * pressure;
  }

  guchar
  operator () (guchar x) const
  {
    gint v = RINT (scale * x);

    return MIN (v, 255);
  }

  gfloat
  operator () (gfloat x) const
  {
    gfloat v = scale * x;

    return MIN (v, 1.0f);
  }
1 Like

The thing that bothers me most about the Force control is that it produces a flattening in the curves for values over 50.

The idea of the new calculation method might improve the current behaviour, but any ‘discrete’ method will produce some flattening effect in the curves sooner or later depending on the force value in relation to the reference opacity.

Perhaps to avoid this we should imagine an algorithm that takes into account both input variables, force and opacity. So that we have a way to limit full transparency or full opacity across the usable spectrum: 0 to 100 for force and for opacity (assuming this is the case here, I am not able to understand how the code works, I am not a developer :wink:

This probably complicates matters, but ideally I would like the calculation to produce no flattening in the mask responses.

Regarding the name, I think Transparency could be usable for the concept of the alpha mask, but the behaviour must be consistent over the whole range of force and opacity of the brush.
But the suggestion of using Constrast is also quite interesting although it seems a bit general for this particular case.

‘Intensity’ might also work as a name, or ‘Density’. ‘Contrast’ is good whilst the values are clamped, in the distant future they may be free, and then the brush stroke would become more intense, more dense. ‘Transparency’ could be confused with ‘Opacity’. I like ‘Contrast’ because that’s the visual change on the brush mask.

At the moment the code does a simple 2x, the author did put in more work, and there is deactivated code for a different kind of mask adjustment. More like curves, which, I agree makes ‘Contrast’ quite general, but overall if you apply curves or levels to an image, it could be said you are adjusting the image contrast. In this case it’s the brush texture contrast.

To avoid flattening the mask using a 2x, it would perhaps mean looking at activating that curvy code, or 16 bit brushes. Or some other math so that the values are changed in a non-linear way. It’s quite usable as is, and I look forward to trying out how it might be used on brush textures now that I know how it works. Perhaps I’d never go up to 2x in a practical situation.

‘Force’ is a per pixel adjustment to the brush alpha mask, that changes the character of the brush texture, as if more pressure was being applied with a ‘dry’ media. More force has been applied, however I equate force with stylus ‘pressure’, so a parameter called ‘Force’ is like ‘Pressure’, and I’d dynamically drive ‘Force’ with pressure. Which confuses me :slight_smile:

Driving ‘Contrast’, or ‘Intensity’ or ‘Density’ with stylus pressure, less confusing. Especially if it doesn’t get less opaque.

Now that you commented about the deactivated code I remembered that about 6 years ago I had an issue about noticeable delays in painting using Force and so Ell deactivated the algorithm’s use and he created this current solution.
We can see if your idea about using another range could improve the behaviour, we need to test it in the practice of painting with Gimp… in the meantime, we’ll see if someone in the group comes up with some brilliant idea :wink:
Surely we should review the issue of brushes with more precision sooner than we should address it.

ah, it’s good to know the reason it’s not used, I’ll try switching it on if I can work out how to, see what happens.
Might be an idea to add a preference to use a fast or better quality process.

although, if it’s a curves situation applied to the mask, then that gives much more reason to keep the ‘less’ opaque calibration. It’d fade away with less force in a per pixel, in a non-linear way? artist math. :crazy_face:

To do:

  • try switching on curvy code
  • test painting, evaluate
  • add a brush preference for the ‘quality’ of Force / Intensity / Density / Contrast
2 Likes

I found the far discussion about the force and hardness :slight_smile: is a bit long!

1 Like

I would also like to see your modification in practice.

So the change might be to scale between 1 and 2, rather than 0 and 2.

Some considerations about the topic and user participation: until the moment this post had 65 views and we don’t have any manifestation on it. IMO, this topic is less known for all users in general, so will be interesting to create some discussion about the dynamics and current set on GIMP.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.