Holdout collection objects affect transparency of motion blurred objects and cause artifacts #87903

Closed
opened 2021-04-29 02:29:24 +02:00 by Mark Miller · 12 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.11

Blender Version
Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-04-28 22:25, hash: 48bbeaf383
Worked: Unknown

Short description of error
If an object has motion blur between a holdout object and the camera, transparency of the motion blur is affected. In addition, this creates artifacts in the RGB channels as well (although this may be the result of pre-multiplied alpha). This is the setup created by motion tracking, and makes it almost impossible to get reasonable results for compositing with "hairy" objects.

render.png

The effect seems to be that the transparency falloff is much sharper than the areas without holdout objects behind them, but this appears to also cause artifacts in the RGB channel. You can see this effect clearly if the alpha is stripped from the image:

render with stripped alpha.png

It seems likely that this behavior has been in Blender for some time, so it is possible that I completely misunderstand the operation of holdout objects. If so, I apologize. But given these are used in precisely this way for motion tracking, and I chased these artifacts for several days back to the cause, it seems like a problem that should be looked into.

Exact steps for others to reproduce the error
Render frame 5 of "hair alpha test.blend" and observe the output. You can see the outline of the "top" of the holdout plane, even though it is fully behind the moving hairball at that point. Since it is hair, this effect is very visible, but it is detectable even for "hard-edge" objects. If you save the resulting render as an RGBA .png, and remove the alpha, you can see bright artifacts in the RGB channels. When compositing, these artifacts can easily "leak" through the alpha (depending on the app/operation applied, such as blur), causing visual weirdness beyond the incorrect alpha channel.

hair alpha test.blend

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.11 **Blender Version** Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-04-28 22:25, hash: `48bbeaf383` Worked: Unknown **Short description of error** If an object has motion blur between a holdout object and the camera, transparency of the motion blur is affected. In addition, this creates artifacts in the RGB channels as well (although this may be the result of pre-multiplied alpha). This is the setup created by motion tracking, and makes it almost impossible to get reasonable results for compositing with "hairy" objects. ![render.png](https://archive.blender.org/developer/F10044841/render.png) The effect seems to be that the transparency falloff is much sharper than the areas without holdout objects behind them, but this appears to also cause artifacts in the RGB channel. You can see this effect clearly if the alpha is stripped from the image: ![render with stripped alpha.png](https://archive.blender.org/developer/F10044840/render_with_stripped_alpha.png) It seems likely that this behavior has been in Blender for some time, so it is possible that I completely misunderstand the operation of holdout objects. If so, I apologize. But given these are used in precisely this way for motion tracking, and I chased these artifacts for several days back to the cause, it seems like a problem that should be looked into. **Exact steps for others to reproduce the error** Render frame 5 of "hair alpha test.blend" and observe the output. You can see the outline of the "top" of the holdout plane, even though it is fully behind the moving hairball at that point. Since it is hair, this effect is very visible, but it is detectable even for "hard-edge" objects. If you save the resulting render as an RGBA .png, and remove the alpha, you can see bright artifacts in the RGB channels. When compositing, these artifacts can easily "leak" through the alpha (depending on the app/operation applied, such as blur), causing visual weirdness beyond the incorrect alpha channel. [hair alpha test.blend](https://archive.blender.org/developer/F10044838/hair_alpha_test.blend)
Author

Added subscriber: @marklio

Added subscriber: @marklio
Author

I have confirmed that this also occurs in 2.83.13 LTS

I have confirmed that this also occurs in 2.83.13 LTS
Author

In further testing, I've discovered that motion blur is not necessary here (it just makes it more obvious), so this is really just about "pixel transparency" in front of holdouts. I'm going to test other transparent objects to see if this is about "thin objects" or general transparency.

Also, this effect seems even more pronounced in 2.83 (which is how I discovered that motion blur wasn't necessary).

In further testing, I've discovered that motion blur is not necessary here (it just makes it more obvious), so this is really just about "pixel transparency" in front of holdouts. I'm going to test other transparent objects to see if this is about "thin objects" or general transparency. Also, this effect seems even more pronounced in 2.83 (which is how I discovered that motion blur wasn't necessary).
Author

FYI, I was unable to reproduce this effect by creating lots of "very thin geometry, but all hair rendering options reproduce it.

FYI, I was unable to reproduce this effect by creating lots of "very thin geometry, but all hair rendering options reproduce it.
Author

I converted the hair particle system to mesh and then curves, and added some thickness with bevel, and I was able to reproduce a very similar result.

I converted the hair particle system to mesh and then curves, and added some thickness with bevel, and I was able to reproduce a very similar result.
Author

OK, I have a workaround that produces the output I expect. If I use the cryptomatte node in the compositor to generate a matte for the object, and replace the alpha from the rendered image with it:

Compositor fix.PNG

It then produces a "correct" image (very close to what I would expect the appropriate render alpha should look like), where only the content "behind" the holdout is affected by it.:

fixed with cryptomatte.png

I hope that this is sufficient to prove that the standard alpha output from the render is incorrect, and that the correct data is available in some form as part of the render. In the meantime, I may be able to use the cryptomatte as a workaround. This does show that the RGB data from the render is correct, and the incorrect RGB values in the file are very likely a byproduct of premultiplied, incorrect alpha in the PNG.

Thanks for putting up with my rambling here. Hope it helps get this resolved to make Blender even better!

OK, I have a workaround that produces the output I expect. If I use the cryptomatte node in the compositor to generate a matte for the object, and replace the alpha from the rendered image with it: ![Compositor fix.PNG](https://archive.blender.org/developer/F10046101/Compositor_fix.PNG) It then produces a "correct" image (very close to what I would expect the appropriate render alpha should look like), where only the content "behind" the holdout is affected by it.: ![fixed with cryptomatte.png](https://archive.blender.org/developer/F10046103/fixed_with_cryptomatte.png) I hope that this is sufficient to prove that the standard alpha output from the render is incorrect, and that the correct data is available in some form as part of the render. In the meantime, I may be able to use the cryptomatte as a workaround. This does show that the RGB data from the render is correct, and the incorrect RGB values in the file are very likely a byproduct of premultiplied, incorrect alpha in the PNG. Thanks for putting up with my rambling here. Hope it helps get this resolved to make Blender even better!
Author

OK, one more that I think is helpful. You can use the same cryptomatte trick to show that the matte produced by cryptomatte only differs in the region where the holdout is, and is otherwise identical to the alpha produced by the render.

alpha difference.PNG

OK, one more that I think is helpful. You can use the same cryptomatte trick to show that the matte produced by cryptomatte only differs in the region where the holdout is, and is otherwise identical to the alpha produced by the render. ![alpha difference.PNG](https://archive.blender.org/developer/F10046109/alpha_difference.PNG)
Author

editing tags in hopes of getting some eyes on it.

editing tags in hopes of getting some eyes on it.
Author

Looks like this no longer repros on CyclesX. I'm leaving this open though, since no one else has touched this issue and I kind of want to see how long it will survive. :)

Looks like this no longer repros on CyclesX. I'm leaving this open though, since no one else has touched this issue and I kind of want to see how long it will survive. :)

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Resolved'

Changed status from 'Needs Triage' to: 'Resolved'
Germano Cavalcante self-assigned this 2022-01-24 17:07:23 +01:00

In #87903#1292964, @marklio wrote:
Looks like this no longer repros on CyclesX. I'm leaving this open though, since no one else has touched this issue and I kind of want to see how long it will survive. :)

Sorry for the delay in replying.
Strange that this report has not been triaged.
I tested in Blender 2.93.2, 3.0.1 and the latest daily build, but could not reproduce the bug, so it appears the bug has been fixed already in 2.93. (Maybe in {f709f12d93}?)

No use keeping it open just yet, but thanks for the report anyway.

> In #87903#1292964, @marklio wrote: > Looks like this no longer repros on CyclesX. I'm leaving this open though, since no one else has touched this issue and I kind of want to see how long it will survive. :) Sorry for the delay in replying. Strange that this report has not been triaged. I tested in Blender 2.93.2, 3.0.1 and the latest daily build, but could not reproduce the bug, so it appears the bug has been fixed already in 2.93. (Maybe in {f709f12d93}?) No use keeping it open just yet, but thanks for the report anyway.
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
2 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#87903
No description provided.