Maniphest T63454

Z-depth of transparent image planes in Eevee messed up
Closed, Archived

Assigned To
Sebastian Parborg (zeddb)
Authored By
David Rylander (animationista)
Apr 10 2019, 11:22 AM
Tags
  • BF Blender
Subscribers
Daniele De Luca (sparazza)
David Rylander (animationista)
Jean Da Costa (jeacom256)
Sebastian Parborg (zeddb)

Description

System Information
Operating system: Linux-4.15.0-47-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.116

Blender Version
Broken: version: 2.80 (sub 55), branch: blender2.7, commit date: 2019-04-09 18:12, hash: rB009dbc2bc9fb
Worked: (optional)

Short description of error
With semi-transparent image planes (Alpha blend) using Eevee the Z-Depth gets messed up, both in viewport and render. Navigating around a stack of image planes separated in Z they constantly shift displayed position so the ones below is displayed above the top one. They shift around as you change your view.

They are displayed properly in the Workbench and Cycles-engines.
Opaque image planes does not have this issue in Eevee.

See attached video.

Exact steps for others to reproduce the error
Import a few images as planes. (Images as planes add-on, Shadeless, no offset)
Separate them in Z with a difference of about 0.2 and move them around a bit in X and Y ( it looks alright when they're stacked in the same position.)
Set the blend mode of all images to Alpha Blend.

Move around and watch the planes dance and shift visual position.

[Based on the default startup or an attached .blend file (as simple as possible)]

Event Timeline

David Rylander (animationista) created this task.Apr 10 2019, 11:22 AM
David Rylander (animationista) updated the task description.
Sebastian Parborg (zeddb) changed the task status from Unknown Status to Archived.Apr 10 2019, 6:30 PM
Sebastian Parborg (zeddb) claimed this task.
Sebastian Parborg (zeddb) added a subscriber: Sebastian Parborg (zeddb).

This is a known limitation of alpha blend, you will have to use alpha hashed if you want to avoid issues like these.

Jean Da Costa (jeacom256) added a subscriber: Jean Da Costa (jeacom256).Jul 3 2020, 12:32 AM
In T63454#658164, @Sebastian Parborg (zeddb) wrote:

This is a known limitation of alpha blend, you will have to use alpha hashed if you want to avoid issues like these.

So can I trust this limitation to keep existing on eevee?

Sorry, its because I think I found a way to turn this limitation into a feature for npr rendering.

Daniele De Luca (sparazza) added a subscriber: Daniele De Luca (sparazza).May 28 2021, 12:43 PM

@Jean Da Costa (jeacom256) Yes, it this is a know limitation of the calculation needed to order the object for a rendering with the alpha blend:
The alpha order of a mesh is calculated by measuring the distance of the pivot point of the object from the point of view. What you see at 0:02 in the video, is that the pivot of the purple C triangle is closer to the viewpoint then the pivot of the yellow A Circle.

A workaround that fixes in some cases this limitation, is to move the pivot of the far object(triangle) even far and also to move closer to the viewpoint the pivot of the nearest object (circle)