Lag when draw fast with pen or mouse. #76699
Labels
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
9 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#76699
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: MacOS 10.15.4
Graphics card: Intel Iris Graphics 6100 1536 MB graphics
Blender Version
Broken: 2.82a
Short description of error
When drawing something very fast in Blender, it seems that blender draws by adding lines between consecutive position. This results in very "spiky" drawing, especially when circular figures, like head, bowl and similar. Error is present in texture drawing mode, as well as grease pencil. None of the available configuration option in Blender fixes this.
Most other drawing applications add multiple points for each cursor change if motion is fast enough, by computing velocity of cursor at last point and adding enough lines between points so drawing looks smooth enough.
Exact steps for others to reproduce the error
I've attached screencast that shows this issue
Screen Recording 2020-05-12 at 20.02.10.mov
Added subscriber: @sheerun
#81211 was marked as duplicate of this issue
Added subscriber: @antoniov
Changed status from 'Needs Triage' to: 'Needs User Info'
Can you try 2.83 version?
2.83 not only has the same issue but also the cursor on screen lags behind what's I'm drawing on tablet by a 1-2 seconds. it's really terrible, sorry :)
I cannot reproduce on my Windows machine. It looks a problem with you mouse/tab driver or any issue related to drivers. I will ask if someone with a Mac can reproduce it.
Drawing doesn't take into account velocity of cursorto GPencil: Lag when draw fast with pen.Added subscriber: @dupoxy
I can reproduce the painting mode part (mouse and tab.)
file:T76699_v000.blend
video:2020-05-13 12-00-49.mp4
for grease pencil it's more like #76550
System Information
Operating system: Darwin-17.7.0-x86_64-i386-64bit 64 Bits ( MacOS 10.13.6 )
This looks a more general problem with the Tab/Pen that a problem with Grease Pencil itself.
GPencil: Lag when draw fast with pen.to Lag when draw fast with pen.Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'
As I said
no need for a Tab/Pen I can reproduce with a mouse.
Lag when draw fast with pen.to Lag when draw fast with pen or mouse.Added subscriber: @girafic
For me it is also lagging if I set the width/height to 4096px (see video attached)
Bildschirmvideo aufnehmen 2020-05-25 um 23.19.43.mp4
Added subscriber: @PrototypeNM1
This looks like mouse/tablet events are being coalesced and the coalesced history ignored. This becomes more apparent as the system is more taxed (working on a higher resolution image).
Added subscriber: @jenkm
The same behavior on Windows 7 with 2.79b, and 2.91.0 on macOS, using a mouse or Mac trackpad does not matter.
What matters is the size of the image and zoom level.
4K image:
The same image is just zoomed in:
Added subscribers: @Ant3d, @HenriHebeisen, @iss
OK. I tried
setMouseCoalescingEnabled
, in general, it helps a lot.I found a similar fix for Krita:
https://phabricator.kde.org/D7880
And this:
https://lists.blender.org/pipermail/bf-blender-cvs/2010-June/028869.html
At least we can call it confirmed.
From what I can find that's the appropriate fix. I can't find any way to extract mouse event "history" from a coalesced mouse event, and some non-Apple documentation states that the behavior of coalescing is to clobber the unprocessed mouse event in the event queue. A similar W3C thread makes no mention of an history extracting function for macOS.
I would move disabling coalescing to system initialization instead of event processing since running it every frame should be unnecessary. I think a PR with this change would be accepted.
Afaik the point is to disable coalescing, not enable it
@PrototypeNM1 Just disable coalescing at system initialization will affect the performance of other operations, such as rotating the 3D view or change values (recalculation) by dragging button. I think this should only be disabled if necessary. I guess, I don't really understand how it works.
You can coalesce events in software, instead of depending on system to do it
I guess the commented out code below setMouseCoalescingEnabled is exactly intended for this:
https://developer.blender.org/diffusion/B/browse/master/intern/ghost/intern/GHOST_SystemCocoa.mm$895
Coalescing can mean to bundle the events together and optionally allow unpacking them, as is the case on Windows. This is preferable behavior as it allows batch processing of similar OS events.
Unfortunately this doesn't seem to be an option on macOS, which uses coalesce to mean overwriting a singular unprocessed event.
Blender coalesces mouse input in a separate step - in the Window Manager if you're curious. Operators which don't need all mouse input don't receive all mouse input. The default behavior should be to consume all available mouse events at all times.
The mouse input only as I can see. I use a trackpad (
MOUSEPAN
,MOUSEROTATE
) and the 3D view rotation is very laggy with disabled coalescing. Enabling the Auto Depth option gives 3-5 fps.Could this be enabled for mouse events only and fixed for other events in separate issues?
Added subscribers: @ArtoKitula, @brecht
Applying an overwrite behavior similar to what macOS does (discard all but the most recent, unprocessed, successive ghost trackpad pan/rotate/pinch events) would work in the Window Manager. The logic would be similar to how mouse input is coalesced by the same module.
I'm not sure if that's the preferred behavior, @brecht @ArtoKitula could you weigh in on the above?
We should implement coalescing for trackpad events in WM, and then disable coalescing in GHOST.
For the WM part, something like this should work (untested): P1757
@jenkm looks like there's a clear path to resolving this issue. Do you plan to submit a diff? I'd pick it up but I don't have hardware to test.
It seems to work, but I'm not sure I can judge if everything is working correctly. I might be missing something. So this task is not for me.
Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
@sheerun @jenkm could you test this build ? If it works could you also confirm the following:
[NSEvent setMouseCoalescingEnabled:NO]
has no effect inside the theGHOST_SystemCocoa()
orinit()
wm_event_free_last
should bestatic
This issue was referenced by
96200110eb
@jenkm Tried a different approach, moving
[NSEvent setMouseCoalescingEnabled:NO]
into theapplicationDidFinishLaunching
callback, updated build here .@girafic you might be interested in this thread and the above test build.
Changed status from 'Confirmed' to: 'Resolved'
@PrototypeNM1 working fine with the test build 👍