Maniphest T76366

GPencil: Canvas Plane Is Hidden By Objects / is no longer X-Ray
Closed, ResolvedKNOWN ISSUE

Assigned To
Antonio Vazquez (antoniov)
Authored By
shanenewville@gmail.com (Ghost_Train)
May 3 2020, 9:54 AM
Tags
  • BF Blender
  • Grease Pencil
Subscribers
Antonio Vazquez (antoniov)
Chris Yearn (yrrnn)
Clément Foucault (fclem)
Daniel Martinez Lara (pepeland)
dupoxy (dupoxy)
Matias Mendiola (mendio)
shanenewville@gmail.com (Ghost_Train)

Description

System Information
Operating system: Windows 7 64bit Pro
Graphics card: NVIDIA GeForce 970 GTX

Blender Version
Broken: 2.83, 1623fdb3bc55, Beta, 2020-05-02
Worked: 2.82a

Short description of error
With Grease Pencil we would use the canvas plane to assist with drawing, but it is quite difficult to use when it is both hidden by ojects due to no longer being xray and also is locked the center of the scene no longer follow 3D Cursor. There appears to be no option to make it xray like it should be. Or if there is, its not clear where to find it. But it should be on by default. The Plane used to be visible by default no matter what is in front of it.

Exact steps for others to reproduce the error

  1. Create a new basic scene with default cube, or just add a cube (Make sure it is in the center of the scene)
  2. Add a Grease Pencil > Blank object.
  3. Set Viewport shading to Rendered
  4. Click Overlays dropdown and enable both Canvas and 3D Cursor
  5. Set the Drawing Plane setting to View, Top, Side, Front or Curor. Notice that the Drawing plane is completely hidden by the default Cube (or any object)

Event Timeline

shanenewville@gmail.com (Ghost_Train) created this task.May 3 2020, 9:54 AM
Antonio Vazquez (antoniov) added a project: Grease Pencil.May 3 2020, 4:14 PM
Antonio Vazquez (antoniov) added subscribers: Clément Foucault (fclem), Antonio Vazquez (antoniov).

I don't think this is a bug... the gird is "inside" the cube, so if you draw anything, the final stroke will go "inside".

@Clément Foucault (fclem) Any comment about that?

Antonio Vazquez (antoniov) renamed this task from Canvas Plane Is Hidden By Objects / is no longer X-Ray to GPencil: Canvas Plane Is Hidden By Objects / is no longer X-Ray.May 3 2020, 4:14 PM
shanenewville@gmail.com (Ghost_Train) added a comment.EditedMay 3 2020, 11:24 PM

@Antonio Vazquez (antoniov) An example of how I expected it to work can be seen in this recent tutorial by Dedouze. As seen in the video, the canvas drawing plane has xray. This is how it works in 2.82. In 2.83 it is not working like this and is hidden by objects making it difficult to see how the plane is oriented.
https://youtu.be/c57qq2nE3B0?t=970

It defeats the purpose of the canvas plane as a tool that assists with drawing. If we don't want to see it we can just uncheck it from the outlines dropdown and drawing still works the same. The point of this ticket is, when we enable canvas, we cannot see it anymore in 2.83 if it is covered by objects in the scene.

shanenewville@gmail.com (Ghost_Train) added a comment.EditedMay 3 2020, 11:34 PM

To add to this, Actually it would be nice to have a toggle for xray. If xray is disabled, it might help us visually when trying to align the plane to object surfaces. But in general use, i think i would keep xray ON since it is a helper tool

Antonio Vazquez (antoniov) added a comment.EditedMay 4 2020, 9:57 AM

@Clément Foucault (fclem) I think that we could disable depth test for Grid Canvas....

diff --git a/source/blender/draw/engines/overlay/overlay_gpencil.c b/source/blender/draw/engines/overlay/overlay_gpencil.c
index b79d5753686..1620de85a28 100644
--- a/source/blender/draw/engines/overlay/overlay_gpencil.c
+++ b/source/blender/draw/engines/overlay/overlay_gpencil.c
@@ -256,7 +256,7 @@ void OVERLAY_gpencil_cache_init(OVERLAY_Data *vedata)
     const int gridlines = (gpd->grid.lines <= 0) ? 1 : gpd->grid.lines;
     int line_ct = gridlines * 4 + 2;
 
-    DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA;
+    DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA;
     DRW_PASS_CREATE(psl->gpencil_canvas_ps, state);
 
     sh = OVERLAY_shader_gpencil_canvas();

What do you think?

Antonio Vazquez (antoniov) added subscribers: Matias Mendiola (mendio), Daniel Martinez Lara (pepeland).May 4 2020, 9:58 AM

@Matias Mendiola (mendio) @Daniel Martinez Lara (pepeland) Do you think the grid must be always on top?

Antonio Vazquez (antoniov) changed the task status from Needs Triage to Confirmed.May 4 2020, 9:59 AM
Antonio Vazquez (antoniov) claimed this task.
Antonio Vazquez (antoniov) changed the subtype of this task from "Report" to "Known Issue".
dupoxy (dupoxy) added a subscriber: dupoxy (dupoxy).EditedMay 4 2020, 10:00 AM

There is an X-ray toggle but in Solid Viewport shading working right now
but not in Material Preview or Rendered Viewport shading.

Antonio Vazquez (antoniov) added a comment.EditedMay 4 2020, 12:32 PM

I don't like to add more switches or reuse X-Ray button. This button is for other things and it's not separated for grid only, so it's not a good solution.

IMHO the best solution is just keep on top all the time as an overlay. Also, we have the opacity of the grid, so if keeping on top is too intrusive, the artist can reduce opacity to get a better experience.

Antonio Vazquez (antoniov) closed this task as Resolved.EditedMay 4 2020, 5:18 PM

We are being dicussing about the grid canvas and the mayority of the team agree that Grid Canvas must be occluded with 3D geometry if the geometry is in front. This is a change from 2.82, but the new refactored engine allows to do that. The old engine did not supported this occlusion and this was the reason of the "always on top" functionality.

If you need to see the grid, you can enable X-Ray.

If we keep the canvas always on top, it sends a wrong feedback because the final stroke will not be on top, but occluded by the mesh.

I have added this change to the release notes.

Chris Yearn (yrrnn) added a subscriber: Chris Yearn (yrrnn).May 13 2020, 6:05 AM

@Antonio Vazquez (antoniov) I just found this thread as I was also following Dedouze's tutorial and was confused when the canvas was occluded by the cube. I suspect many people would prefer that the canvas is always visible on top even when X-Ray is disabled, would it be possible to add a toggle option to the Viewport Overlays drop-down?

Antonio Vazquez (antoniov) added a comment.May 13 2020, 10:08 AM

@Matias Mendiola (mendio) @Daniel Martinez Lara (pepeland) Do you think is good idea add an option to set the Grid on top?

shanenewville@gmail.com (Ghost_Train) added a comment.May 13 2020, 11:39 AM

A toggle would be good because there may be situations where we do and do not want it on top.

Antonio Vazquez (antoniov) added a comment.May 13 2020, 4:56 PM

Proposed new option in D7721