GPencil: Improve Sculpt Masking #101167

Open
opened 5 months ago by antoniov · 12 comments
Collaborator

Julien Kaspar wrote (copied from chat):

I checked out D14589 GPencil: New Automasking Strokes for Sculpt recently.
I think this feature could use some needed improvements to make it more consistent and just as useful as the mesh sculpt mode auto-masking options:

First off, "Stroke" auto-masking requires too much precisions. You need to click direclty on the stroke to make the brush have an effect. It would be better if the nearest stroke to the cursor position would be detected, similar to selecting.

"Layer" and "Material" auto-masking does not at all behave like auto-masking. Currently when these options are enabled it will look at which layer/material is active and will only affect those.
But auto-masking should not work based on any active layer or material, but instead based on what is under the cursor when the stroke is started. It is a feature to dynamically auto-mask areas of the object on each stroke, not a static mask that you set beforehand.
Also, the use case of the current auto-masking behaviour was already covered with auto-locking layers and selecting all strokes of a material.
I suggest to change the behaviour to make it more consistent with mesh sculpt mode auto-masking.

Lastly, the auto-masking toggles are right right now only presented as brush options. While mesh sculpt mode also has them as brush options, it is not the primary intended way to use this feature! The brush auto-masking is purely to define a custom brush preset. It's a corner case feature.
The proper way to access and toggle auto-masking options is via the Alt A pie menu, to toggle them for the entire sculpt mode.
This way any brush or tool is able to use auto-masking and it's very convenient to toggle on/off.
The way it currently behaves in grease pencil forces the user to toggle the auto-masking options for each brush individually, which ends up being tedious and leads to many auto-masking toggles left enabled accidental when switching brushes.
I don't have a good suggestion for a pie menu shortcut at the moment since Alt A is already taken. I also noticed that there are no mode "Options" in grease pencil, like in mesh sculpt mode.

I would like to create a task to add the mode auto-masking options to the center of the header, in both grease pencil and mesh sculpt mode to make them more accessible in both modes and present them as the primary way to use auto-masking.

image.png

More information about the layout design here: #101593

Automasking

  • Move Automasking to GPencil global area.
  • Add new Automasking by Stroke Layer.
  • Add new Automasking by Stroke Material.

Unified

  • Create new unified struct.
Julien Kaspar wrote (copied from chat): I checked out [D14589](https://archive.blender.org/developer/D14589) GPencil: New Automasking Strokes for Sculpt recently. I think this feature could use some needed improvements to make it more consistent and just as useful as the mesh sculpt mode auto-masking options: First off, "Stroke" auto-masking requires too much precisions. You need to click direclty on the stroke to make the brush have an effect. It would be better if the nearest stroke to the cursor position would be detected, similar to selecting. "Layer" and "Material" auto-masking does not at all behave like auto-masking. Currently when these options are enabled it will look at which layer/material is active and will only affect those. But auto-masking should not work based on any active layer or material, but instead based on what is under the cursor when the stroke is started. It is a feature to dynamically auto-mask areas of the object on each stroke, not a static mask that you set beforehand. Also, the use case of the current auto-masking behaviour was already covered with auto-locking layers and selecting all strokes of a material. I suggest to change the behaviour to make it more consistent with mesh sculpt mode auto-masking. Lastly, the auto-masking toggles are right right now only presented as brush options. While mesh sculpt mode also has them as brush options, it is not the primary intended way to use this feature! The brush auto-masking is purely to define a custom brush preset. It's a corner case feature. The proper way to access and toggle auto-masking options is via the Alt A pie menu, to toggle them for the entire sculpt mode. This way any brush or tool is able to use auto-masking and it's very convenient to toggle on/off. The way it currently behaves in grease pencil forces the user to toggle the auto-masking options for each brush individually, which ends up being tedious and leads to many auto-masking toggles left enabled accidental when switching brushes. I don't have a good suggestion for a pie menu shortcut at the moment since Alt A is already taken. I also noticed that there are no mode "Options" in grease pencil, like in mesh sculpt mode. I would like to create a task to add the mode auto-masking options to the center of the header, in both grease pencil and mesh sculpt mode to make them more accessible in both modes and present them as the primary way to use auto-masking. ![image.png](https://archive.blender.org/developer/F13506671/image.png) More information about the layout design here: #101593 **Automasking** - [ ] Move Automasking to GPencil global area. - [ ] Add new Automasking by Stroke Layer. - [ ] Add new Automasking by Stroke Material. **Unified** - [ ] Create new unified struct.
Poster
Collaborator

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

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

Added subscriber: @antoniov

Added subscriber: @antoniov
Poster
Collaborator

Added subscribers: @JulienKaspar, @mendio, @pepe-school-land

Added subscribers: @JulienKaspar, @mendio, @pepe-school-land
Poster
Collaborator

Stroke" auto-masking requires too much precisions. You need to click direclty on the stroke to make the brush have an effect. It would be better if the nearest stroke to the cursor position would be detected, similar to selecting.

I can try to improve that.

About Automasking Layers and Materials, IMHO we would need both options: Active Layer/Material and Stroke Layer/Material... I mean, sometimes is good to masking the active layer, but your idea is add a new type to use the layer of the stroke below the cursor...the same for materials, so we will add 2 new modes.

the way it currently behaves in grease pencil forces the user to toggle the auto-masking options for each brush individually

This a known limitation in Gpencil...we haven't a shared settings (global) as you have in mesh sculpt where you have a brush settings, but also a global settings. The same problem you talked about is for size too. We could try to move to a shared place the automasking as you propose.

> Stroke" auto-masking requires too much precisions. You need to click direclty on the stroke to make the brush have an effect. It would be better if the nearest stroke to the cursor position would be detected, similar to selecting. I can try to improve that. About Automasking Layers and Materials, IMHO we would need both options: Active Layer/Material and Stroke Layer/Material... I mean, sometimes is good to masking the active layer, but your idea is add a new type to use the layer of the stroke below the cursor...the same for materials, so we will add 2 new modes. > the way it currently behaves in grease pencil forces the user to toggle the auto-masking options for each brush individually This a known limitation in Gpencil...we haven't a shared settings (global) as you have in mesh sculpt where you have a brush settings, but also a global settings. The same problem you talked about is for size too. We could try to move to a shared place the automasking as you propose.

Added subscriber: @hamza-el-barmaki

Added subscriber: @hamza-el-barmaki
Collaborator

Adding two more auto-maskign options sounds fine. I just wonder if it makes more sense to use the already existing "Auto-Lock" feature for layers.
The same feature could be introduced for materials as well.

Once there are global auto-masking options I think grease pencil also needs a pie menu to access them. In mesh sculpt mode we use Alt A.
I have an idea how we can make the Alt + A shortcut availbile for grease pencil sculpt mode:

gp_sculpt_mode_selection.mp4

Here are some flow maps showing the issue of the De-/ Select All oeprators in sculpt mode.

This is a visualisation of the current use of the shortcuts. Note that Selecting All and toggling the selection mode off has the same effect.
Meanwhile Deselecting All will lead to the undesireable effect of not being able to do anything.
Current Flow.png

If we instead use A to toggle the current selection mode we get the same effect within sculpt mode, only faster in just one step.
This also opens up the shortcut Alt A for future global auto-masking.
Proposed Flow.png

We could even expand like with mesh sculpt mode by using a pie menu for the A shortcut.
This pie mneu could make any selection operator very acessible like:

  • Select All
  • Deselect All
  • Invert Selection
  • Toggle Selection Mode

Proposed Flow with Pies.png

Adding two more auto-maskign options sounds fine. I just wonder if it makes more sense to use the already existing "Auto-Lock" feature for layers. The same feature could be introduced for materials as well. Once there are global auto-masking options I think grease pencil also needs a pie menu to access them. In mesh sculpt mode we use `Alt A`. I have an idea how we can make the `Alt + A` shortcut availbile for grease pencil sculpt mode: [gp_sculpt_mode_selection.mp4](https://archive.blender.org/developer/F13514912/gp_sculpt_mode_selection.mp4) Here are some flow maps showing the issue of the De-/ Select All oeprators in sculpt mode. This is a visualisation of the current use of the shortcuts. Note that Selecting All and toggling the selection mode off has the same effect. Meanwhile Deselecting All will lead to the undesireable effect of not being able to do anything. ![Current Flow.png](https://archive.blender.org/developer/F13514976/Current_Flow.png) If we instead use `A` to toggle the current selection mode we get the same effect within sculpt mode, only faster in just one step. This also opens up the shortcut `Alt A` for future global auto-masking. ![Proposed Flow.png](https://archive.blender.org/developer/F13514931/Proposed_Flow.png) We could even expand like with mesh sculpt mode by using a pie menu for the `A` shortcut. This pie mneu could make any selection operator very acessible like: - Select All - Deselect All - Invert Selection - Toggle Selection Mode ![Proposed Flow with Pies.png](https://archive.blender.org/developer/F13514933/Proposed_Flow_with_Pies.png)
Poster
Collaborator

I have been looking at the code and it's possible to reuse the unified size and strength already in place for Mesh Sculpt brushes. If we reuse this, we could use the same size for all Draw and Sculpt grease pencil brushes. My only concern is that this also will affect on the Mesh Sculpt brush size... I mean, if you change the size of the brush in GPerncil Sculpt, when you use a Mesh Sculpt brush, you will get the same size. Same for strength.

About the masking options, if we start using unified settings, we could move the actual masking options to the unified structure. Will we have to keep the masking at the Brush level, or can we consider these options "global"?

I have been looking at the code and it's possible to reuse the unified size and strength already in place for Mesh Sculpt brushes. If we reuse this, we could use the same size for all Draw and Sculpt grease pencil brushes. My only concern is that this also will affect on the Mesh Sculpt brush size... I mean, if you change the size of the brush in GPerncil Sculpt, when you use a Mesh Sculpt brush, you will get the same size. Same for strength. About the masking options, if we start using unified settings, we could move the actual masking options to the unified structure. Will we have to keep the masking at the Brush level, or can we consider these options "global"?
Collaborator

Added subscriber: @JosephEagar

Added subscriber: @JosephEagar
Collaborator

Here's my view on the "Unfiied" setting for brushes: We should make this setting eventually as mode specific as possible.
Meaning that each mode in each object type has its own unified value for settings.

This will for example ensure a unified size or strenght among different brushes within Draw mode, but in a different unfiied size & strenght for Weight painting.
Each mode has a very different requirement for these settings, so it makes sense to keep them independent.

This goes against the current design so we should discuss this in more detail.
@JosephEagar also had interest in adressing Unified setting issues, so he might be willing to share his take on the issues or help out.

Here's my view on the "Unfiied" setting for brushes: We should make this setting eventually as mode specific as possible. Meaning that each mode in each object type has its own unified value for settings. This will for example ensure a unified size or strenght among different brushes within Draw mode, but in a different unfiied size & strenght for Weight painting. Each mode has a very different requirement for these settings, so it makes sense to keep them independent. This goes against the current design so we should discuss this in more detail. @JosephEagar also had interest in adressing Unified setting issues, so he might be willing to share his take on the issues or help out.
Collaborator

For auto-masking specifically I'd still prefer we also include global toggles that are not part of the brush settings.
IMO that would be more useful and consistent.

For auto-masking specifically I'd still prefer we also include global toggles that are not part of the brush settings. IMO that would be more useful and consistent.
Poster
Collaborator

If we decide to split the unified settings for Grease Pencil, then automasking is not a problem. If we decide to reuse existing struct, then we can add the automasking in this struct too, but will not be visible in any non GPencil brush or we can put in a different place and don't use the unified struct for automasking.

In both cases, automasking would be a global toggle option.

If we decide to split the unified settings for Grease Pencil, then automasking is not a problem. If we decide to reuse existing struct, then we can add the automasking in this struct too, but will not be visible in any non GPencil brush or we can put in a different place and don't use the unified struct for automasking. In both cases, automasking would be a global toggle option.
Poster
Collaborator

To not blocking this task, we can start moving automasking to a shared place and make it global. Actually, we have already a global setting for all sculpt gpencil brushes, so we can move the automasking there. After moving in a patch, the next patch is add new automasking modes.

Later, we can follow with the unified size and strength, but this need more discussions because it can affect other areas of Blender.

To not blocking this task, we can start moving automasking to a shared place and make it global. Actually, we have already a global setting for all sculpt gpencil brushes, so we can move the automasking there. After moving in a patch, the next patch is add new automasking modes. Later, we can follow with the unified size and strength, but this need more discussions because it can affect other areas of Blender.
Sign in to join this conversation.
No Label
good first issue
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/2.81
legacy project/2.82
legacy project/2.83
legacy project/2.90
legacy project/2.91
legacy project/2.92
legacy project/3.0
legacy project/3.1
legacy project/3.2
legacy project/3.3
legacy project/Alembic
legacy project/Animation & Rigging
legacy project/Asset Browser
legacy project/Asset Browser (Archived)
legacy project/Asset Browser Project Overview
legacy project/Audio
legacy project/Automated Testing
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Blender Asset Bundle
legacy project/Code Quest
legacy project/Collada
legacy project/Compositing
legacy project/Core
legacy project/Cycles
legacy project/Datablocks and Libraries
legacy project/Dependency Graph
legacy project/Development Management
legacy project/Eevee
legacy project/EEVEE & Viewport
legacy project/Freestyle
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/Geometry Nodes
legacy project/Good First Issue
legacy project/GPU / Viewport
legacy project/Grease Pencil
legacy project/GSoC
legacy project/Images & Movies
legacy project/Import/Export
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Line Art
legacy project/Masking
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Modeling
legacy project/Modifiers
legacy project/Motion Tracking
legacy project/Nodes
legacy project/Nodes & Physics
legacy project/OpenGL Error
legacy project/Overrides
legacy project/Papercut
legacy project/Performance
legacy project/Physics
legacy project/Pipeline, Assets & I/O
legacy project/Platform: FreeBSD
legacy project/Platform: Linux
legacy project/Platform: macOS
legacy project/Platforms, Builds, Tests & Devices
legacy project/Platform: Windows
legacy project/Pose Library Basics
legacy project/Python API
legacy project/Render & Cycles
legacy project/Render Pipeline
legacy project/Retrospective
legacy project/Sculpt, Paint & Texture
legacy project/Text Editor
legacy project/Tracker Curfew
legacy project/Translations
legacy project/Triaging
legacy project/Undo
legacy project/USD
legacy project/User Interface
legacy project/UV Editing
legacy project/VFX & Video
legacy project/Video Sequencer
legacy project/Virtual Reality
legacy project/Wintab High Frequency
migration/requires-manual-verification
Module › Animation & Rigging
Module › Core
Module › Development Management
Module › Eevee & Viewport
Module › EEVEE & Viewport
Module › Grease Pencil
Module › Modeling
Module › Nodes & Physics
Module › Pipeline, Assets & IO
Module › Platforms, Builds Tests & Devices
Module › Platforms, Builds, Tests & Devices
Module › Python API
Module › Rendering & Cycles
Module › Sculpt, Paint & Texture
Module › Triaging
Module › User Interface
Module › VFX & Video
papercut
performance
Priority › High
Priority › Low
Priority › Normal
Priority › Unbreak Now!
Status › Archived
Status › Confirmed
Status › Duplicate
Status › Needs Information 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#101167
Loading…
There is no content yet.