Fix: GPv3: Outline perimeter cap radius too small when points are not coplanar #126687

Merged
Lukas Tönne merged 1 commits from LukasTonne/blender:gpv3-fix-outline-cap-radius into main 2024-08-23 14:24:55 +02:00
Member

Stroke outlines are used by modifiers, fill tool, exporters, etc. When
the input strokes are not co-planar (different depths from camera view)
the end caps have smaller radii than they should have.

When generating the outline caps the normal vector is created from
the point tangents in 2D (after projection). When points have different
depths (Z positions) the tangents have a non-zero Z component as well
and discarding it leaves them unnormalized, thereby scaling the radius
by an unwanted factor.

Normalizing the vector fixes the issue. Object scale is now also taken
into account.

Stroke outlines are used by modifiers, fill tool, exporters, etc. When the input strokes are not co-planar (different depths from camera view) the end caps have smaller radii than they should have. When generating the outline caps the normal vector is created from the point tangents in 2D (after projection). When points have different depths (Z positions) the tangents have a non-zero Z component as well and discarding it leaves them unnormalized, thereby scaling the radius by an unwanted factor. Normalizing the vector fixes the issue. Object scale is now also taken into account.
Lukas Tönne added 1 commit 2024-08-23 13:59:28 +02:00
When generating the outline caps the normal vector is created from
the point tangents in 2D (after projection). When points have different
depths (Z positions) the tangents have a non-zero Z component as well
and discarding it leaves them unnormalized, thereby scaling the radius
by an unwanted factor.
Lukas Tönne added this to the Grease Pencil project 2024-08-23 13:59:35 +02:00
Lukas Tönne requested review from Falk David 2024-08-23 13:59:47 +02:00
Author
Member

For illustration purposes, here's what the error looks like:
image

For illustration purposes, here's what the error looks like: ![image](/attachments/98a838ec-6d4a-4460-ae2a-b668973dda72)
Falk David approved these changes 2024-08-23 14:22:37 +02:00
Falk David left a comment
Member

Makes sense 👍

Makes sense 👍
Lukas Tönne merged commit e42b9a73be into main 2024-08-23 14:24:55 +02:00
Lukas Tönne deleted branch gpv3-fix-outline-cap-radius 2024-08-23 14:24:58 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
2 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#126687
No description provided.