Page MenuHome

Holdout collection objects affect transparency of motion blurred objects and cause artifacts
Needs Triage, NormalPublic

Description

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: rB48bbeaf38304
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.

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:

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.

Event Timeline

I have confirmed that this also occurs in 2.83.13 LTS

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

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

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.

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:

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

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

editing tags in hopes of getting some eyes on it.