GPencil: Screen-space stroke size incorrect #83675

Open
opened 2020-12-11 19:35:06 +01:00 by Jamell Moore · 6 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTS 450/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 391.35

Blender Version
Broken: version: 2.92.0 Alpha
Worked: none found

Description

When drawing a stroke with a defined pixel size and stroke-thickness-space is set to screen space, the radius of the drawn stroke should measure the set pixel size. This is not the case. The strokes radius measures half the size.

Steps to reproduce

  • Create a grease pencil object
  • Set the stroke-thickness-space to screen space in objects grease pencil settings
  • Set the brush size to 100px
  • Draw a single dot.
  • Print the screen
  • Measure the dot size in any image editing app.

You will see that the radius of measures 50px and the diameter measures 100px. Instead of 100px and 200px respectively.

This issue can be further seen by trying to change the brush size using the f key. The brush size cursor is drawn at the correct size but is double the size of the stroke.

Investigations

This relates to my original report #82707 wherein I thought the cursor size was incorrect. I have now had time to review the code enough to understand how the cursor is drawn; and how the brush size is defined and passed to the rendering engine.

I have confirmed that the brush size takes the following path.

Brush.size user setting: RADIUS → bGPDstroke.thickness: RADIUS → gpencil_vert.glsl thickness: RADIUS

Simplified for explanation purposes. Path steps missing.

I originally thought thickness was defined as a diameter but this is not the case.

I also thought this would be a noticeable fix but I haven’t found where the issue lie yet so I thought I would report again.

Note: When drawing a stroke with stroke-thickness-space set to world space the stroke is mapped to the users screen correctly. When world space is used a stroke with a brush size of 2000px is drawn with a radius of 1m in world space as defined internally.

Bug-GPencil-Screen-Space-Stroke-Size-Incorrect-Report-VID.mp4

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce GTS 450/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 391.35 **Blender Version** Broken: version: 2.92.0 Alpha Worked: none found **Description** When drawing a stroke with a defined pixel size and stroke-thickness-space is set to screen space, the radius of the drawn stroke should measure the set pixel size. This is not the case. The strokes radius measures half the size. **Steps to reproduce** - Create a grease pencil object - Set the stroke-thickness-space to screen space in objects grease pencil settings - Set the brush size to 100px - Draw a single dot. - Print the screen - Measure the dot size in any image editing app. # You will see that the radius of measures 50px and the diameter measures 100px. Instead of 100px and 200px respectively. This issue can be further seen by trying to change the brush size using the `f` key. The brush size cursor is drawn at the correct size but is double the size of the stroke. **Investigations** This relates to my original report #82707 wherein I thought the cursor size was incorrect. I have now had time to review the code enough to understand how the cursor is drawn; and how the brush size is defined and passed to the rendering engine. I have confirmed that the brush size takes the following path. Brush.size user setting: RADIUS → bGPDstroke.thickness: RADIUS → gpencil_vert.glsl thickness: RADIUS *Simplified for explanation purposes. Path steps missing.* I originally thought thickness was defined as a diameter but this is not the case. I also thought this would be a noticeable fix but I haven’t found where the issue lie yet so I thought I would report again. Note: When drawing a stroke with stroke-thickness-space set to world space the stroke is mapped to the users screen correctly. When world space is used a stroke with a brush size of 2000px is drawn with a radius of 1m in world space as defined internally. [Bug-GPencil-Screen-Space-Stroke-Size-Incorrect-Report-VID.mp4](https://archive.blender.org/developer/F9503154/Bug-GPencil-Screen-Space-Stroke-Size-Incorrect-Report-VID.mp4)
Author

Added subscriber: @JamellMoore

Added subscriber: @JamellMoore

Added subscriber: @AdamEarle

Added subscriber: @AdamEarle

I wonder if this was set up for working through the camera? have you checked that?

I wonder if this was set up for working through the camera? have you checked that?

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

At first it seems to be a problem with just the name "Radius" which should be "Diameter". But the fact that the brush size shown when clicking F is twice as large reveals that there is an inconsistency.
So I am confirming it as a Bug.

At first it seems to be a problem with just the name "Radius" which should be "Diameter". But the fact that the brush size shown when clicking F is twice as large reveals that there is an inconsistency. So I am confirming it as a Bug.
Philipp Oeser removed the
Interest
Grease Pencil
label 2023-02-09 15:19:43 +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
3 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#83675
No description provided.