Page MenuHome

video editing / Compositing multiply mode
Closed, DuplicatePublicBUG

Description

System Information
Operating system: Fedora 30
Graphics card: nvidia

Blender Version
Broken: 2.83.1
Worked: NA

Short description of error
Multiply mode doesn't work as expected.

Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).

1/
On VSE, add image
[ background-shadow.png ]


[ background.png ]

2/
change mode to multiply of background-shadow.png
background.png mode : Cross

result screen shot:

What I expected :

Related Objects

Event Timeline

Sorry I didn't finish the report.
I entered by mistake. I am filling the fields now.

Blender has a bad support for single channel png images. it loads all values with that value including the alpha.
A work around is to change the mask image to be an RGB image.

Ok. I tried to export as jpg, and it works. Thanks for the tip! :)
Though I hope it will be fixed soon. It makes workflow cumbersome.

Richard Antalik (ISS) changed the task status from Needs Triage to Confirmed.Jul 9 2020, 8:32 AM

Not sure If I could consider this as duplicate of T75844, as I have been following GIMP blend mode reference, so not sure if I have touched multiply.

Will leave this as just a reference for now

Richard Antalik (ISS) changed the subtype of this task from "Report" to "Bug".Jul 9 2020, 8:33 AM

Single channel PNG are loaded correctly as far as I can tell, and the attached images are not single channel anyway. I think this is just poor behavior of blend modes in the sequencer with alpha.

Used images are not single-channel indeed. They were simple RGBA. What Aryeom did as a workaround was to make the top image (the one in multiply mode) into a RGB image, replacing transparent data by 1, 1, 1 (white) as it seemed that Jeroen was implying that the problem was when using an alpha channel (though it's true that he was also writing about single-channel images and "mask image"; it's not really a mask in the usual sense, just a normal color layer).

And indeed removing the alpha channel worked around the bug.

Really for very common compositing modes, such as multiply, I think that all graphics software are just following the W3C "SVG Compositing Specification": https://www.w3.org/TR/SVGCompositing/#comp-op-property

This is also what Bender should do. :-)

Thanks for nice resource with code examples :)

Jehan Pagès (jehan) added a comment.EditedJul 9 2020, 3:02 PM

No prob. If you don't have all the information, maybe you'll want to read this too: https://www.w3.org/TR/compositing-1/

There is actually a lot more to good compositing than just one operation. If you look at GIMP nowadays, we can set the compositing and the blending modes ("multiply" is actually a blend operation, unlike the very inaccurate "compositing" term I used the previous comment; my bad), which are 2 separate steps to compositing 2 images into one.

Then you have the question on whether you should be working on a linear or gamma-corrected workflow. If you look at GIMP, we now provide 2 "multiply" blending modes. The "Legacy" one is gamma-corrected and the new multiply is linear. Or to be more accurate, you can actually choose the blend space (linear or perceptual) with our new "multiply" blend mode (right click a layer, "Blend Space" item in the contextual menu), and we default to "Linear". This is quite important to abstract your computation from the output (or input) curve.

This is also something Blender should be looking into in order to be compatible with GIMP rendering and to have better blending conformance.

If you follow this spec, you should be fine. I'm happy to help (as much as I can, as I'm not myself the biggest expert on colors in GIMP, so I hope I am not saying too much mistake myself! Ahah! 🤣) because Aryeom and I work with both GIMP and Blender and we'd really like for the rendering to stay consistent, at least for the standardized blend modes.

@Richard Antalik (ISS), i think it's better to have single task to track all inconsistencies of blending mode.

Ok, I will merge this report then