Page MenuHome

Material setting "show_transparent_back" (Show Backface) gives weird results
Needs Information from Developers, NormalPublic

Description

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GTX 980/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.40

Blender Version
Broken: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: rB02948a2cab44

Short description of error


My materials are messed up by having blend mode set to "Alpha Blend" and "Show Backface" set true.
(The checkbox for "Show Backface" pops up if a materials blend mode is set to Alpha Blend")

Is this normal behaviour?
The intend here was to see every side of the cube with a bit of transparency.

Exact steps for others to reproduce the error

  1. Add a Cube (subdivide a few times) and give it a material
  2. Go to material settings and set the materials...
  3. Blend mode to "Alpha Blend"
  4. Backface Culling to False
  5. Show Backface to True

Event Timeline

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Needs Information from Developers.Mar 17 2021, 2:53 PM

This is related to the sorting problem.
https://docs.blender.org/manual/en/dev/render/eevee/materials/settings.html#sorting-problem

To be honest, I dont really get it though.
With a default cube, sorting is kind of intact, a simple plane also works, but as soon as any modeling/subdividing takes place, overlapping geometry inside the same object (sorting based on objects is OK) will give these sorting problems.
And there is really no way to correct this (tried Mesh > Sort Elements in different flavours based on distance, but that does not really help either).
So the chance of getting something looking good with Alpha Blend and Show Backface is next to zero in my experience.

Then the documentation on Show Backface is also confusing:

If enabled, all transparent fragments will be rendered. If disabled, only the front-most surface fragments will be rendered. Disable this option to ensure correct appearance of transparency from any point of view. Then using Alpha Blending this option should be disabled because with Alpha Blending, the order in which triangles are sorted is important.

I am refering to

Then using Alpha Blending this option should be disabled because with Alpha Blending, the order in which triangles are sorted is important.

  • should it be "When using Alpha Blending..." (instead of "Then using Alpha Blending...")?
  • if it is advised to disable this when using Alpha Blending, why are we only showing the option when using Alpha Blending?
if mat.blend_method not in {'OPAQUE', 'CLIP', 'HASHED'}:
    layout.prop(mat, "show_transparent_back")

@Clément Foucault (fclem): could you share your wisdom?

should it be "When using Alpha Blending..." (instead of "Then using Alpha Blending...")?

Yes.

if it is advised to disable this when using Alpha Blending, why are we only showing the option when using Alpha Blending

Because we used to have other blend mode (additive and multiply) which does not care about fragment ordering.