Blender 2.78 Grease Pencil - pen pressure problem (Yiynova Tablet) #49628

Closed
opened 2016-10-11 16:51:09 +02:00 by Konstantin Bukow · 19 comments

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: https://www.youtube.com/watch?v=Y35yPFysq_w

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

**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: https://www.youtube.com/watch?v=Y35yPFysq_w **Exact steps for others to reproduce the error** try to draw with Grease Pencil using a Yiynova tablet

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @KonstantinBukow

Added subscriber: @KonstantinBukow
Member

Added subscriber: @JoshuaLeung

Added subscriber: @JoshuaLeung
Member

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 :)

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

  2. 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

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 2. 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

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2016-10-21 17:50:13 +02:00

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.

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.

Hello,
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.

Hello, 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.

Added subscriber: @YAFU

Added subscriber: @YAFU

Hi.
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):
TexturePaint.blend
CurveDraw.blend

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:
https://digimend.github.io/tablets/

Edit:
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.

Hi. 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): [TexturePaint.blend](https://archive.blender.org/developer/F4160557/TexturePaint.blend) [CurveDraw.blend](https://archive.blender.org/developer/F4160560/CurveDraw.blend) 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: https://digimend.github.io/tablets/ Edit: 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.
Member

@KonstantinBukow 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().

@KonstantinBukow 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()`.
Member

Added subscriber: @pablovazquez

Added subscriber: @pablovazquez
Member

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.

@JoshuaLeung 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).

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. @JoshuaLeung 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 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!

@JoshuaLeung 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!

@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! @JoshuaLeung 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!
Member

In #49628#526986, @KonstantinBukow wrote:
@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.

> In #49628#526986, @KonstantinBukow wrote: > @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

@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

@JoshuaLeung 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: https://youtu.be/LRnzfMrVwmU

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!

@JoshuaLeung 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: https://youtu.be/LRnzfMrVwmU 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!

@JoshuaLeung @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: https://youtu.be/xkWECtX-ORs

@JoshuaLeung @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: https://youtu.be/xkWECtX-ORs
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#49628
No description provided.