GPencil: Add Holdout material option to open holes in filled areas #79878

Closed
opened 2020-08-18 12:30:30 +02:00 by Antonio Vazquez · 11 comments

Add an option to materials to be used as a masking. Any stroke that uses this material, will remove any stroke below and it will make it transparent. This is useful to open holes in filled areas.

This is a prerequisite for #79877

Add an option to materials to be used as a masking. Any stroke that uses this material, will remove any stroke below and it will make it transparent. This is useful to open holes in filled areas. This is a prerequisite for #79877
Antonio Vazquez self-assigned this 2020-08-18 12:30:30 +02:00
Author
Member

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

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

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

Added subscribers: @antoniov, @mendio, @pepe-school-land
Author
Member
[2020-07-21 11-33-57.mp4](https://archive.blender.org/developer/F8791132/2020-07-21_11-33-57.mp4)
Antonio Vazquez changed title from GPencil: Add masking material option to open holes in filled areas to GPencil: Add Holdout material option to open holes in filled areas 2020-09-17 19:47:25 +02:00

This issue was referenced by 0335c1fd21

This issue was referenced by 0335c1fd21dd49906968a2aa85b0016c8047f695
Author
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Author
Member

Done in 0335c1fd21

Done in 0335c1fd21dd

Added subscribers: @Antonio-29, @cadtofu

Added subscribers: @Antonio-29, @cadtofu

@antoniov Thank you a lot for a direct svg to gp importer. I tested it a lot these days.
It is great convinience to import svg assets into archviz scene now. Even the svg layers can be correctly imported as gp layers.
The main limitation I encountered is that hollow shape (ie, compound path made with boolean difference in Inkscape) cannot be implemented in grease pencil. I already see layer mask of grease pencil as your effort to solve this issue, but each hollow shape must be separated into 2 layers first which would make layer management a little tedious IMHO. So, I would rather like this new "Holdout material" a better solution for this issue, if only one separated layer works well.
For now, the holdout material can only affect whole GP object,. Could I suggest you add an option so that holdout only affect also a single GP layer. I believe this will add more use cases for it.
Below is my screenshot and mock-up UI suggestion. My intent is that glasses lenses should affect glasses frame, but donnot affect human face.
0_org-inkscape_g.jpg
2_gp-material-holdou_g.jpg
9_fake-ui_g.jpg
Please tell your considerations, thanks again.

Also the source svg file and object blend file if useful.
0_glassesman.svg
3_bld_gp-material-holdout.zip

@antoniov Thank you a lot for a direct svg to gp importer. I tested it a lot these days. It is great convinience to import svg assets into archviz scene now. Even the svg layers can be correctly imported as gp layers. The main limitation I encountered is that hollow shape (ie, compound path made with boolean difference in Inkscape) cannot be implemented in grease pencil. I already see layer mask of grease pencil as your effort to solve this issue, but each hollow shape must be separated into 2 layers first which would make layer management a little tedious IMHO. So, I would rather like this new "Holdout material" a better solution for this issue, if only one separated layer works well. For now, the holdout material can only affect whole GP object,. Could I suggest you add an option so that holdout only affect also a single GP layer. I believe this will add more use cases for it. Below is my screenshot and mock-up UI suggestion. My intent is that glasses lenses should affect glasses frame, but donnot affect human face. ![0_org-inkscape_g.jpg](https://archive.blender.org/developer/F8932579/0_org-inkscape_g.jpg) ![2_gp-material-holdou_g.jpg](https://archive.blender.org/developer/F8932583/2_gp-material-holdou_g.jpg) ![9_fake-ui_g.jpg](https://archive.blender.org/developer/F8932585/9_fake-ui_g.jpg) Please tell your considerations, thanks again. Also the source svg file and object blend file if useful. ![0_glassesman.svg](https://archive.blender.org/developer/F8932599/0_glassesman.svg) [3_bld_gp-material-holdout.zip](https://archive.blender.org/developer/F8932617/3_bld_gp-material-holdout.zip)

In #79878#1018717, @antoniov wrote:
Done in 0335c1fd21

Hi, please take a look at my above suggestion. Thanks.

> In #79878#1018717, @antoniov wrote: > Done in 0335c1fd21dd Hi, please take a look at my above suggestion. Thanks.
Author
Member

@cadtofu Your request is not as easy as it looks. The holdout is done at the pixel level in the shader and there isn't any layer data at that level. To do what you want, we would have to render layer by layer and this would be very slow, so it's not a solution.

@cadtofu Your request is not as easy as it looks. The holdout is done at the pixel level in the shader and there isn't any layer data at that level. To do what you want, we would have to render layer by layer and this would be very slow, so it's not a solution.

In #79878#1031730, @antoniov wrote:
@cadtofu Your request is not as easy as it looks. The holdout is done at the pixel level in the shader and there isn't any layer data at that level. To do what you want, we would have to render layer by layer and this would be very slow, so it's not a solution.

Thanks for your feedback. Then I will go on using gp layer mask as solution.

As for the SVG importer, I think this is a limitation, that doesnot support complex shpae such as hollow, clip and mask.

After all, SVG and GP are quite different data structures.

> In #79878#1031730, @antoniov wrote: > @cadtofu Your request is not as easy as it looks. The holdout is done at the pixel level in the shader and there isn't any layer data at that level. To do what you want, we would have to render layer by layer and this would be very slow, so it's not a solution. Thanks for your feedback. Then I will go on using gp layer mask as solution. As for the SVG importer, I think this is a limitation, that doesnot support complex shpae such as hollow, clip and mask. After all, SVG and GP are quite different data structures.
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#79878
No description provided.