WIP: UI: Node Dashed Lines Readability #110124
No reviewers
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#110124
Loading…
Reference in New Issue
No description provided.
Delete Branch "Harley/blender:NodeDashedLines"
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?
Make Node dashed lines thicker, with wider fully-transparent gaps.
Our current "dashed lines" shader in the Node editors creates lines with gaps that are about a single pixel in width and with only a 50% opacity drop. On retina displays this gap is subpixel in size and hard to see.
This PR makes the gaps larger (50% of each section verses 25%), makes them fully transparent instead of 50%, and makes the lines wider. The following illustrates the changes. This has been saved at a larger size then reduced to 50% in order to simulate the pixel sizes on a high-DPI display:
Thanks for taking this on. While these defaults are certainly more readable, I still find it very easy to get kinda bad results on mac OS depending on zoom and resolution scale (see screenshots below).
Regarding your following comment in #102919 (comment):
I remember being confused by this, too, but I think I now understand what's going on:
When increasing the resolution scale, the drawn nodes - just like the rest of the UI - actually get bigger and spaced further apart (see how
node_to_view
orNODE_WIDTH()
use theUI_SCALE_FAC
).As a result, a link that's e.g. 100 units long becomes 200 units long when doubling the resolution scale. Since the dashes have a fixed lenght, twice many dashes now fit along the length of the link, so it looks like the dash frequency increases when viewing the nodes at the same size on screen.
Maybe we could pass a
dash_width
parameter into the shader, so we can easily calculate the length of the dashes taking the resolution scale into account. That would be similar to how it's already done with the link's thinkness.Do mind taking a look at that? I've spent many an hour in
gpu_shader_2D_nodelink_vert.glsl
and could not figure out what to change that would affect the dash width.Totally know that feeling from dealing with shaders. I got something working that should be good enough to get an impression.
After some recent changes to OpenGL I can't actually run main blender on my (very old) macbook anymore, so I won't be able to make a PR before I've sorted that out. But the attached diff compiles on main and should give results like in the screenshots below.
I kept the current line thickness and dash spacing just to see if that is still readable enough.
One thing I noticed is that, while the dash spacing now works ok on higher resolution scales, the line thickness is still a bit inconsistent and the sides of the links get very blurry. So still room for improvement.
UI: Node Dashed Lines Readabilityto WIP: UI: Node Dashed Lines ReadabilityYes, while playing with this I could get something I liked at 1.0 resolution scale that worked as the 2D zoom was changed. But as soon as I change the UI resolution to 2.0 the line widths and thickness then looked wonky. I couldn't get any combination that looked good regardless of zoom and scale.
For the opacity, the first version was 0/1 like this, but we changed it to its current state so it's less distracting. The idea is to reduce the amount of noise when there are tons of these links, possibly even overlapping. It may not work great for everyone though, so maybe it should be tunable.
The problem really isn't the amount of gap in the dash or how transparent the gap is, and changing this was just a (failed) attempt to make it more readable.
The central issue is really the width of the dashed lines and the number of of them between any two points. Although this looks okay on regular monitors it doesn't scale up correctly on high-dpi monitors, like those typically found now on Macs. On those systems the lines stay narrow and the gaps between the dashes get tiny.
I have yet to find a way to change the shader to work as I would like and am now just hoping Leon has better luck.
I think I've now managed to get the links to display completely consistent independent of the resoultion scale. This should already help with the dashes on high-dpi monitors.
I also tried to improve the readability of the dashed lines in general, but it seems like a hard thing to really get right.
One approach I found promising is to keep the size of the dashes constant in screen space, to sidestep the issue of the dashes becoming too small, which is hard to avoid considering the range of zoom in the node editor:
I've only got a hacky prototype, but blending between different sizes of the dash pattern based on the zoom seems to work pretty well - similarly to the dot grid in the background.
It can look a bit trippy when focusing on it during zooming (first video), but if found that in practice you're usually zooming in bursts which makes the blending not that noticable (second video).
I find it increases the readability of the dashed links quite a lot when zoomed out, so I'm curious about your thoughts.
Hey that does seem nicer. So glad you have been working on this.
Although it is just better for these to be more readable, my own primary concern is really about how they look on retina displays. So how these look at various zoom levels while also having the Preferences / Resolution Scale set to 2.0 (assuming you have a regular monitor yourself). Set like that we are trying to have all features (line width, gaps between, etc) no smaller than 2 pixels. Bonus point if the features get even larger with "Line Width" set to "Thick" lines (feature size of U.pixelsize). We have some users with eyesight impairment who find this quite important so this is an accessibility issue.
Once you have a PR to test we can make some test builds and let them test it.
Great to have all that spelled out so clearly. Will look into that and get things ready for testing. I have a day off on friday, so probably then.
Closing. Leon has a better solution, now merged. #111270
Pull request closed