User:Americo/roughs

TODO

 * harmonize with classification on Brushlib.
 * Do comments, notes and illustrate some of brush features...
 * Do definitions about 'Inputs Related' and 'Drawing Related'...
 * Do a diagram for all inferences...

Brush Inputs
For each brush behavior with input settings (see...) is possible have 9 ways for control and design of this single aspect... the final behavior of each brush will be the somma of these set of seven inputs in the all behaviors.


 * 1) pressure [0.0, 0.0,  0.4,  1.0, 1.0]: the pressure reported by the tablet, between 0.0 and 1.0. If you use the mouse, it will be 0.5 when a button is pressed and 0.0 otherwise.
 * 2) speed1[None, 0.0, 0.5,  4.0, None]: how fast you currently move. This can change very quickly. Try 'print input values' from the 'help' menu to get a feeling for the range; negative values are rare but possible for very low speed. The name will be changed for fine speed only in the GUI.
 * 3) speed2 [None, 0.0, 0.5,  4.0, None]: same as speed1, but changes slower. Also look at the 'speed2 filter' setting. The name will be changed for gross speed only in the GUI.
 * 4) random [0.0, 0.0,  0.5,  1.0, 1.0]: fast random noise, changing at each evaluation. Evenly distributed between 0 and 1.
 * 5) stroke [0.0, 0.0,  0.5,  1.0, 1.0]: this input slowly goes from zero to one while you draw a stroke. It can also be configured to jump back to zero periodically while you move. Look at the 'stroke duration' and 'stroke hold time' settings.
 * 6) direction [0.0, 0.0,  0.0,  180.0, 180.0]: the angle of the stroke, in degrees. The value will stay between 0.0 and 180.0, effectively ignoring turns of 180 degrees.
 * 7) ascension
 * 8) descension
 * 9) custom [None,-2.0, 0.0, +2.0, None]: this is a user defined input. Look at the 'custom input' setting for details.

Values[hard minimum, soft minimum, normal[1], soft maximum, hard maximum] [1] If, for example, the user increases the "by pressure" slider in the "radius" control, then this should change the reaction to pressure and not the "normal" radius. To implement this, we need a guess what the user considers to be normal pressure.

Inputs Related [min, default, max]
ToDo: explain in short this point...

[input settings ] => [ ]

Speed

 * 1) speed1_slowness[0.0, 0.04, 0.2][ ]: how slow the input speed1 is following the real speed
 * 2) *0.0 change immediatly as your speed changes (not recommended, but try it).
 * 3) speed2_slowness[0.0, 0.8, 3.0][ ]: same as speed1 slowness, but note that the range is different.
 * 4) speed1_gamma[-8.0, 4.0, 8.0]: this changes the reaction of the speed1 input to extreme physical speed. You will see the difference best if speed1 is mapped to the radius.
 * 5) *-8.0 very fast speed does not increase speed1 much more
 * 6) *+8.0 very fast speed increases speed1 a lot
 * 7) *For very slow speed the opposite happens.
 * 8) speed2_gamma[-8.0, 4.0, 8.0]: same as 'speed1 gamma' for speed2.

Stroke

 * 1) stroke_treshold[0.0, 0.0, 0.5]: how much pressure is needed to start a stroke. This affects the stroke input only. Mypaint does not need a minimal pressure to start drawing.
 * 2) stroke_duration_logarithmic[-1.0, 4.0, 7.0][ ]: how far you have to move until the stroke input reaches 1.0. This value is logarithmic (negative values will not inverse the process).
 * 3) stroke_holdtime[0.0, 0.0, 10.0][ ]: this defines how long the stroke input stays at 1.0. After that it will reset to 0.0 and start growing again, even if the stroke is not yet finished.
 * 4) *2.0 means twice as long as it takes to go from 0.0 to 1.0
 * 5) *9.9 and bigger stands for infinite

Custom

 * 1) custom_input[-5.0, 0.0, 5.0][ ]: set the custom input to this value. If it is slowed down, move it towards this value (see below). The idea is that you make this input depend on a mixture of pressure/speed/whatever, and then make other settings depend on this 'custom input' instead of repeating this combination everywhere you need it.
 * 2) *If you make it change 'by random' you can generate a slow (smooth) random input.
 * 3) custom_input_slowness[0.0, 0.0, 10.0][ ]: how slow the custom input actually follows the desired value (the one above). This happens at brushdab level (ignoring how much time has past, if brushdabs do not depend on time).
 * 4) *0.0 no slowdown (changes apply instantly)

Drawing Related [min, default, max]
ToDo: Explain in short this point...

Drawing

 * 1) opaque[0.0, 1.0, 1.0][ ]: 0 means brush is transparent, 1 fully visible (also known als alpha or opacity.
 * 2) opaque_multiply[0.0, 0.0, 1.0][ ]: This gets multiplied with opaque. It is used for making opaque depend on pressure (or other inputs).
 * 3) opaque_linearize[0.0, 0.9, 2.0]: Correct the nonlinearity introduced by blending multiple dabs on top of each other. This correction should get you a linear natural pressure response when pressure is mapped to opaque_multiply, as it is usually done. 0.9 is good for standard strokes, set it smaller if your brush scatters a lot, or higher if you use dabs_per_second.
 * 4) *0.0 the opaque value above is for the individual dabs.
 * 5) *1.0 the opaque value above is for the final brush stroke, assuming each pixel gets (dabs_per_radius*2) brushdabs on average during a stroke.
 * 6) dabs_per_second[0.0, 0.0, 80.0]: dabs to draw each second, no matter how far the pointer moves.
 * 7) hardness[0.0, 0.8, 1.0]: hard brush-circle borders (setting to zero will draw nothing)
 * 8) smudge[0.0, 0.0, 1.0][ ]: paint with the smudge color instead of the brush color. The smudge color is slowly changed to the color you are painting on.
 * 9) *0.0 do not use the smudge color
 * 10) *0.5 mix the smudge color with the brush color
 * 11) *1.0 use only the smudge color
 * 12) smudge_length[0.0, 0.5, 1.0][ ]: this controls how fast the smudge color becomes the color you are painting on.
 * 13) *0.0 immediately change the smudge color
 * 14) *1.0 never change the smudge color
 * 15) eraser[0.0, 0.0, 1.0][ ]: how much this tool behaves like an eraser
 * 16) *0.0 normal painting
 * 17) *1.0 standard eraser
 * 18) *0.5 pixels go towards 50% transparency

Shape

 * 1) radius_logarithmic[-2.0, 2.0, 5.0][ ]: basic brush radius (logarithmic).
 * 2) *0.7 means 2 pixels
 * 3) *3.0 means 20 pixels
 * 4) radius_by_random[0.0, 0.0, 1.5][ ]: Alter the radius randomly each dab. You can also do this with the by_random input on the radius setting. If you do it here, there are two differences:
 * 5) *the opaque value will be corrected such that a big-radius dabs is more transparent,
 * 6) *it will not change the actual radius seen by dabs_per_actual_radius.
 * 7) elliptical_dab_ratio[1.0, 1.0, 10.0][ ]: aspect ratio of the dabs; must be >= 1.0, where 1.0 means a perfectly round dab. TODO: linearize? start at 0.0 maybe, or log?
 * 8) elliptical_dab_angle[0.0, 90.0, 180.0][<span title="pressure, fine speed, gross speed, random, stroke, direction, custom" style="color:white; background:brown; padding:0 .25em;"> ]: this defines the angle by which eliptical dabs are tilted
 * 9) *0.0 horizontal dabs
 * 10) *45.0 45 degrees, turned clockwise
 * 11) *180.0 horizontal again
 * 12) dabs_per_basic_radius[0.0, 0.0, 6.0]: how many dabs to draw while the pointer moves a distance of one brush radius (more precise: the base value of the radius).
 * 13) dabs_per_actual_radius[0.0, 2.0, 6.0]: same as above, but the radius actually drawn is used, which can change dynamically.

Path

 * 1) offset_by_speed[-3.0, 0.0, 3.0][<span title="pressure, fine speed, gross speed, random, stroke, direction, custom" style="color:white; background:brown; padding:0 .25em;"> ]: change position depending on pointer speed.
 * 2) *n= 0 disable
 * 3) *> 0 draw where the pointer moves to
 * 4) *< 0 draw where the pointer comes from
 * 5) offset_by_speed_slowness[0.0, 1.0, 15.0][<span title="pressure, fine speed, gross speed, random, stroke, direction, custom" style="color:white; background:brown; padding:0 .25em;"> ]: how slow the offset goes back to zero when the cursor stops moving.
 * 6) offset_by_random, jitter[0.0, 0.0, 2.0][<span title="pressure, fine speed, gross speed, random, stroke, direction, custom" style="color:white; background:brown; padding:0 .25em;"> ]: add a random offset to the position where each dab is drawn.
 * 7) *0.0 disabled
 * 8) *1.0 standard deviation is one basic radius away
 * 9) *< 0.0 negative values produce no jitter
 * 10) slow_tracking[0.0, 0.0, 10.0]: slowdown pointer tracking speed. 0 disables it, higher values remove more jitter in cursor movements.
 * 11) slow_tracking_per_dab[0.0, 0.0, 10.0][<span title="pressure, fine speed, gross speed, random, stroke, direction, custom" style="color:white; background:brown; padding:0 .25em;"> ]: similar as above but at brushdab level (ignoring how much time has past, if brushdabs do not depend on time).
 * 12) tracking_noise[0.0, 0.0, 12.0]: add randomness to the mouse pointer; this usually generates many small lines in random directions; maybe try this together with 'slow tracking'.
 * 13) direction_filter[0.0, 2.0, 10.0][<span title="pressure, fine speed, gross speed, random, stroke, direction, custom" style="color:white; background:brown; padding:0 .25em;"> ]: a low value will make the direction input adapt more quickly, a high value will make it smooth.

Color

 * 1) color_h[0.0, 0.0, 1.0]: color hue.
 * 2) color_s[-0.5, 0.0, 1.5]: color saturation.
 * 3) color_v[-0.5, 0.0, 1.5]: color value (brightness, intensity).
 * 4) change_color_h[-2.0, 0.0, 2.0][<span title="pressure, fine speed, gross speed, random, stroke, direction, custom" style="color:white; background:brown; padding:0 .25em;"> ]: Change color hue.
 * 5) *-0.1 small clockwise color hue shift
 * 6) * 0.0 disable
 * 7) * 0.5 counterclockwise hue shift by 180 degrees
 * 8) change_color_l[-2.0, 0.0, 2.0][<span title="pressure, fine speed, gross speed, random, stroke, direction, custom" style="color:white; background:brown; padding:0 .25em;"> ]: change the color lightness (luminance) using the HSL color model.
 * 9) *-1.0 blacker
 * 10) * 0.0 disable
 * 11) * 1.0 whiter
 * 12) change_color_hsl_s[-2.0, 0.0, 2.0][<span title="pressure, fine speed, gross speed, random, stroke, direction, custom" style="color:white; background:brown; padding:0 .25em;"> ]: change the color saturation using the HSL color model.
 * 13) *-1.0 more grayish
 * 14) * 0.0 disable
 * 15) * 1.0 more saturated
 * 16) change_color_v[-2.0, 0.0, 2.0][<span title="pressure, fine speed, gross speed, random, stroke, direction, custom" style="color:white; background:brown; padding:0 .25em;"> ]: change the color value (brightness, intensity) using the HSV color model. HSV changes are applied before HSL.
 * 17) *-1.0 darker
 * 18) * 0.0 disable
 * 19) * 1.0 brigher
 * 20) change_color_hsv_s[-2.0, 0.0, 2.0][<span title="pressure, fine speed, gross speed, random, stroke, direction, custom" style="color:white; background:brown; padding:0 .25em;"> ]: change the color saturation using the HSV color model. HSV changes are applied before HSL.
 * 21) *-1.0 more grayish
 * 22) * 0.0 disable
 * 23) * 1.0 more saturated

Graphical schemes
This drawing is only a draft, some ideas how show the relations, inferences for different behaviors or features of the brushes.