Vertex Paint Viewport Overlays stencil mask not working #93129

Open
opened 2021-11-16 15:58:48 +01:00 by Royster · 8 comments

platform: Windows-10-10.0.19042-SP0
Graphics card: 1080

Broken: 3.1.0 Alpha

          commit date: 2021-11-14 00:26 hash: 7e82c840b7a4
          build date: 2021-11-15, 00:51:48

Worked: Has'nt worked for ages

Go to vertex paint mode, select some polys on a model.
Go to overlay options/vertexpaint/stencil mask opacity the slider does nothing to unselected polys overlay.

Overlays_Notworking.jpg

platform: Windows-10-10.0.19042-SP0 Graphics card: 1080 Broken: 3.1.0 Alpha ``` commit date: 2021-11-14 00:26 hash: 7e82c840b7a4 build date: 2021-11-15, 00:51:48 ``` Worked: Has'nt worked for ages Go to vertex paint mode, select some polys on a model. Go to overlay options/vertexpaint/stencil mask opacity the slider does nothing to unselected polys overlay. ![Overlays_Notworking.jpg](https://archive.blender.org/developer/F11815370/Overlays_Notworking.jpg)
Author

Added subscriber: @Royston

Added subscriber: @Royston
Member

Added subscribers: @Jeroen-Bakker, @lichtwerk

Added subscribers: @Jeroen-Bakker, @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Stencil Mask does not exist for Vertex Paint (it is only there for Texture Paint).
So that description is totally misleading.
And even if it was meant for something else: it has no effect.

I have already raised my concerns in 409d3f4880.

I think the conclusion at that point was to remove that slider all together, but it is still there.
If the intention was to affect the opacity of the painted vertex color [seems more like this was the case], then I am unsure why this fails:

  • pd->painting.alpha_blending (determined by paint_object_is_rendered_transparent) might never be true? (even forcing it to true has no effect

looking at this piece of code btw:

    case CTX_MODE_PAINT_VERTEX: {
      opacity = pd->overlay.vertex_paint_mode_opacity;
      if (opacity > 0.0f) {
        state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL;
        state |= pd->painting.alpha_blending ? DRW_STATE_BLEND_ALPHA : DRW_STATE_BLEND_MUL;
        DRW_PASS_CREATE(psl->paint_color_ps, state | pd->clipping_state);

        sh = OVERLAY_shader_paint_vertcol();
        pd->paint_surf_grp = grp = DRW_shgroup_create(sh, psl->paint_color_ps);
        DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo);
        DRW_shgroup_uniform_bool_copy(grp, "useAlphaBlend", true); //pd->painting.alpha_blending
        DRW_shgroup_uniform_float_copy(grp, "opacity", opacity);
      }
      break;
    }

I think this is something for @Jeroen-Bakker to rectify?

`Stencil Mask` does not exist for Vertex Paint (it is only there for Texture Paint). So that description is totally misleading. And even if it was meant for something else: it has no effect. I have already raised my concerns in 409d3f4880. I think the conclusion at that point was to remove that slider all together, but it is still there. If the intention was to affect the opacity of the painted vertex color [seems more like this was the case], then I am unsure why this fails: - `pd->painting.alpha_blending` (determined by `paint_object_is_rendered_transparent`) might never be true? (even forcing it to true has no effect looking at this piece of code btw: ``` case CTX_MODE_PAINT_VERTEX: { opacity = pd->overlay.vertex_paint_mode_opacity; if (opacity > 0.0f) { state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL; state |= pd->painting.alpha_blending ? DRW_STATE_BLEND_ALPHA : DRW_STATE_BLEND_MUL; DRW_PASS_CREATE(psl->paint_color_ps, state | pd->clipping_state); sh = OVERLAY_shader_paint_vertcol(); pd->paint_surf_grp = grp = DRW_shgroup_create(sh, psl->paint_color_ps); DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo); DRW_shgroup_uniform_bool_copy(grp, "useAlphaBlend", true); //pd->painting.alpha_blending DRW_shgroup_uniform_float_copy(grp, "opacity", opacity); } break; } ``` I think this is something for @Jeroen-Bakker to rectify?
Philipp Oeser changed title from Viewport Overlays stencil mask not working to Vertex Paint Viewport Overlays stencil mask not working 2021-11-17 11:40:03 +01:00
Author

Would be nice if you could change the opacity of the masked polys.
At the moment I keep having to turn off overlays to see what the color changes look like on the model as a whole.

Would be nice if you could change the opacity of the masked polys. At the moment I keep having to turn off overlays to see what the color changes look like on the model as a whole.
Author

Would be better if just the selected faces where highlighted around the edge.

Would be better if just the selected faces where highlighted around the edge.
Author

It has the effect of being in the way of being able to see what the rest of the model looks like.
It also effects color sampling (s key) as you cannot sample colors without hiding it.

It has the effect of being in the way of being able to see what the rest of the model looks like. It also effects color sampling (s key) as you cannot sample colors without hiding it.
Member

Added subscriber: @Matthew-Hinson

Added subscriber: @Matthew-Hinson
Philipp Oeser removed the
Interest
EEVEE & Viewport
label 2023-02-09 15:13:04 +01:00
Sign in to join this conversation.
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#93129
No description provided.