Gpencil: Lineart not evaluating grease pencil geometry nodes mesh properly #128426

Closed
opened 2024-10-01 14:40:32 +02:00 by Aleš Jelovčan · 6 comments

System Information
Operating system: Windows-10-10.0.22631-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4090 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 561.09

Blender Version
Broken: version: 4.3.0 Alpha, branch: main, commit date: 2024-09-30 15:04, hash: 70cdfabf795f
Worked: /
Short description of error
Lineart modifier is not properly updated when geometry changes in GP object outputting mesh with geometry nodes.
Also this setup crashes a lot.
If we change parameters on the lineart modifier, for example Thickness, the lines appear.
image
Exact steps for others to reproduce the error
See file attached

**System Information** Operating system: Windows-10-10.0.22631-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 4090 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 561.09 **Blender Version** Broken: version: 4.3.0 Alpha, branch: main, commit date: 2024-09-30 15:04, hash: `70cdfabf795f` Worked: / **Short description of error** Lineart modifier is not properly updated when geometry changes in GP object outputting mesh with geometry nodes. Also this setup crashes a lot. If we change parameters on the lineart modifier, for example Thickness, the lines appear. <img width="821" alt="image" src="attachments/7619f2bc-337d-43f3-bd0b-868b31930f05"> **Exact steps for others to reproduce the error** See file attached
Aleš Jelovčan added the
Type
Bug
Severity
Normal
Status
Needs Triage
labels 2024-10-01 14:40:32 +02:00
Member

Hi, can confirm. Just scene line art is failing. Collection/object source types are drawing outline around evaluated stroke object
My bad, I didn't read: "If we change parameters on the lineart modifier, for example Thickness, the lines appear."
cc @ChengduLittleA

Hi, can confirm. ~~Just scene line art is failing. Collection/object source types are drawing outline around evaluated stroke object~~ My bad, I didn't read: "If we change parameters on the lineart modifier, for example Thickness, the lines appear." cc @ChengduLittleA
Pratik Borhade added
Module
Grease Pencil
Status
Confirmed
and removed
Status
Needs Triage
labels 2024-10-02 05:33:46 +02:00
Member

Lineart modifier is not properly updated when geometry changes in GP object outputting mesh with geometry nodes.

I guess we need to add dependency to those objects (Need investigation, may need some workarounds)

Also this setup crashes a lot.

ehhh I'll have to reproduce this in a bit.

> Lineart modifier is not properly updated when geometry changes in GP object outputting mesh with geometry nodes. I guess we need to add dependency to those objects (Need investigation, may need some workarounds) > Also this setup crashes a lot. ehhh I'll have to reproduce this in a bit.
Member

@frogstomp I think what I can do is add relation to grease pencil objects who has loadable geometry components in line art, however that would easily cause dependency cycle (like, what if you have a GN modifier on this line art object to generate some geometry from line art? And then line art should load itself? But in any case depsgraph would fail)

Another thing we could do is add an option in GPv3 objects that specifically allows them to be added as line art geometry source and that option would be ineffective for objects with line art modifiers, however this feels quite clumsy.

What if you could just bake geometry nodes into mesh array (is it possible atm?)

@frogstomp I think what I can do is add relation to grease pencil objects who has loadable geometry components in line art, however that would easily cause dependency cycle (like, what if you have a GN modifier on this line art object to generate some geometry from line art? And then line art should load itself? But in any case depsgraph would fail) Another thing we could do is add an option in GPv3 objects that specifically allows them to be added as line art geometry source and that option would be ineffective for objects with line art modifiers, however this feels quite clumsy. What if you could just bake geometry nodes into mesh array (is it possible atm?)
Member

@frogstomp one way to get around it is to do the GP->Mesh conversion inside another Mesh object (this mesh object essentially reads that GP object you want and do stuff in GN). This way line art can build dependencies correctly.

@frogstomp one way to get around it is to do the GP->Mesh conversion inside another _Mesh_ object (this mesh object essentially reads that GP object you want and do stuff in GN). This way line art can build dependencies correctly.
YimingWu added
Status
Needs Information from User
and removed
Status
Confirmed
labels 2024-10-07 15:53:22 +02:00
Author
Member

@ChengduLittleA I see and understand the problem. The thing is, that, lineart loads as expected, but does not register geometry changes, and the fix is to change lineart parameters. So I though something in lineart could just trigger update on every frame change.

The workaround works, thanks.

@ChengduLittleA I see and understand the problem. The thing is, that, lineart loads as expected, but does not register geometry changes, and the fix is to change lineart parameters. So I though something in lineart could just trigger update on every frame change. The workaround works, thanks.
Member

The thing is, that, line art loads as expected, but does not register geometry changes, and the fix is to change lineart parameters

The reason why it doesn't register changes is that line art does not tell depsgraph that it has dependency over that source GP object you are using (And creating that dependency logically won't really work under current code path and will lead to more problems). Technically whether line art loads that geometry is undefined as well for the moment.

The mesh workaround is currently the correct way to go and should not lead to any undefined behaviours. So will close this for now since it's a design limitation atm.

> The thing is, that, line art loads as expected, but does not register geometry changes, and the fix is to change lineart parameters The reason why it doesn't register changes is that line art does not tell depsgraph that it has dependency over that source GP object you are using (And creating that dependency logically won't really work under current code path and will lead to more problems). Technically whether line art loads that geometry is undefined as well for the moment. The mesh workaround is currently the correct way to go and should not lead to any undefined behaviours. So will close this for now since it's a design limitation atm.
Blender Bot added
Status
Archived
and removed
Status
Needs Information from User
labels 2024-10-08 03:43:43 +02:00
Sign in to join this conversation.
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
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#128426
No description provided.