Alpha hashed material produces shifting artifacts when animated in EEVEE #88331

Open
opened 2021-05-16 18:30:38 +02:00 by Xavier Cho · 12 comments

When an object with material that has alpha hashed transparency is animated in EEVEE, the noise pattern may look either unstable or shifting as shown below:
alpha-hashed-transparency-problem.mp4

You can observe that the artifacts on top staying in place rather than rotating with the cube while those on the sides keep flickering, thus producing shifting and unstable appearance.

The symptom is also noticeable when changing the camera position in rendered viewport mode in Blender. And it's particularly problematic in UPBGE (a fork of the old BGE based on the latest Blender source) because a game engine must animate objects in realtime with relatively small number of samples per frame.

Upon an examination from the developers of UPBGE, it is found that the problem is due to the fact that the current implementation of alpha hashed transparency uses the world coordinate instead of the object space, as it is often recommended (e.g. 2017 ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games).

It appears that a simple change from the world to object coordinate fixes the problem as shown in this test commit (see line 80) , which produces the following result:
alpha-hashed-problem-solved.mp4

It's my understanding that the original author decided to use the world matrix to avoid the difficulties with certain corner cases, like when the object is scaled by an extreme factor. However, while such a problem may be circumvented relatively easily (e.g. discard the scale information from the matrix) such a problem described above may pose more substantial issues with making an animation or rendering in realtime.

So, I hope this problem and the suggested fix may be evaluated again since we have more people interested in using Blender for such purposes now, thanks to the gaining popularity of EEVEE.

When an object with material that has alpha hashed transparency is animated in EEVEE, the noise pattern may look either unstable or shifting as shown below: [alpha-hashed-transparency-problem.mp4](https://archive.blender.org/developer/F10153380/alpha-hashed-transparency-problem.mp4) You can observe that the artifacts on top staying in place rather than rotating with the cube while those on the sides keep flickering, thus producing shifting and unstable appearance. The symptom is also noticeable when changing the camera position in rendered viewport mode in Blender. And it's particularly problematic in UPBGE (a fork of the old BGE based on the latest Blender source) because a game engine must animate objects in realtime with relatively small number of samples per frame. Upon an examination from the developers of UPBGE, it is found that the problem is due to the fact that the current implementation of alpha hashed transparency uses the world coordinate instead of the object space, as it is often recommended (e.g. [2017 ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games](https://youtu.be/p4TYf5DDpbQ)). It appears that a simple change from the world to object coordinate fixes the problem as shown in this [test commit (see line 80) ](https://github.com/UPBGE/upbge/commit/e0a8638d0b255f2fc6ce778d10dd0d12a467b4d3#diff-2b8bf4f9e10009510d02c14e3659ee032c73f829de5453d6abcdf6a3f884fdfdR80), which produces the following result: [alpha-hashed-problem-solved.mp4](https://archive.blender.org/developer/F10153381/alpha-hashed-problem-solved.mp4) It's my understanding that the [original author ](https://developer.blender.org/p/fclem/) decided to use the world matrix to avoid the difficulties with certain corner cases, like when the object is scaled by an extreme factor. However, while such a problem may be circumvented relatively easily (e.g. discard the scale information from the matrix) such a problem described above may pose more substantial issues with making an animation or rendering in realtime. So, I hope this problem and the suggested fix may be evaluated again since we have more people interested in using Blender for such purposes now, thanks to the gaining popularity of EEVEE.
Author

Added subscriber: @mysticfall

Added subscriber: @mysticfall

Added subscriber: @JacobMerrill-1

Added subscriber: @JacobMerrill-1

I have also observed this phenomenon - it also effects alpha hash shadows as well

I have also observed this phenomenon - it also effects alpha hash shadows as well

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Marking the BF Blender tag so it shows in people's radar. The report is missing most of the required information to qualify as a report, and mostly likely belongs elsewhere. (bf-committers or devtalk) I will leave up to the triaging team to handle this.

Marking the BF Blender tag so it shows in people's radar. The report is missing most of the required information to qualify as a report, and mostly likely belongs elsewhere. (bf-committers or devtalk) I will leave up to the triaging team to handle this.
Author

Sorry, if I failed to follow a proper procedure somehow. It's my first time to report an issue to Blender project, so it's possible that I missed something. If that to be the case, I'd appreciate it if someone could either move it to a proper place or let me know where and how I should report such a problem. Thanks!

Sorry, if I failed to follow a proper procedure somehow. It's my first time to report an issue to Blender project, so it's possible that I missed something. If that to be the case, I'd appreciate it if someone could either move it to a proper place or let me know where and how I should report such a problem. Thanks!
Member

Added subscribers: @fclem, @lichtwerk

Added subscribers: @fclem, @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

Why not let @fclem share his wisdom here.

Why not let @fclem share his wisdom here.
Member

Added subscriber: @EAW

Added subscriber: @EAW
Member

@mysticfall I've rewrapped your videos as .mp4 instead of .mkv so that they are playable in the browser.

alpha-hashed-transparency-problem.mp4

alpha-hashed-problem-solved.mp4

@mysticfall I've rewrapped your videos as `.mp4` instead of `.mkv` so that they are playable in the browser. [alpha-hashed-transparency-problem.mp4](https://archive.blender.org/developer/F10153380/alpha-hashed-transparency-problem.mp4) [alpha-hashed-problem-solved.mp4](https://archive.blender.org/developer/F10153381/alpha-hashed-problem-solved.mp4)

thanks @EAW 😄

thanks @EAW 😄
Philipp Oeser removed the
Interest
EEVEE & Viewport
label 2023-02-09 15:13:41 +01:00
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
Interest: X11
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
5 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#88331
No description provided.