Grease Pencil depth merge is broken when multiple GP objects are displayed in viewport #102308
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#102308
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 11
CPU:
AMD Ryzen Threadripper 3990X
Graphics card:
NVIDIA GeForce RTX 3080
Also tested on
Operating system:
macOS Monterey 12.5
Machine:
MacBook Pro M1 (16-inch, 2021)
Blender Version
Broken: 3.5.0
4a313b8252
2022-11-04 22:28Also broken in 3.1.0
c77597cd0e
2022-03-08 18:16, so this is a longstanding issue.Short description of error
Creating multiple GP objects with "Stroke Depth Order: 3D Location" causes the GP objects to reorder randomly in the viewport.
Sometimes, an object will be partially shown behind/in front of another object.
Video of the issue:
https://dl.dropboxusercontent.com/s/upg3rx1yjxdm1fy/GUsPz2Qo.webm
Exact steps for others to reproduce the error
Technical exploration & possible fix
I am not well-versed in Blender internals at all, but here is my analysis:
Using RenderDoc, it appears that the depth merge pass (draw pass
merge_depth_ps
) does not work correctly:Source depth texture: https://dl.dropboxusercontent.com/s/0pjjai3mz2cl8s9/4hcRr0rQ.png
Output framebuffer: https://dl.dropboxusercontent.com/s/2mtur25jmkykbf8/eSt7UkHy.png
Also, the output from the VS stage for this pass doesn't seem correct at all.
Looking at the vertex shader for this pass (
gpencil_depth_merge_vert.glsl
):I suspect there is an optimization going on so only the area covered by the GP object needs to have its depth merged.
However, changing this to the following seems to fix the issue (i.e. switching to a fullscreen triangle):
Here is a video showing the fixed depth merge pass:
https://dl.dropboxusercontent.com/s/gq33i9ofjbj9y7c/SoCkR0XU.webm
I'm sure I'm missing the full picture, but at least this fixes things for this .blend file.
Added subscriber: @Mathias-Kaerlev
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscribers: @antoniov, @fclem
Added subscriber: @PratikPB2123
Changed status from 'Confirmed' to: 'Resolved'
This is an asset issue. I guess this was auto-generated from other software?
The dimensions of your environment object are (x = 511.7, y = 19708816.0, z = 6.7).
This was also causing the viewport navigation to behave incorrectly.
Selecting only the visible strokes and deleting the others results in correct behavior. gp_depth_bug.blend
Changed status from 'Resolved' to: 'Archived'