VSE shading mode ignores Grease Pencil Vertex colors #86956
Labels
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
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & 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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#86956
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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: Darwin-20.3.0-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 5500M OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.2.15
Blender Version
Broken: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash:
02948a2cab
Worked: N.A.
Short description of error
If a blender scene is added in the VSE, the shading mode is respected for 3D objects vertex colors but not for GP objects
Exact steps for others to reproduce the error
Open the attached blender file and switch between the "3D" scene and "EDIT" scene. In the 3d viewport of 3D scene both the cube and the grease pencil stroke are shaded correctly, in the VSE EDIT scene the cube shows the correct vertex colors and the GP is flat shaded without colors.
Side Note: using the "override scene settings" and forcing the workbench engine on the EDIT scene to respect vertex color and flat shade, makes no difference.
LINKED_GP_VSE_SCENE.blend
GP_issue_VSE.mov
Added subscriber: @icappiello
Added subscribers: @Jeroen-Bakker, @antoniov
Added subscriber: @lichtwerk
Changed status from 'Needs Triage' to: 'Needs User Info'
To make sure we are all on the same page (and speed up the triaging/fixing process), please always provide the example .blend file where this happens.
@lichtwerk Sorry! The blend upload failed. should be fixed now.
Changed status from 'Needs User Info' to: 'Needs Triage'
Added subscriber: @mano-wii
Changed status from 'Needs Triage' to: 'Confirmed'
I can confirm.
The Grease Pencil object, which should be green, is white in the VSE.
Will assign this issue to me to investigate next week. Not sure about the cause and not really familiar GP code base.
@Jeroen-Bakker Let me know if you need my help.
My guess is the problem looks related to how the shading Solid mode is used in the Linked scene. In the original, the shading is
Solid->Vertex
, but in the linked, it looksSolid->Single
and it's not using the original scene setup.This issue was referenced by
baa7a53974
This issue was referenced by
a20ef4207d
Narrowing down the issue is in a parameter used in the vertex shader. the finalColorAdd uses 1.0.
Seems like vertexColorOpacity contains an incorrect value (0 in stead of 1).
this is read from
pd->vertex_paint_opacity
which uses draw_ctx->v3d->overlay.gpencil_vertex_paint_opacity.This property isn't set when performing opengl rendering.
Finally...
root cause there is no known default for gpencil_vertex_paint_opacity.
Code is really confusing.
is_render in grease pencil means that it shading is in render mode. We cannot add exceptions there when rendering images as that would also intervene with viewport rendering where it is not expected.
although the comments says something else...
Added a hack...
Changed status from 'Confirmed' to: 'Resolved'
@antoniov please check my solution. It shows a design flaw in the grease pencil drawing. Question remains when to use which opacity setting. Current implementation might not match what users expect.
@Jeroen-Bakker I will check.
@Jeroen-Bakker It looks your fix is correct. The root cause is the versioning code is not fixing this value for some reason:
/* Init default Grease Pencil Vertex paint mix factor for Viewport. */
if (!DNA_struct_elem_find(
fd->filesdna, "View3DOverlay", "float", "gpencil_vertex_paint_opacity")) {
LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
if (sl->spacetype == SPACE_VIEW3D) {
View3D *v3d = (View3D *)sl;
v3d->overlay.gpencil_vertex_paint_opacity = 1.0f;
}
}
}
}
}````
When overriding in a scene you don't have the overlay options. previously when creating a new 3d view the defaults were not set. But that is not related to this issue. I just fixed it as I came across it.
The second commit is the hacky fix. Personally I find this part of the code/design does not communicate when which vertex paint opacity should be used, there are just to many exceptions.