GPencil: Texture Image Alpha pass through grease pencil strokes #78795

Open
opened 2020-07-10 14:48:03 +02:00 by Samuel Bernou · 22 comments
Member

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.87

Blender Version
Broken: version: 2.83.1, branch: master, commit date: 2020-06-25 09:47, hash: 8289fc688b
Worked: (newest version of Blender that worked as expected)

Short description of error
Context: Using texture image to make some kind of 2d fur on top of a GPencil Object

The Image Texture used to make some fur is mostly transparent and the brush used to make the colored part is a texture paint brush with Cloud Mask (it was made entirely in Blender with Blender tools).

When on top of the GPencil object, the part of the Image Texture that is only half transparent(between 99%-1% transparent), makes the GPencil color disappear, even when moving the center point behind the one of the fur images.

On the contrary, when on top of another Image Texture (imported to be used as camera mapping), the Image Texture of the fur doesn't impact the transparency of that one.
Notice that the Image texture boundary, even from the imported one, has problems with clipping and always makes a white line appear.

Exact steps for others to reproduce the error

  • Open attached .blend file
  • Zoom in and out to notice the alpha transparency influencing the GP object

Thanks for your help!

from_further_away.PNG

close_up.PNG

render.png

bug_alpha.blend

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.87 **Blender Version** Broken: version: 2.83.1, branch: master, commit date: 2020-06-25 09:47, hash: `8289fc688b` Worked: (newest version of Blender that worked as expected) **Short description of error** Context: Using texture image to make some kind of 2d fur on top of a GPencil Object The Image Texture used to make some fur is mostly transparent and the brush used to make the colored part is a texture paint brush with Cloud Mask (it was made entirely in Blender with Blender tools). When on top of the GPencil object, the part of the Image Texture that is only half transparent(between 99%-1% transparent), makes the GPencil color disappear, even when moving the center point behind the one of the fur images. On the contrary, when on top of another Image Texture (imported to be used as camera mapping), the Image Texture of the fur doesn't impact the transparency of that one. Notice that the Image texture boundary, even from the imported one, has problems with clipping and always makes a white line appear. **Exact steps for others to reproduce the error** - Open attached .blend file - Zoom in and out to notice the alpha transparency influencing the GP object Thanks for your help! ![from_further_away.PNG](https://archive.blender.org/developer/F8683695/from_further_away.PNG) ![close_up.PNG](https://archive.blender.org/developer/F8683696/close_up.PNG) ![render.png](https://archive.blender.org/developer/F8683697/render.png) [bug_alpha.blend](https://archive.blender.org/developer/F8683701/bug_alpha.blend)
Author
Member

Added subscriber: @Pullup

Added subscriber: @Pullup

#87366 was marked as duplicate of this issue

#87366 was marked as duplicate of this issue

Added subscriber: @mano-wii

Added subscriber: @mano-wii

I'm struggling to understand the role of each object to the descripition of the problem.
A simplified file is highly recommended.

But I notice that there is something strange about the material of the Fur_Image mesh object.

I am not very familiar with this area. It may not be a good practice to mix transparent meshes with Grease Pencil objects.

I'm marking the Grease Pencil team to take a look.

I'm struggling to understand the role of each object to the descripition of the problem. A simplified file is highly recommended. But I notice that there is something strange about the material of the `Fur_Image` mesh object. I am not very familiar with this area. It may not be a good practice to mix transparent meshes with Grease Pencil objects. I'm marking the `Grease Pencil` team to take a look.
Antonio Vazquez changed title from Texture Image Alpha pass through Grease Pencil to GPencil: Texture Image Alpha pass through grease pencil strokes 2020-07-11 09:08:25 +02:00

Added subscribers: @fclem, @antoniov

Added subscribers: @fclem, @antoniov

@fclem Could you take a look?

@fclem Could you take a look?

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

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

This is the issue of compositing EEVEE foreground elements with Gpencil in the background. the AA patern does not match perfectly and uncover the scene background.

Workaround: If you disable EEVEE AntiAliasing and GPencil AntiAliasing it fixes the issue but you loose the antialiasing. Render to twice the resolution and downsample in post processing to reduce antialiasing.

I would consider this known limitation as we don't have any planned fix for this.

This is the issue of compositing EEVEE foreground elements with Gpencil in the background. the AA patern does not match perfectly and uncover the scene background. Workaround: If you disable EEVEE AntiAliasing and GPencil AntiAliasing it fixes the issue but you loose the antialiasing. Render to twice the resolution and downsample in post processing to reduce antialiasing. I would consider this known limitation as we don't have any planned fix for this.
Author
Member

Ok thanks for the infos and workaround @fclem

Further notes :

  • EEVEE with material blend mode Alpha Blend (default with import image as plane) has different problem : Texture mesh appears behind the GPencil object.

  • Cycles, The alpha completely holdout the Grease pencil

Ok thanks for the infos and workaround @fclem Further notes : - EEVEE with material blend mode `Alpha Blend` (default with `import image as plane`) has different problem : Texture mesh appears behind the GPencil object. - Cycles, The alpha completely holdout the Grease pencil

Added subscriber: @jack.herbert

Added subscriber: @jack.herbert

Like the OP, I also noticed this whilst mixing Image Textures and GPencil. Then when trying to reproduce it with the smallest amount of steps, I realised that it doesn't just affect Image Textures but anything that passes in front of a GPencil object apart from other GPencil objects.
Thought I'd post this screenshot to illustrate the problem a bit more clearly. It's black GP filled square, between two 3D meshes, a blue plane and a red UV sphere (both with Emission shaders):
Screenshot from 2021-03-30 01-08-01.png
So I understand there's no plan to fix this cos it might not be that simple, but doesn't that seriously limit possibilities if GPencil objects can never be behind 3D meshes? (at least without having to render at twice the size (btw thanks for that workaround))

Like the OP, I also noticed this whilst mixing Image Textures and GPencil. Then when trying to reproduce it with the smallest amount of steps, I realised that it doesn't just affect Image Textures but anything that passes in front of a GPencil object apart from other GPencil objects. Thought I'd post this screenshot to illustrate the problem a bit more clearly. It's black GP filled square, between two 3D meshes, a blue plane and a red UV sphere (both with Emission shaders): ![Screenshot from 2021-03-30 01-08-01.png](https://archive.blender.org/developer/F9913951/Screenshot_from_2021-03-30_01-08-01.png) So I understand there's no plan to fix this cos it might not be that simple, but doesn't that seriously limit possibilities if GPencil objects can never be behind 3D meshes? (at least without having to render at twice the size (btw thanks for that workaround))

Added subscriber: @adrianth

Added subscriber: @adrianth

I agree with Kevin'g comment above - this issue seems like a pretty serious limitation, as the one significant competitive advantage Blender Grease Pencil has over 2D animation software is the ability to combine 3D elements in a 2D scene; using textured 3D meshes with alpha transparency is a very powerful tool. I understand if this issue is not high priority and might not get fixed in the near future, but in my opinion it should not be classified as known limitation. Please let me know if I'm missing something. I would appreciate if someone from the dev team can post a point of view on this.

I agree with Kevin'g comment above - this issue seems like a pretty serious limitation, as the one significant competitive advantage Blender Grease Pencil has over 2D animation software is the ability to combine 3D elements in a 2D scene; using textured 3D meshes with alpha transparency is a very powerful tool. I understand if this issue is not high priority and might not get fixed in the near future, but in my opinion it should not be classified as known limitation. Please let me know if I'm missing something. I would appreciate if someone from the dev team can post a point of view on this.

I found a slightly better workaround for the anti-aliasing issue. If you put the Gpencil objects and 3d objects on two different View Layers then put them back together in the compositor with a Z Combine node (enable Use Alpha and disable Anti-Alias Z), you will still need to set EEVEE's filter size to 0, but you can keep the Grease Pencial anti-aliasing on. So not perfect but in some cases it might be enough.

@adrianth I think that's not exactly the same problem, in your case you just need to switch Alpha Blend to Alpha Hashed in the material settings.

I found a slightly better workaround for the anti-aliasing issue. If you put the Gpencil objects and 3d objects on two different View Layers then put them back together in the compositor with a Z Combine node (enable Use Alpha and disable Anti-Alias Z), you will still need to set EEVEE's filter size to 0, but you can keep the Grease Pencial anti-aliasing on. So not perfect but in some cases it might be enough. @adrianth I think that's not exactly the same problem, in your case you just need to switch Alpha Blend to Alpha Hashed in the material settings.

Added subscriber: @CarstenJaeckel

Added subscriber: @CarstenJaeckel

@jack.herbert : Yes, that works, but it is very noisy instead of Alpha Blend.

@jack.herbert : Yes, that works, but it is very noisy instead of Alpha Blend.

Added subscriber: @MarcelLegindi

Added subscriber: @MarcelLegindi
Should help? http://diglib.eg.org/bitstream/handle/10.2312/EGGH.EGGH08.033-040/033-040.pdf?sequence=1

Added subscriber: @tezaron

Added subscriber: @tezaron
Philipp Oeser removed the
Interest
Grease Pencil
label 2023-02-09 15:19:47 +01:00

I think I have a similar issue to the ones described above. I created a 2D cut-out rig using multiple grease pencil objects. Issue I have is that the alpha of the textured stroke seems to holdout on the grease pencil objects behind them in 3D space in some places.

image

I have tried some the workarounds described above but have not had any satisfactory results, if anyone has any other workaround suggestions it would be appreciated.

I understand this is currently no plan to fix this, but it is quite a big limitation for us when trying to replace our current 2D anmation software (celaction) with blender.

Thanks :D

I think I have a similar issue to the ones described above. I created a 2D cut-out rig using multiple grease pencil objects. Issue I have is that the alpha of the textured stroke seems to holdout on the grease pencil objects behind them in 3D space in some places. ![image](/attachments/67120cfa-e908-451e-8940-dfe2e464f389) I have tried some the workarounds described above but have not had any satisfactory results, if anyone has any other workaround suggestions it would be appreciated. I understand this is currently no plan to fix this, but it is quite a big limitation for us when trying to replace our current 2D anmation software (celaction) with blender. Thanks :D
903 KiB

by any chance, will this be addressed in GP 3?

by any chance, will this be addressed in GP 3?

New to grease pencil here, but I think I have something that looks similar.

Drawing these strokes with an image background underneath produces these white outlines. They are pretty thin, but become really pronounced when zooming out.

If I go to world properties -> viewport display and change the colour, the outline changes to that same colour.

I also have an issue of really fine strokes fading away when zoomed out on a regular white background, and it seems to be the same issue - because the white outline of my strokes overpower the thin lines when zoomed out.

New to grease pencil here, but I think I have something that looks similar. Drawing these strokes with an image background underneath produces these white outlines. They are pretty thin, but become really pronounced when zooming out. If I go to world properties -> viewport display and change the colour, the outline changes to that same colour. I also have an issue of really fine strokes fading away when zoomed out on a regular white background, and it seems to be the same issue - because the white outline of my strokes overpower the thin lines when zoomed out.
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
13 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#78795
No description provided.