GPencil: Redesign Blend modes and cleanup Drawing Engine #66293

Closed
opened 2019-07-01 10:39:49 +02:00 by Antonio Vazquez · 87 comments

The actual blend modes have problems with alpha and other performance issues.

This task is for do a full review and improve and fix these issues.

We move it to 2.81 because for 2.80 is too risky to change draw engine, and it's better to have something running with some problems that breaks the draw engine.

I initially assign to @fclem, because he will coordinate the task.

Examples of the problem:

image.png

image.png

Notes:

  • Review if possible avoid overlap in one layer (see #66818).
  • Review AA in VFX and Blend modes.
  • Review Halo problems with multiple objects.(see #68204)
{F7648136}
The actual blend modes have problems with alpha and other performance issues. This task is for do a full review and improve and fix these issues. We move it to 2.81 because for 2.80 is too risky to change draw engine, and it's better to have something running with some problems that breaks the draw engine. I initially assign to @fclem, because he will coordinate the task. Examples of the problem: ![image.png](https://archive.blender.org/developer/F7558177/image.png) ![image.png](https://archive.blender.org/developer/F7558179/image.png) Notes: - Review if possible avoid overlap in one layer (see #66818). - Review AA in VFX and Blend modes. - Review Halo problems with multiple objects.(see #68204) ``` {F7648136}
Clément Foucault was assigned by Antonio Vazquez 2019-07-01 10:39:49 +02:00
Author
Member

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

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

#74474 was marked as duplicate of this issue

#74474 was marked as duplicate of this issue

#74029 was marked as duplicate of this issue

#74029 was marked as duplicate of this issue

#73962 was marked as duplicate of this issue

#73962 was marked as duplicate of this issue

#71084 was marked as duplicate of this issue

#71084 was marked as duplicate of this issue

#71330 was marked as duplicate of this issue

#71330 was marked as duplicate of this issue

#61633 was marked as duplicate of this issue

#61633 was marked as duplicate of this issue

#67770 was marked as duplicate of this issue

#67770 was marked as duplicate of this issue

#60907 was marked as duplicate of this issue

#60907 was marked as duplicate of this issue

#72481 was marked as duplicate of this issue

#72481 was marked as duplicate of this issue

#71867 was marked as duplicate of this issue

#71867 was marked as duplicate of this issue

#61236 was marked as duplicate of this issue

#61236 was marked as duplicate of this issue

#72280 was marked as duplicate of this issue

#72280 was marked as duplicate of this issue

#73097 was marked as duplicate of this issue

#73097 was marked as duplicate of this issue

#69646 was marked as duplicate of this issue

#69646 was marked as duplicate of this issue

#72022 was marked as duplicate of this issue

#72022 was marked as duplicate of this issue

#72989 was marked as duplicate of this issue

#72989 was marked as duplicate of this issue

#72915 was marked as duplicate of this issue

#72915 was marked as duplicate of this issue

#72872 was marked as duplicate of this issue

#72872 was marked as duplicate of this issue

#59441 was marked as duplicate of this issue

#59441 was marked as duplicate of this issue

#59425 was marked as duplicate of this issue

#59425 was marked as duplicate of this issue

#62041 was marked as duplicate of this issue

#62041 was marked as duplicate of this issue

#68667 was marked as duplicate of this issue

#68667 was marked as duplicate of this issue

#57859 was marked as duplicate of this issue

#57859 was marked as duplicate of this issue

#72569 was marked as duplicate of this issue

#72569 was marked as duplicate of this issue

#62723 was marked as duplicate of this issue

#62723 was marked as duplicate of this issue

#60939 was marked as duplicate of this issue

#60939 was marked as duplicate of this issue

#70323 was marked as duplicate of this issue

#70323 was marked as duplicate of this issue

#60325 was marked as duplicate of this issue

#60325 was marked as duplicate of this issue

#60538 was marked as duplicate of this issue

#60538 was marked as duplicate of this issue

#62375 was marked as duplicate of this issue

#62375 was marked as duplicate of this issue

#64156 was marked as duplicate of this issue

#64156 was marked as duplicate of this issue

#69946 was marked as duplicate of this issue

#69946 was marked as duplicate of this issue

#69567 was marked as duplicate of this issue

#69567 was marked as duplicate of this issue

#69667 was marked as duplicate of this issue

#69667 was marked as duplicate of this issue

#68204 was marked as duplicate of this issue

#68204 was marked as duplicate of this issue

#68121 was marked as duplicate of this issue

#68121 was marked as duplicate of this issue
Author
Member

Here a pseudocode analysis of the new system.

IdeasDraw.c

image.png

Note: The VFX are by object, so not sure we must run the VFX loop in the blender layer as defined in the chart above.

Here a pseudocode analysis of the new system. [IdeasDraw.c](https://archive.blender.org/developer/F7558161/IdeasDraw.c) ![image.png](https://archive.blender.org/developer/F7558162/image.png) Note: The VFX are by object, so not sure we must run the VFX loop in the blender layer as defined in the chart above.

Note that this redesign also fix the ghost stroke in 2D stroke order.

Note that this redesign also fix the ghost stroke in 2D stroke order.
Author
Member

Added subscriber: @JuanCamardella

Added subscriber: @JuanCamardella
Author
Member

Added subscriber: @Pullup

Added subscriber: @Pullup

Added subscribers: @sse, @brecht

Added subscribers: @sse, @brecht

Added subscriber: @JuanFranciscoPaez

Added subscriber: @JuanFranciscoPaez
Author
Member

Added subscriber: @VLC

Added subscriber: @VLC

Changing After Release to 2.81, since we are now using milestones instead.

I don't know if this is one is actually planned for 2.81, feel free to adjust tags as needed.

Changing After Release to 2.81, since we are now using milestones instead. I don't know if this is one is actually planned for 2.81, feel free to adjust tags as needed.
Member

Added subscribers: @icappiello, @lichtwerk

Added subscribers: @icappiello, @lichtwerk

Added subscribers: @Baz-1, @mano-wii

Added subscribers: @Baz-1, @mano-wii

@antoniov, since you told me all the major grease pencil changes for 2.81 are done, moving this to the next release.

We can also remove the release tag if it's not planned for any specific release, up to you.

@antoniov, since you told me all the major grease pencil changes for 2.81 are done, moving this to the next release. We can also remove the release tag if it's not planned for any specific release, up to you.
Author
Member

Yes, move to the next releases.. I would like to do it in 2.82, but it's not depend only on me.

Yes, move to the next releases.. I would like to do it in 2.82, but it's not depend only on me.

Added subscriber: @heini

Added subscriber: @heini

Added subscriber: @sozap

Added subscriber: @sozap

Added subscriber: @tonton

Added subscriber: @tonton
Author
Member
Added subscribers: @Ranakade, @Lattapotta, @SteveLund, @skarlok, @josh09878, @ZedDB, @StephenSwaney, @troy_s, @intracube, @JacquesLucke, @EnzioProbst
Author
Member

Added subscriber: @bent

Added subscriber: @bent
Author
Member

Added subscriber: @FredLierman

Added subscriber: @FredLierman
Author
Member
Added subscribers: @AdamJanz, @daniel.vanwesten, @llamaJeff, @Antonio-29
Author
Member

Added subscriber: @icedryst

Added subscriber: @icedryst
Author
Member

Added subscriber: @sz0

Added subscriber: @sz0
Author
Member

Added subscribers: @nire, @georgK, @rdnmnm, @robertoconde, @RyanJEC, @JakeBullock, @ChuckOcheret, @Awk, @fakeDeltatime, @particl3s

Added subscribers: @nire, @georgK, @rdnmnm, @robertoconde, @RyanJEC, @JakeBullock, @ChuckOcheret, @Awk, @fakeDeltatime, @particl3s
Author
Member

Added subscriber: @Quargzon

Added subscriber: @Quargzon

Added subscriber: @info-27

Added subscriber: @info-27
Author
Member

Added subscriber: @bunny

Added subscriber: @bunny
Author
Member

Added subscriber: @JayOhJay

Added subscriber: @JayOhJay
Member

Added subscribers: @AdamEarle, @LucianoMunoz

Added subscribers: @AdamEarle, @LucianoMunoz

Here is some information on how I am creating brush textures. Could it be something to do with PNG coming from Krita? Perhaps this the reason why there is trouble with alpha?

https://www.youtube.com/watch?v=PyYI0lOHkqs&list=PL-zg5csjHY0goZ5b3puiJsPFXb15w8APo&index=16&t=20s

Here is some information on how I am creating brush textures. Could it be something to do with PNG coming from Krita? Perhaps this the reason why there is trouble with alpha? https://www.youtube.com/watch?v=PyYI0lOHkqs&list=PL-zg5csjHY0goZ5b3puiJsPFXb15w8APo&index=16&t=20s

Just testing out the 2.82 branches on: https://blender.community/c/graphicall/Whbbbc/

Here is a rambling mess of thoughts on how close it is to working: https://www.youtube.com/watch?v=VjG0dnoihr4&list=PL-zg5csjHY0goZ5b3puiJsPFXb15w8APo&index=2&t=0s

I have honestly no idea how else to contribute accept to keep testing and just demonstrating and talking through how as an artist I may use these tools.

Ad

Just testing out the 2.82 branches on: https://blender.community/c/graphicall/Whbbbc/ Here is a rambling mess of thoughts on how close it is to working: https://www.youtube.com/watch?v=VjG0dnoihr4&list=PL-zg5csjHY0goZ5b3puiJsPFXb15w8APo&index=2&t=0s I have honestly no idea how else to contribute accept to keep testing and just demonstrating and talking through how as an artist I may use these tools. Ad
Author
Member

Added subscriber: @wevon-2

Added subscriber: @wevon-2
Author
Member

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

@AdamEarle I'm sorry to announce that the 3D mode is now not working as you mentioned. This is sad but it was creating more problem than it was solving.

We plan to have a more close integration of the 3D mode inside other engines (workbench/eevee) in the future to allow correct 3D transparency and effects.

Also a 15min video is not a good format for us to get feedback. Just having a bullet list of things that works and other that don't is more helpful. Also, please use https://devtalk.blender.org/ to create discussion around this, leaving the tracker for bug tracking.

Regarding this task, pretty much everything listed here has been fixed inside the gpencil refactor branch. So let's close it.

@AdamEarle I'm sorry to announce that the 3D mode is now not working as you mentioned. This is sad but it was creating more problem than it was solving. We plan to have a more close integration of the 3D mode inside other engines (workbench/eevee) in the future to allow correct 3D transparency and effects. Also a 15min video is not a good format for us to get feedback. Just having a bullet list of things that works and other that don't is more helpful. Also, please use https://devtalk.blender.org/ to create discussion around this, leaving the tracker for bug tracking. Regarding this task, pretty much everything listed here has been fixed inside the gpencil refactor branch. So let's close it.

Hey, mate sorry about the 15 minutes video I didn't realize it was that long. I will be more considerate in the future of how and where I post.
Apologies I didn't realize this was the bug tracker. I thought this was place for discussion.

Now all of that said 2.82 and 2.83 from test work really well. The only things that seems to be not working are "textured strokes" from what I have tested.
From what I test its all still very very useable.

Apologies again for being overzealous. It really is very exciting.

Hey, mate sorry about the 15 minutes video I didn't realize it was that long. I will be more considerate in the future of how and where I post. Apologies I didn't realize this was the bug tracker. I thought this was place for discussion. Now all of that said 2.82 and 2.83 from test work really well. The only things that seems to be not working are "textured strokes" from what I have tested. From what I test its all still very very useable. Apologies again for being overzealous. It really is very exciting.
Author
Member

Added subscribers: @Dantti, @ronsn

Added subscribers: @Dantti, @ronsn

Added subscribers: @santbg, @dr.sybren, @LucasVeber

Added subscribers: @santbg, @dr.sybren, @LucasVeber

Reading through bugs reports lead me to testing blender out this way.

Textured alpha strokes are respected here.

This could be a quick solution for maybe next release before University start-up and we can start teaching it to the students.

The code in the masking could be used potentially on normal strokes.
When they are moved in 3D space the code switches on or off depending on where the stroke is in 3D space.

I didn't want to post in here, but I really thought this may help out since I can't see what actually is happening in the development.

In the attached Blend file if you scrub the timeline you the stroke color will change. Colour holds up well enough.

Mask.blend. system-info.txt

Reading through bugs reports lead me to testing blender out this way. Textured alpha strokes are respected here. This could be a quick solution for maybe next release before University start-up and we can start teaching it to the students. The code in the masking could be used potentially on normal strokes. When they are moved in 3D space the code switches on or off depending on where the stroke is in 3D space. I didn't want to post in here, but I really thought this may help out since I can't see what actually is happening in the development. In the attached Blend file if you scrub the timeline you the stroke color will change. Colour holds up well enough. [Mask.blend](https://archive.blender.org/developer/F8278931/Mask.blend). [system-info.txt](https://archive.blender.org/developer/F8278932/system-info.txt)

Added subscribers: @jmarkt1, @WilliamReynish

Added subscribers: @jmarkt1, @WilliamReynish
Author
Member

Added subscribers: @MichaelHermann, @Sergey

Added subscribers: @MichaelHermann, @Sergey

Added subscriber: @BoUBoU

Added subscriber: @BoUBoU

Removed subscriber: @LucasVeber

Removed subscriber: @LucasVeber
Author
Member

Added subscriber: @Fred_B

Added subscriber: @Fred_B
Author
Member

Added subscriber: @Vyach

Added subscriber: @Vyach
Author
Member
Added subscribers: @dnielsen, @GabrielMoro, @MarcinTwarowski, @OlliPikkarainen, @JohnGrigni-4, @Miketche, @lukechimes, @dupoxy, @JoanBetbese, @dolfonzo3, @TakahiroKomatsu, @howlford, @dfelinto, @rejarts, @alesR, @EAW
Author
Member

Added subscribers: @KS1, @ankitm

Added subscribers: @KS1, @ankitm
Author
Member

Added subscriber: @ToriKo

Added subscriber: @ToriKo

Removed subscriber: @Vyach

Removed subscriber: @Vyach
Author
Member

Added subscriber: @HerbertAuer

Added subscriber: @HerbertAuer
Author
Member

Fixed in 29f3af9527

Fixed in 29f3af952725
Contributor

Removed subscriber: @dupoxy

Removed subscriber: @dupoxy
Thomas Dinges added this to the 2.82 milestone 2023-02-08 16:43:11 +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
16 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#66293
No description provided.