Page MenuHome

GPencil: Redesign Blend modes and cleanup Drawing Engine
Closed, ResolvedPublicTO DO


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 @Clément Foucault (fclem), because he will coordinate the task.

Examples of the problem:


  • Review if possible avoid overlap in one layer (see T66818).
  • Review AA in VFX and Blend modes.
  • Review Halo problems with multiple objects.(see T68204)

Related Objects

Mentioned In
D6293: GPencil: Refactor of drawing engine, new Vertex Paint mode, Sculpt/Weight paint conversion to brushes, code cleanup
T64896: Switching Grease Pencil material slot link to Object and back to Data corrupts material
T69646: Grease Pencil Pixelate scale gets wonky.
T72280: Disappears when move in pose mode (GPencil)
T72022: Workbench Render always paints Grease Pencil objects above the rest.
T72989: Blender Grease pencil strokes not respecting layer order through the camera and perspective view
T67770: Gpencil + clipping 0.5m = heavy glitches because ignore clipping planes
T59979: Alpha textures Always Behind Grease Pencils
T72569: Grease Pencil alpha artefacts when using armature
T71084: Grease pencil transparency issue over Camera Background Image
T69521: Instancing Grease pencil with particles really (reallyyy!!!!) slow
T69567: mask layer has white line
T69946: GP layer multiply blending mode gives unpredictable results.
T69667: Grease pencil textured strokes behave different between render and viewport
D5470: T66924 : Move GPencil Modifiers evaluation to Depsgraph
T68204: Grease Pencil Halo Effect by overlapping
T68121: Grease Pencil Subtract Layer Artifact
T67329: Grease pencil: texture blending mode breaks edges of stroke in layer above texture
T67249: Grease Pencil Jagged Lines
T66818: Overlayed Shadows darken stacked areas
T66766: Problem in importing saved projects in grease pencil
T65279: Grease Pencil error in opacity values of layers with different Blend modes.
T63757: Grease Pencil Module
Mentioned Here
rB29f3af952725: GPencil: Refactor of Draw Engine, Vertex Paint and all internal functions
T68204: Grease Pencil Halo Effect by overlapping
T66818: Overlayed Shadows darken stacked areas

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

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?

Just testing out the 2.82 branches on:

Here is a rambling mess of thoughts on how close it is to working:

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.


Clément Foucault (fclem) closed this task as Resolved.Jan 13 2020, 4:42 PM

@adam earle (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 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.

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.