Fix GPv3 conversion 'thickness adjustment' not clamping radius to 0. #120840

Merged
Falk David merged 1 commits from mont29/blender:tmp-gpv3-conversion-radius-modifiers into main 2024-04-22 15:03:17 +02:00

Legacy GPv2 code seems to clamp the final computed radius to 0 (at
least in some cases, see e.g. line 3992 in
gpencil_stroke_perimeter_ex).

Add a clamping node to the generated geometry node used to mimmic the
legacy thickness adjustment in GPv3 converted data.

NOTE: There are still some artifacts in testfile used to investigate
this issue ((Anim) 10 Picknick by Susanne Weise.blend), that looks
like invalid radius handling on some curves ends... Clamping may be
needed in other places maybe?


GPv2, blender 4.0-saved testing file (modified from original):

GPv2 as rendered by 4.0 release:

image

GPv3 as rendered by current main:

image

GPv3 as rendered by this patch:

image


Difference between 4.0/gpv2 render and main/gpv3 render:

image

Difference between 4.0/gpv2 render and this PR/gpv3 render:

image

Legacy GPv2 code seems to clamp the final computed radius to `0` (at least in some cases, see e.g. line 3992 in `gpencil_stroke_perimeter_ex`). Add a clamping node to the generated geometry node used to mimmic the legacy thickness adjustment in GPv3 converted data. NOTE: There are still some artifacts in testfile used to investigate this issue (`(Anim) 10 Picknick by Susanne Weise.blend`), that looks like invalid radius handling on some curves ends... Clamping _may_ be needed in other places maybe? ----------------- GPv2, blender 4.0-saved testing file (modified from original): GPv2 as rendered by 4.0 release: ![image](/attachments/26eb1dc1-39df-49a7-911b-560d53abe969) GPv3 as rendered by current main: ![image](/attachments/7bd1ac81-07ed-46d0-9450-73ab957a78c2) GPv3 as rendered by this patch: ![image](/attachments/7309039b-9352-4815-bef8-bd141245dffc) --------------- Difference between 4.0/gpv2 render and main/gpv3 render: ![image](/attachments/3e5080d1-ecc2-429c-a1ef-cd29aee65bfb) Difference between 4.0/gpv2 render and this PR/gpv3 render: ![image](/attachments/14f33b4d-a782-4a9a-9ba2-b8b04eb5620f)
Bastien Montagne added 1 commit 2024-04-19 19:08:31 +02:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-windows-amd64 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-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
52ac3aa717
Fix GPv3 conversion 'thickness adjustment' not clamping radius to 0.
Legacy GPv2 code seems to clamp the final computed radius to `0` (at
least in some cases, see e.g. line 3992 in
`gpencil_stroke_perimeter_ex`).

Add a clamping node to the generated geometry node used to mimmic the
legacy thickness adjustment in GPv3 converted data.

NOTE: There are still some artifacts in testfile used to investigate
this issue (`(Anim) 10 Picknick by Susanne Weise.blend`), that looks
like invalid radius handling on some curves ends... Clamping _may_ be
needed in other places maybe?
Author
Owner

@blender-bot build

@blender-bot build
Bastien Montagne requested review from Lukas Tönne 2024-04-19 19:28:46 +02:00
Bastien Montagne requested review from Falk David 2024-04-19 19:28:46 +02:00
Bastien Montagne added this to the Grease Pencil project 2024-04-19 19:28:53 +02:00
Lukas Tönne approved these changes 2024-04-20 09:19:45 +02:00
Bastien Montagne force-pushed tmp-gpv3-conversion-radius-modifiers from 52ac3aa717 to 2aa1a1e488 2024-04-20 17:23:07 +02:00 Compare
Author
Owner

@blender-bot build

@blender-bot build
Author
Owner

NOTE: there may be other places that need clamping thickness/radius to 0 too (looking at some remaining artifacts in PR render above, compared to 4.0/GPv2, e.g. the tip of some of the grass strokes...).

NOTE: there may be other places that need clamping thickness/radius to 0 too (looking at some remaining artifacts in PR render above, compared to 4.0/GPv2, e.g. the tip of some of the grass strokes...).
Falk David approved these changes 2024-04-22 12:15:01 +02:00
Falk David left a comment
Member

Thanks for looking into this!

Thanks for looking into this!
Falk David merged commit fc08f7491e into main 2024-04-22 15:03:17 +02:00
Sign in to join this conversation.
No reviewers
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#120840
No description provided.