Grease Pencil Strokes visible behind solid objects #63191

Closed
opened 2019-04-01 19:23:07 +02:00 by Chuck Ocheret · 8 comments

System Information
Operating system: Darwin-18.5.0-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 560X OpenGL Engine ATI Technologies Inc. 4.1 ATI-2.8.38

Blender Version
Broken: version: 2.80 (sub 53), branch: master, commit date: 2019-04-01 14:09, hash: 9ddf0c9d38
Worked: (optional)

Short description of error
Grease Pencil Strokes visible behind solid objects. That is, within a single Grease Pencil object and you have strokes in front of and behind a solid object, you can see the strokes behind the object through the strokes in front of the object even though the object is completely opaque. This is problematic because I am trying to animate some linework on all sides of a surface of a 3D object.

Exact steps for others to reproduce the error
I am attaching a .blend file here that illustrates the problem. Later I'll describe how I created this file.
TransparentGreasePenci.blend

To observe the problem:

  • Open the .blend file
  • Observe a sphere and 2 grease pencil objects (one has blue strokes and the other has red strokes)
  • Rotate around the scene
  • Observe that through any of the blue strokes in front of the sphere you can see artifacts of the blue strokes that should be hidden behind the sphere. You cannot see any of the red strokes from the other GP object behind the sphere.

Observe that through the red strokes in front of the sphere you can see artifacts of the red strokes that should be hidden behind the sphere.

I don't know if this behavior is expected or not. While it could be a cool effect, it completely defeats the workflow I was trying to achieve or it will force me to split my Grease Pencil strokes among multiple GP objects. If I had to guess, it looks like the GP objects are rendered to a separate buffer and merged, which means they only get a single Z value to compare with other 3D geometry. Of course, I haven't looked at the code yet.

How I created the example:

  • Create a sphere
  • Create an empty Grease Pencil object
  • Change the material color to blue
  • Change the Stroke Placement to Surface
  • Add a mirror modifier
  • Draw strokes on all sides of the sphere
  • Observe the problem described above
  • Create another empty Grease Pencil Object
  • Change the material color to red
  • Change the Stroke Placement to Surface
  • Draw strokes on the front and back of the sphere
  • Observe the stroke visibility issue described above
**System Information** Operating system: Darwin-18.5.0-x86_64-i386-64bit 64 Bits Graphics card: AMD Radeon Pro 560X OpenGL Engine ATI Technologies Inc. 4.1 ATI-2.8.38 **Blender Version** Broken: version: 2.80 (sub 53), branch: master, commit date: 2019-04-01 14:09, hash: `9ddf0c9d38` Worked: (optional) **Short description of error** Grease Pencil Strokes visible behind solid objects. That is, within a single Grease Pencil object and you have strokes in front of and behind a solid object, you can see the strokes behind the object through the strokes in front of the object even though the object is completely opaque. This is problematic because I am trying to animate some linework on all sides of a surface of a 3D object. **Exact steps for others to reproduce the error** I am attaching a .blend file here that illustrates the problem. Later I'll describe how I created this file. [TransparentGreasePenci.blend](https://archive.blender.org/developer/F6905740/TransparentGreasePenci.blend) To observe the problem: - Open the .blend file - Observe a sphere and 2 grease pencil objects (one has blue strokes and the other has red strokes) - Rotate around the scene - Observe that through any of the blue strokes in front of the sphere you can see artifacts of the blue strokes that should be hidden behind the sphere. You cannot see any of the red strokes from the other GP object behind the sphere. # Observe that through the red strokes in front of the sphere you can see artifacts of the red strokes that should be hidden behind the sphere. I don't know if this behavior is expected or not. While it could be a cool effect, it completely defeats the workflow I was trying to achieve or it will force me to split my Grease Pencil strokes among multiple GP objects. If I had to guess, it looks like the GP objects are rendered to a separate buffer and merged, which means they only get a single Z value to compare with other 3D geometry. Of course, I haven't looked at the code yet. How I created the example: - Create a sphere - Create an empty Grease Pencil object - Change the material color to blue - Change the Stroke Placement to Surface - Add a mirror modifier - Draw strokes on all sides of the sphere - Observe the problem described above - Create another empty Grease Pencil Object - Change the material color to red - Change the Stroke Placement to Surface - Draw strokes on the front and back of the sphere - Observe the stroke visibility issue described above
Author

Added subscriber: @ChuckOcheret

Added subscriber: @ChuckOcheret

Added subscriber: @antoniov

Added subscriber: @antoniov

What mode do you have here?

image.png

Set to 3D Location. When you set to default mode (2D Layers) the strokes are visible if you put a mesh in front.

What mode do you have here? ![image.png](https://archive.blender.org/developer/F6905801/image.png) Set to 3D Location. When you set to default mode (2D Layers) the strokes are visible if you put a mesh in front.

Your file in 3D Location mode.

image.png

Note: Anyway, we still have a problem with alpha strokes and we are working to fix it.

Your file in 3D Location mode. ![image.png](https://archive.blender.org/developer/F6905808/image.png) Note: Anyway, we still have a problem with alpha strokes and we are working to fix it.
Author

I've tried both 3D location (my current setting) as well as 2D layers with much the same effect. Even in the example you posted above, you can see the rear strokes through the sphere, but only where there are strokes in front of the sphere. The effect when animating is that the strokes in front serve as a transparency map for the sphere. Except all you can see through the sphere are the strokes from the same GP object behind it.

I've tried both 3D location (my current setting) as well as 2D layers with much the same effect. Even in the example you posted above, you can see the rear strokes through the sphere, but only where there are strokes in front of the sphere. The effect when animating is that the strokes in front serve as a transparency map for the sphere. Except all you can see through the sphere are the strokes from the same GP object behind it.

Yes, I know for alpha strokes...it's a already detected problem. Wwe are looking for a solution.

Yes, I know for alpha strokes...it's a already detected problem. Wwe are looking for a solution.
Author

I just tried it with completely opaque strokes drawn with strength set to 1.0 and no pressure sensitivity. This is just to ensure that there is absolutely no transparency involved. If you look from the front (Numpad 1) you can see the that it looks like the far strokes are subtracting from the near strokes. When you look from the back (Ctrl-Numpad 1) it all looks ok.

But, if I reduce the material's stroke Alpha to, say, .5, then you still get the subtractive effect in front view but you get the transparency effect from the rear view.

I'm supplying a new .blend file that shows this. You can play with the material's stroke alpha to see the different effects.

TransparentGreasePenci1.blend

I just tried it with completely opaque strokes drawn with strength set to 1.0 and no pressure sensitivity. This is just to ensure that there is absolutely no transparency involved. If you look from the front (Numpad 1) you can see the that it looks like the far strokes are subtracting from the near strokes. When you look from the back (Ctrl-Numpad 1) it all looks ok. But, if I reduce the material's stroke Alpha to, say, .5, then you still get the subtractive effect in front view but you get the transparency effect from the rear view. I'm supplying a new .blend file that shows this. You can play with the material's stroke alpha to see the different effects. [TransparentGreasePenci1.blend](https://archive.blender.org/developer/F6905841/TransparentGreasePenci1.blend)

Closed as duplicate of #59425

Closed as duplicate of #59425
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#63191
No description provided.