Page MenuHome

WireFrame Mode excludes the backGround Image
Open, NormalPublic


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.


Differential Revisions
D6066: Workbench: Solid Wireframe Transparency

Event Timeline

Philipp Oeser (lichtwerk) lowered the priority of this task from Needs Triage by Developer to Normal.

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 @Clément Foucault (fclem) decide here... (havent read all design docs on wireframes, so my opinion might as well be wrong here...)

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.

@Philipp Oeser (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.8 :

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


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.

K.nao (nao) reopened this task as Open.Jun 28 2019, 6:48 PM
K.nao (nao) added a subscriber: K.nao (nao).

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.

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 Koenig (sebastian_k) here, since he was also mentioned.
CCing @Jeroen Bakker (jbakker) 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?

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.

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()
   fragColor = vec4(trans_color, 1.0 - trans_revealage);
+  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);

@Jeroen Bakker (jbakker): nice, would "regression" mean higher priority?

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.

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. 😉 😉