Page MenuHome

Blender 2.78 Grease Pencil - pen pressure problem (Yiynova Tablet)
Closed, InvalidPublic


System Information
Windows8.1 - GeForce GT750M - Tablet: Yiynova MPV20U+RH

Blender Version
Broken: 2.78

Short description of error
When drawing with Grease Pencil the last bits of many lines get very thick as if I were drawing with full pressure.
The pressure sensitivity itself works just fine, up until the last bit of the line. It works without problems in all other graphic apps I use.
It might be some kind of problem with the Yiynova drivers. With my old Wacom Bamboo I never had such issues.
Demonstration of the problem:

Exact steps for others to reproduce the error
try to draw with Grease Pencil using a Yiynova tablet

Event Timeline

Joshua Leung (aligorith) lowered the priority of this task from 90 to 30.Oct 13 2016, 2:35 PM

In general, it's hard to reproduce or fix issues which only occur on specific/uncommon hardware that we don't have access to ourselves, so unless something changed here recently, it's likely to be quite hard to find a fix for this.

To help us figure out where the problem might be, could you check on a few things:

  1. Does this happen with an earlier version of Blender? In particular, does it happen with 2.77b, or even 2.73?
  2. Is this problem Grease Pencil specific? Does the Image Editor or Mesh Sculpting suffer from similar problems?

Thanks :)

Hey Joshua,
I made some tests:

  1. I tried with 2.73a and it seems to work fine in sculpt mode but the Grease Pencil produces the same errors
  1. In 2.78 the sculpt mode produces the same error that GP does. many of the lines I draw end with the maximum size/strength of the brush.

hope that helps. If you like I can do another video to show the results

Bastien Montagne (mont29) changed the task status from Unknown Status to Unknown Status.Oct 21 2016, 5:50 PM
Bastien Montagne (mont29) claimed this task.

This sounds like a driver issue to me (driver sending bad 'last point' width info…).

But in any case, besides usual tips to try older/newer drivers if possible, we won’t be able to do anything unless we find a dev with similar hardware able to reproduce the issue… So will archive the report for now.

I am super-excited about all the awesome work on 2.8 and its recent inclusion of the grease pencil branch. I am already having lots of fun with 2.8 (I also already got some actual work done with it) but unfortunately this bug has carried over and is still so annoying that the grease pencil is basicly useless with my current set-up. I have pen pressure working in Photoshop, Illustrator, Artrage, Krita etc. - so I am pretty confident that blender is causing the issue. I am not really a developer, but I´d like to help you with fixing this - I also could imagine that lots of blender users would love to successfully use their non-wacom tablets with blender.

Is there any way that I can output the pen-input values blender is recieving?
I thought about logging the grease pencil input to maybe get a grasp of whats happening behind the scenes.

YAFU (YAFU) added a subscriber: YAFU (YAFU).EditedAug 8 2018, 7:47 PM

I'm not a developer, but here are a couple of scenes to check if the problem also occurs in other modes (as Joshua suggested):

Also while trying to find a solution for windows problem, you could try in some modern Linux distribution, apparently some Yiynova tablets are supported by default by generic driver:

Sorry, now I see that apparently this is not a simple desktop graphic tablet. I'm not sure that Linux can be installed on it.

@Konstantin Bukow (Kobuk) Short of modifying the grease pencil code (see gpencil_draw_modal() in either gpencil_paint.c or annotate_paint.c) to check what pressure values Blender is getting/using, you could also try running Blender with the --debug-events flag.

Checking the code quickly, a possible cause is that on the pen-up (end of stroke) event, the tablet may not be sending "tablet data" along with the event, causing Blender to think that this came from a mouse instead, causing it to choose the default pressure of 1.0 (i.e. big ugly blotches at the end of strokes). See the if (event->tablet_data) checks in gpencil_draw_apply_event().

Can confirm stylus pressure not working in Blender (in general, not only GP). I'm using a Wacom Intuos 5 Touch under Ubuntu 17.10.

@Joshua Leung (aligorith) I checked the code that you mentioned and indeed the if (event->tablet_data) doesn't go through so it defaults to 1.0f.

/* No tablet data -> No pressure info is available */
p->pressure = 1.0f;

Running Blender with --debug-events yields stylus input as what it seems regular mouse input:

wm_event_do_handlers: Handling event
wmEvent  type:1 / LEFTMOUSE, val:1 / PRESS,
         shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0,
         mouse:(894,753), ascii:'', utf8:'', keymap_idname:(null), pointer:0x7fd05e3f8588

wm_event_do_handlers: Handling event
wmEvent  type:1 / LEFTMOUSE, val:2 / RELEASE,
         shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0,
         mouse:(1114,713), ascii:'', utf8:'', keymap_idname:(null), pointer:0x7fd05e3f8988

Removing the if statement of course crashes because it seems event->tablet_data is empty :(

Tried the same in 2.79b and 2.78c to no avail, no pressure sensitivity there either. It works on other applications (Krita, GIMP, and the "Test Settings" tool in the Wacom preferences in GNOME 3).

@YAFU (YAFU) the device is basicly a standard pen digitizer display, so there´s no OS running on the device itself. It´s basicly the poor-man´s cintique from china. considering the price difference it´s a really neat piece of hardware and it would be a shame if it was unusable with GP. I will check out how it performs in the other modes!

@Joshua Leung (aligorith) thanks so much for the help! I will make some further experiments and let you know what happened!

@venomgfx would it be possible to change the code in a way that the pressure value defaults to 0f if no tablet data is recieved, or would that mess up the mouse input?

Again thanks everybody for your help! This is very much appreciated and I will try my best to help!

@venomgfx would it be possible to change the code in a way that the pressure value defaults to 0f if no tablet data is recieved, or would that mess up the mouse input?

Pressure 0f means a stroke size of 0, so you won't see anything.

@venomgfx yeah seeing nothing in this situation is exactly what I need! :) Obviously the pressure data is recieved correctly during the brush stroke, since I can draw perfectly fine up to the moment I lift the pen (this is where it creates these ugly full-pressure dots). Joshua´s theory was that the pen-up event of my tablet driver doesn´t include any pressure information (where it should be 0), so I thought if I have a default pen pressure of 0f everything should be fine, because as soon as I start drawing the value should change to something positive. Please let me know if I my logic is wrong. I got my very limited knowledge about input managment by building a few game prototypes over the last year, so this is how I would try to hack the problem if it was occuring in one of my games

@Joshua Leung (aligorith) so I started blender with the --log-events flag and with that I could confirm your theory about the missing pressure information on the release event. It´s really weird that it just happens so randomly. I made another short video demonstrating whats happening with the console open:

If possible I´d try to set the pressure value to 0f on every release-event. At least in my head it sounds like a plausible solution :)
Thanks a lot for taking your time everybody!

@Joshua Leung (aligorith) @venomgfx Guys thank you so much for the help! Surprisingly everything was exactly like I expected: Setting the default value to 0f solves the problem for the pen input but disables the possibility to draw with the mouse. I will now go to try to find the solution in the release event. I AM SO HAPPY!!!! XD demonstration: