After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748472 - Velocity Parameter on .GIH Brushes don't works
Velocity Parameter on .GIH Brushes don't works
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
git master
Other All
: Normal normal
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2015-04-25 22:48 UTC by jose americo gobbo
Modified: 2015-05-12 14:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
1 dimension gih brush - velocity parameter to test this behavior. (640.53 KB, text/plain)
2015-04-25 22:48 UTC, jose americo gobbo
  Details
fix gimpbrushpip velocity idx calculation (1.31 KB, patch)
2015-05-07 04:26 UTC, Adrian Likins
committed Details | Review

Description jose americo gobbo 2015-04-25 22:48:24 UTC
Created attachment 302353 [details]
1 dimension gih brush - velocity parameter to test this behavior.

The .gih brushes with Velocity parameter don't working anyway. I've make some brushes with the intention only to test the .gih brushes without and with paint dynamics.
The velocity parameter is disable completely on this kind brush. Other parameters like pressure has also some problem on sensibility range, but is working.
To test it I've made a brush with 10 layers with different colours and I've saved as 1 dimension brush with 10 ranks on velocity parameter. When you painting with the brush (dynamic off, just to test if the parameter is working correctly), the output is always the last layer.
I had the attention to test also on GIMP 2.8.14 and this bug occurs too.
I've saved also on 2.8.14 the .gih brush, to exclude a particular problem with the GIMP Git Master, and the bug also appears on the .gih brush saved on GIMP 2.8.14 and tested on this version.

===
Because are important the .GIH brushes
I've working around the .gih brushes and their parameters to understand the real use on the digital painting and their relationship with the current paint dynamics. With these tests I've verified that this kind brush is useful to emulate some very difficult paint techniques like the watercolour and some other kind as tempera, e.g., some insight is possible to see here:
https://plus.google.com/+AmericoGobbo/posts/LjjinvWAF8W
Comment 1 Adrian Likins 2015-05-07 04:26:00 UTC
Created attachment 303005 [details] [review]
fix gimpbrushpip velocity idx calculation
Comment 2 Adrian Likins 2015-05-07 04:31:08 UTC
Trying out that brush, I can reproduce this. Velocity seems to always be the last layer.

I think the problem is in app/core/gimpbrushpipe.c in gimp_brush_pipe_select_brush() in the velocity handling. 

The rank index calculation is being multiplied by 3.0, and then ends up being clamped to the highest rank and getting the last layer from the gih.

It's not obvious to me where the 3.0 comes from, as the comment indicates the velocity is 0.0 to 3.0, but it's 0.0 to 1.0.

I've got a patch that seems to fix it attached.
Comment 3 Michael Natterer 2015-05-07 07:39:59 UTC
Thanks Adrian, long time no see :) Pushed to master and gimp-2-8:

commit 8f1a4e8b190d0cf855d2058bb1eb272b5d7efd83
Author: Adrian Likins <alikins@redhat.com>
Date:   Thu May 7 00:10:17 2015 -0400

    Bug 748472 - Velocity Parameter on .GIH Brushes don't works
    
    The pipe index for velocity was being multiplied
    by 3.0 and rounded, making it larger than the
    available rank and always clamped to the last
    brush image in velocity ranks.
    
    (cherry picked from commit c3387fcf677ff6b00c269541610f378138c7f20a)

 app/core/gimpbrushpipe.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Comment 4 jose americo gobbo 2015-05-12 14:20:59 UTC
Hi,
Now, after to fix this bug the pressure property don't is working... I've wrote the bug report on https://bugzilla.gnome.org/show_bug.cgi?id=749264