0

I'm trying to write a small painting program, and I was looking at Gimp's dynamics options. I was wondering what algorithm is used to calculate the final stroke parameters from the various curves. At first I thought it simply was an average between the curves, but for example the final result is zero if one of the is zero... sometimes.

I don't have the knowledge to dive into Gimp's source code and take a look myself.

Thanks in advance :)

Knexator
  • 21
  • 4

1 Answers1

1

The GIMP Dynamic calculation is fairly complicated code - I don't think it is possible to understand how they work without checking directly on the code - and that is even for the person who've worked the most on them.

It should be noted that it took this person several months to get them right, and from time to time there arises bugs that require part of it to get rewritten.

Moreover, there is no single "curve combination" - each curve means a different parameter - for some of them, it does make sense to map the curves values to values between 0 and 1 - and multiply the final parameter by all the relevant curves values - that's why you get the "zero" value.

But the fact that GIMP's dynamics currently behave like this by no means mean it would be the best or most intuitive way to use onyour app, if you are implementing similar dynamics.

ANywy, having most of the curves map from 0 - 1 and multiply all relevant curves for a given parameter (like stroke 'size' ) seems a good start.

jsbueno
  • 99,910
  • 10
  • 151
  • 209
  • 1
    Do you know this person, and how I could get in contact with him/her? :) – Knexator Oct 29 '16 at 10:17
  • The bets place to reach GIMP devleopers is at IRC - channel #gimp at irc.gimp.net The author of the majority of dynamics code is "Alexia Death", and she goes by the "death" nickname. – jsbueno Oct 30 '16 at 17:12