UI: Shadowed Text for GN Viewer Node Attribute and Bone Names #116528

Merged
Harley Acheson merged 11 commits from Julian-Plak/blender:readable-att-text into main 2024-01-31 19:21:59 +01:00
Contributor

image

PR to improve readability for attribute text in viewport (#115664)

features:

  • match Scene Statics color
  • Add text shadow
  • offset text to center on vertex

Proposed: readable white text with shaded background:
image

Note that this also adds shadow for "show bone names"

![image](/attachments/2e7b7e91-1f67-4e77-b3d7-ccc4dba205ab) --- PR to improve readability for attribute text in viewport (#115664) **features:** - [x] match `Scene Statics` color - [x] Add text shadow - [x] offset text to center on vertex --- Proposed: readable white text with shaded background: ![image](/attachments/f089fe0c-c68f-49b3-9053-854274374406) Note that this also adds shadow for "show bone names"
Julian-Plak added 1 commit 2023-12-25 10:08:45 +01:00
Julian-Plak added 1 commit 2023-12-25 10:24:58 +01:00
Julian-Plak added 1 commit 2023-12-25 11:09:12 +01:00
Julian-Plak changed title from WIP: Geometry Nodes: Attribute text readability to Geometry Nodes: Attribute text readability 2023-12-25 11:23:29 +01:00
Julian-Plak requested review from Jacques Lucke 2023-12-25 11:26:01 +01:00
Julian-Plak requested review from Hans Goudey 2023-12-25 11:26:01 +01:00
Julian-Plak changed title from Geometry Nodes: Attribute text readability to WIP: Geometry Nodes: Attribute text readability 2023-12-26 12:09:55 +01:00
Hans Goudey added this to the User Interface project 2024-01-19 19:50:08 +01:00
Harley Acheson added 2 commits 2024-01-19 21:41:46 +01:00
Harley Acheson added 1 commit 2024-01-19 21:44:53 +01:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
3c7fd01765
Comment change. Remove unintended format change.
Member

Love it.

I made small modifications to this, just because it was easier to iterate while this was loaded.

I altered it to use widgetlabel size rather than widget size. That way it changes as expected with the other overlay text, like statistics.

I altered it to align with the vertex both horizontally and vertically. Under the hood we measure both directions anyway, so there is no penalty in getting both values.

I moved some things around only slightly to keep your proposed changes together as much as possible.

I slightly altered the text shadow offset from 1, -1 to 0, -1. Basically this moves the shadow to the center horizontally, which gives it equal contrast on either side. This helps a bit in extreme circumstances like when over something very bright. Although the overall shadow a little less prominent, there is at least always contrast on the left side of stems.

The following is a blown-up animated gif showing centered versus off-center shadow.

shadow.gif

I think we should make this change for other text overlays.

Love it. I made small modifications to this, just because it was easier to iterate while this was loaded. I altered it to use widgetlabel size rather than widget size. That way it changes as expected with the other overlay text, like statistics. I altered it to align with the vertex both horizontally and vertically. Under the hood we measure both directions anyway, so there is no penalty in getting both values. I moved some things around only slightly to keep your proposed changes together as much as possible. I slightly altered the text shadow offset from `1, -1` to `0, -1`. Basically this moves the shadow to the center horizontally, which gives it equal contrast on either side. This helps a bit in extreme circumstances like when over something very bright. Although the overall shadow a little less prominent, there is at least always contrast on the left side of stems. The following is a blown-up animated gif showing centered versus off-center shadow. ![shadow.gif](/attachments/c1711041-c486-4462-9022-fb3b850ce284) I think we should make this change for other text overlays.
Member

@blender-bot build

@blender-bot build
Member

Great improvement! I like it that it matches the stats, so even though sometimes text is not 100% visible, the day we improve that it'll affect this as well.

Great improvement! I like it that it matches the stats, so even though sometimes text is not 100% visible, the day we improve that it'll affect this as well.
Member

Great improvement! I like it that it matches the stats, so even though sometimes text is not 100% visible, the day we improve that it'll affect this as well.

I will be posting a PR for that in a few minutes

> Great improvement! I like it that it matches the stats, so even though sometimes text is not 100% visible, the day we improve that it'll affect this as well. I will be posting a PR for that in a few minutes
Harley Acheson added 2 commits 2024-01-22 22:31:53 +01:00
Member

I updated this again to use the new shadowed text code. Have contrast like this now:

image

Looks good to me.

I updated this again to use the new shadowed text code. Have contrast like this now: ![image](/attachments/eaf8ec32-a107-4c40-80f0-5f089f0058d9) Looks good to me.
Hans Goudey approved these changes 2024-01-30 04:40:49 +01:00
Hans Goudey left a comment
Member

This looks so much better! Thanks Harley for looking into this!

This looks so much better! Thanks Harley for looking into this!
Hans Goudey changed title from WIP: Geometry Nodes: Attribute text readability to Geometry Nodes: Improve attribute text overlay readability 2024-01-30 04:41:05 +01:00
Member

@Harley Just to be sure, do you think this is in a good state to merge now? You know much more about the text related stuff than me.

@Harley Just to be sure, do you think this is in a good state to merge now? You know much more about the text related stuff than me.
Member

@Harley Just to be sure, do you think this is in a good state to merge now? You know much more about the text related stuff than me.

I thought so, but I should probably take another look in the morning and I can merge it.

> @Harley Just to be sure, do you think this is in a good state to merge now? You know much more about the text related stuff than me. I thought so, but I should probably take another look in the morning and I can merge it.
Harley Acheson requested review from Harley Acheson 2024-01-31 04:54:46 +01:00
Harley Acheson added 2 commits 2024-01-31 18:28:10 +01:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
552e8594aa
Shadowed on for all overlay text
Member

Took out the optional "shadowed" option since this can apply to all text overlays. Here showing bone name:

image

Took out the optional "shadowed" option since this can apply to all text overlays. Here showing bone name: ![image](/attachments/7f349f92-da58-4b10-8b2d-57044b8c33dd)
Member

@blender-bot build

@blender-bot build
Harley Acheson added 1 commit 2024-01-31 19:16:56 +01:00
Harley Acheson approved these changes 2024-01-31 19:18:51 +01:00
Member

@Julian-Plak

Thank you so much for this!

@Julian-Plak Thank you so much for this!
Harley Acheson merged commit 38e7b4e473 into main 2024-01-31 19:21:59 +01:00
Harley Acheson changed title from Geometry Nodes: Improve attribute text overlay readability to UI: Shadowed Text for GN Viewer Node Attribute and Bone Names 2024-01-31 19:25:11 +01:00
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
4 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#116528
No description provided.