WireFrame Mode excludes the backGround Image #57739

Closed
opened 2018-11-09 05:24:06 +01:00 by Jayraj Kharvadi · 21 comments

System Information
Operating system and graphics card
Linux 64 Manjaro
Intel i7 CPU
Nvidia 1070 on a laptop

Blender Version
Broken: blender 2.8 viewport
Worked: blender 2.7x series

Short description of error
The background image is not visible through the camera when the x-ray toggle is turned off in wireframe display mode.

Exact steps for others to reproduce the error

  1. open blender 2.8 latest build.
  2. press "0" on numpad to look through the camera.
  3. select camera and setup a backGround image.
  4. toggle wireframe mode in the viewport.
  5. toggle x-ray using z-key.

you will notice that the image plane is occluded and not visible through the objects.
Thanks,
Jayraj

**System Information** Operating system and graphics card Linux 64 Manjaro Intel i7 CPU Nvidia 1070 on a laptop **Blender Version** Broken: blender 2.8 viewport Worked: blender 2.7x series **Short description of error** The background image is not visible through the camera when the x-ray toggle is turned off in wireframe display mode. **Exact steps for others to reproduce the error** 1) open blender 2.8 latest build. 2) press "0" on numpad to look through the camera. 3) select camera and setup a backGround image. 4) toggle wireframe mode in the viewport. 5) toggle x-ray using z-key. you will notice that the image plane is occluded and not visible through the objects. Thanks, Jayraj

Added subscriber: @JayrajKharvadi

Added subscriber: @JayrajKharvadi
Member

Added subscribers: @fclem, @lichtwerk

Added subscribers: @fclem, @lichtwerk
Clément Foucault was assigned by Philipp Oeser 2018-11-09 14:04:32 +01:00
Member

Not sure if this is intended even?

Wireframe mode (without X-Ray) seems to draw with the background color only (so you dont get hidden wires, they are not see through - more like opaque).
X-Ray gradually removes that background color, making wires see through. [description might be technically inaccurate, but...]

What you are asking for is the "opaque-style" of wireframe drawing with the camera background image still seeing trough?
(why not use X-Ray btw.?)

Personally, I would not consider this a bug, but will let @fclem decide here... (havent read all design docs on wireframes, so my opinion might as well be wrong here...)

Not sure if this is intended even? Wireframe mode (without X-Ray) seems to draw with the background color only (so you dont get hidden wires, they are **not** see through - more like opaque). X-Ray gradually removes that background color, making wires see through. [description might be technically inaccurate, but...] What you are asking for is the "opaque-style" of wireframe drawing with the camera background image still seeing trough? (why not use X-Ray btw.?) Personally, I would not consider this a bug, but will let @fclem decide here... (havent read all design docs on wireframes, so my opinion might as well be wrong here...)

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Well it's a limitation. Without the Xray the objects are made as if they were Opaque to hide what is behind them.

Well it's a limitation. Without the Xray the objects are made as if they were Opaque to hide what is behind them.

Hello Developers,

First of all, many thanks and respect to you guys for your hard work.
I understand that it was not intended to be used that way.

@lichtwerk - I am explaining below how it is useful. While photo-modelling , you don't want to see the wireframes on back-faces. It clutters your viewport making it hard to see whats in front and back. Especially when the model is vey dense. It is extremely useful while performing Photo-Modelling tasks, Roto-Animation, etc.

This feature is a standard across all the 3D application (houdini, maya, 3ds Max, 3D Equalizer, even blender 2.79 ).
Let me explain below using screenshots of its usefulness if is not apparent.

In 2.79, we could assign a transparent material to any object in the blender internal engine, turn on wireFrame in the objects display settings, and turn the shading mode to GLSL, the models would display as hiddenLine view mode.
I am attaching below 2 screenshots of how things were in 2.79 vs. 2.8 .

I am ready to show more use-cases if need be. :)

Blender 2.79 with blender internal :
blender_2.79_Master.jpeg

Blender 2.8 :
blender_2.80.jpeg

It would also be awesome if Sebastian or HyperFx could be consulted for their thoughts on this one.

Thanks,
Jayraj

Hello Developers, First of all, many thanks and respect to you guys for your hard work. I understand that it was not intended to be used that way. @lichtwerk - I am explaining below how it is useful. While photo-modelling , you don't want to see the wireframes on back-faces. It clutters your viewport making it hard to see whats in front and back. Especially when the model is vey dense. It is extremely useful while performing Photo-Modelling tasks, Roto-Animation, etc. This feature is a standard across all the 3D application (houdini, maya, 3ds Max, 3D Equalizer, even blender 2.79 ). Let me explain below using screenshots of its usefulness if is not apparent. In 2.79, we could assign a transparent material to any object in the blender internal engine, turn on wireFrame in the objects display settings, and turn the shading mode to GLSL, the models would display as hiddenLine view mode. I am attaching below 2 screenshots of how things were in 2.79 vs. 2.8 . I am ready to show more use-cases if need be. :) Blender 2.79 with blender internal : ![blender_2.79_Master.jpeg](https://archive.blender.org/developer/F5578448/blender_2.79_Master.jpeg) Blender 2.8 : ![blender_2.80.jpeg](https://archive.blender.org/developer/F5578579/blender_2.80.jpeg) It would also be awesome if Sebastian or HyperFx could be consulted for their thoughts on this one. Thanks, Jayraj
Member

Added subscriber: @SeanKennedy

Added subscriber: @SeanKennedy
Member

I am struggling to find an easy way to do this, as well. It was very easy in 2.79 and just worked. Being able to use wireframe mode and see a background plate is invaluable for vfx work. It's more or less required.

A workaround is to use the Depth (front/back) setting in the Background Image settings, but that is not ideal, since the background image becomes less opaque as you see the wires more by adjusting the slider.

I would LOVE to see this brought back.

I am struggling to find an easy way to do this, as well. It was very easy in 2.79 and just worked. Being able to use wireframe mode and see a background plate is invaluable for vfx work. It's more or less required. A workaround is to use the Depth (front/back) setting in the Background Image settings, but that is not ideal, since the background image becomes less opaque as you see the wires more by adjusting the slider. I would LOVE to see this brought back.

Added subscriber: @KNAO

Added subscriber: @KNAO

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'
K.nao reopened this issue 2019-06-28 18:48:20 +02:00

I think this problem is a problem that has occurred again and needs to be resolved.
In another update after closing? It was drawn correctly for several months.
After that, there was a problem that the background image corrected the other day was not drawn in wireframe mode.

I think this problem is a problem that has occurred again and needs to be resolved. In another update after closing? It was drawn correctly for several months. After that, there was a problem that the background image corrected the other day was not drawn in wireframe mode.

Added subscriber: @Mir-Mir-Roy

Added subscriber: @Mir-Mir-Roy

This comment was removed by @Mir-Mir-Roy

*This comment was removed by @Mir-Mir-Roy*
Member

Added subscribers: @Jeroen-Bakker, @sebastian_k

Added subscribers: @Jeroen-Bakker, @sebastian_k
Member

Hm, since this was reopend, I think we need another round of opinions/decissions.
Personally, I can see the usecase for sure.

Not sure if anyone found a proper solution for this?

You could of course turn on Hidden Wire in editmode and select all objects, then enter multi-object editmode.
This kinda works but is not very practical...

CCing @sebastian_k here, since he was also mentioned.
CCing @Jeroen-Bakker here as well for guidance on how to proceed with this report.
Since the whole thing diplays correctly with Hidden Wire in multi-object editmode, should this (somehow, optionally) be possible for wireframe/xray as well?
Or do we stick with "Invalid" and close again?

Hm, since this was reopend, I think we need another round of opinions/decissions. Personally, I can see the usecase for sure. Not sure if anyone found a proper solution for this? You could of course turn on `Hidden Wire` in editmode and select all objects, then enter multi-object editmode. This kinda works but is not very practical... CCing @sebastian_k here, since he was also mentioned. CCing @Jeroen-Bakker here as well for guidance on how to proceed with this report. Since the whole thing diplays correctly with `Hidden Wire` in multi-object editmode, should this (somehow, optionally) be possible for wireframe/xray as well? Or do we stick with "Invalid" and close again?
Member

I see this as a known regression, that needs to be fixed.
IMO steps that can be taken are:

  • Review and commit D5437: Show Background Image Beneath Transparent Objects (Cycles only) this allows that alpha channel to be used during compositing.
  • Make sure that EEVEE and Workbench support alpha channels in the viewport.
  • When rendering the Opaque pass we can set the alpha to 0.0 what will render the background images underneath by checking the alpha values+depth buffer.

Doing quick hacks this might become usable (Note that this is far from feature complete as it now can only render a black background.
image.png

image.png

diff --git a/source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl
index 6915055e356..4751ecc471c 100644
--- a/source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl
+++ b/source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl
@@ -42,4 +42,6 @@ void main()
 #else
   fragColor = vec4(trans_color, 1.0 - trans_revealage);
 #endif
+
+  fragColor = vec4(0.0, 0.0, 0.0, 0.0);
 }
diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c
index d731b167c06..09a4a849766 100644
--- a/source/blender/draw/engines/workbench/workbench_forward.c
+++ b/source/blender/draw/engines/workbench/workbench_forward.c
@@ -357,7 +357,7 @@ void workbench_forward_engine_init(WORKBENCH_Data *vedata)
   const float *viewport_size = DRW_viewport_size_get();
   const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
   const eGPUTextureFormat comp_tex_format = DRW_state_is_image_render() ? GPU_RGBA16F :
-                                                                          GPU_R11F_G11F_B10F;
+                                                                          GPU_RGBA16F;
 
   e_data.object_id_tx = DRW_texture_pool_query_2d(
       size[0], size[1], GPU_R32UI, &draw_engine_workbench_transparent);
I see this as a known regression, that needs to be fixed. IMO steps that can be taken are: * Review and commit [D5437: Show Background Image Beneath Transparent Objects (Cycles only)](https://archive.blender.org/developer/D5437) this allows that alpha channel to be used during compositing. * Make sure that EEVEE and Workbench support alpha channels in the viewport. * When rendering the Opaque pass we can set the alpha to 0.0 what will render the background images underneath by checking the alpha values+depth buffer. Doing quick hacks this might become usable (Note that this is far from feature complete as it now can only render a black background. ![image.png](https://archive.blender.org/developer/F7760792/image.png) ![image.png](https://archive.blender.org/developer/F7760803/image.png) ``` diff --git a/source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl index 6915055e356..4751ecc471c 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl @@ -42,4 +42,6 @@ void main() #else fragColor = vec4(trans_color, 1.0 - trans_revealage); #endif + + fragColor = vec4(0.0, 0.0, 0.0, 0.0); } diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c index d731b167c06..09a4a849766 100644 --- a/source/blender/draw/engines/workbench/workbench_forward.c +++ b/source/blender/draw/engines/workbench/workbench_forward.c @@ -357,7 +357,7 @@ void workbench_forward_engine_init(WORKBENCH_Data *vedata) const float *viewport_size = DRW_viewport_size_get(); const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]}; const eGPUTextureFormat comp_tex_format = DRW_state_is_image_render() ? GPU_RGBA16F : - GPU_R11F_G11F_B10F; + GPU_RGBA16F; e_data.object_id_tx = DRW_texture_pool_query_2d( size[0], size[1], GPU_R32UI, &draw_engine_workbench_transparent); ```
Member

@Jeroen-Bakker: nice, would "regression" mean higher priority?

@Jeroen-Bakker: nice, would "regression" mean higher priority?
Clément Foucault was unassigned by Jeroen Bakker 2019-09-26 08:45:24 +02:00
Jeroen Bakker self-assigned this 2019-09-26 08:45:24 +02:00
Member

I will claim the task as I have an implementation running.

The new implementation has a limitation as well. The opacity of the background image will influence the color of the wireframe. The more opaque the background the more black the wires will be drawn. This seems to me a limitation we might want to consider to accept this limitation in the short term.
image.png

The cause for this is OpenGL blend functions are not designed to do a bi-directional blending in a single pass, we currently do two passes for the background images and don't want to introduce a third pass due to performance penalties.
I want to test two things:

  • Composite background images with unassociated alpha
  • Merge the two background drawing passes so we can free one. (this will then only be done when rendering in wireframe mode.

It would be easier if we had a more integrated viewport compositing system. ? ?

I will claim the task as I have an implementation running. The new implementation has a limitation as well. The opacity of the background image will influence the color of the wireframe. The more opaque the background the more black the wires will be drawn. This seems to me a limitation we might want to consider to accept this limitation in the short term. ![image.png](https://archive.blender.org/developer/F7775561/image.png) The cause for this is OpenGL blend functions are not designed to do a bi-directional blending in a single pass, we currently do two passes for the background images and don't want to introduce a third pass due to performance penalties. I want to test two things: * Composite background images with unassociated alpha * Merge the two background drawing passes so we can free one. (this will then only be done when rendering in wireframe mode. It would be easier if we had a more integrated viewport compositing system. ? ?
Jeroen Bakker was unassigned by Dalai Felinto 2019-12-23 16:35:52 +01:00

This seems to work well with the latest 2.83 build.image.png

This seems to work well with the latest 2.83 build.![image.png](https://archive.blender.org/developer/F8388273/image.png)

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Clément Foucault self-assigned this 2020-03-26 16:04:56 +01:00

This has been fixed with the overlay refactor.

This has been fixed with the overlay refactor.
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
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
7 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#57739
No description provided.