GPencil: SVG exporter generates wrong stroke thickness #103061
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#103061
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 526.86
Blender Version
Broken: version: 3.3.1, branch: master, commit date: 2022-10-04 18:35, hash:
b292cfe5a9
Worked: (newest version of Blender that worked as expected)
Short description of error
SVG seems to allays export a single thickness, while in the Blend file there's different thicknesses.
World space lineart apparently attempts to emulate the shrinking line width of the camera angle by exporting each segment with a different line weight. This makes post processing in Illustrator/Designer/Inkscape near impossible.
Screen space lineart should then instead produce a constant line width according to the displayed line thickness. Unfortunately, with screen space on, that seems to get ignored on SVG export.
Exact steps for others to reproduce the error
lineart.blend
Added subscriber: @RobertS
Added subscriber: @OmarEmaraDev
Changed status from 'Needs Triage' to: 'Needs User Info'
I can't reproduce that, all lines have constant thickness for me. Can you attach the svg itself?
I think you misunderstood. The bug IS that the SVG has a single thickness, while in the Blend file there's two different thicknesses.
Changed status from 'Needs User Info' to: 'Needs Triage'
Added subscriber: @mano-wii
Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Thickness is in pixels, and thus depends on the resolution of the final image.
It is a subject of discussion. See for example #100595 (Line Art Thickness doesn't consider Render Resolution Percentage)
But I can notice that the thicknesses are always "normalized" even with the option "Normalize" in the export settings disabled.
This happens because apparently
BKE_gpencil_stroke_is_pressure_constant()
always returnstrue
.{https://developer.blender.org/diffusion/B/browse/master/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc$204-205}
I don't know if this is intentional. This seems to make the Normalize option useless.
Lineart doesn't export line weights in screen space to SVGto Exporter 'Grease Pencil as SVG' always normalize stroke thicknessAdded subscriber: @antoniov
@mano-wii The normalization is done if all points of the stroke have the same pressure. This is done because the PDF export lib can handle a maximum number of thickness change and the export function tries to reduce the thickness changes. (SVG export works similar to PDF) If the pressure is equal in all points, then thickness is equal for all strokes, so I don't see a problem in the export itself, but the generated stroke... maybe LineArt is doing something to simulate the pressure change but without changing the pressure.
Anyway, I will take a look.
I have been testing and the scene contains 3 strokes with all points with same pressure, so the auto-normalization is correct. What I have seen is that the thickness of the strokes is 2 or 5 pixels and this is a very thin lines, so when you export the precission of the calculations to determine the thickness gets in all cases 2...if you add a Thickness modifier on top of the Lineart, you will see that all is working in SVG and PDF.
Note: I applied the Lineart modifer and separete the strokes to make easy the debug.
@RobertS What is the resolution of your screen?
This issue was referenced by
94e7e83cd9
This issue was referenced by
85a743e08b
Changed status from 'Needs Developer To Reproduce' to: 'Resolved'
Exporter 'Grease Pencil as SVG' always normalize stroke thicknessto GPencil: SVG exporter generates wrong stroke thickness