2D image sequence in 3D world - file output and image input compositing problem

Blender 4.0

Hello I would like to put 2D animation into 3D world at particular depth position,
and I would like to be able correct 2D images if necessary without rendering 3D world too.

Using compositing at the picture “compositing 3x file output”
2D image is behind the blue cube and in front of the red cube.

If I render three images for each frame (inputs into Mix color node)
then if some correction to 2D images will occur I would like to put
just corrected 2D images and compose them like at the picture “compositing 3x image input”.

But the result is not same - 2D image is somehow transparent.
To compare the rendered results:
“compositing 3x file output - result”
and
“compositing 3x image input - result”

What can be wrong?
Thank you.




Are you using Filmic or AgX? By default, Blender will apply the view transform to images saved as PNGs. The view transform rolls off the highlights for a gentler transition to white, which is generally what you want, but not when you’re saving a black-and-white matte, since the 1.0 white of the matte will be rolled off to a lower value (0.8ish, if I recall correctly). When you apply an alpha mask with a value of 0.8 to an image, you get partial transparency.

In that first image, you’re compositing before the view transform, and in the second, you’re compositing after, using three images that have all already had a view transform applied. For identical (or practically identical) results, try exporting EXRs instead, or use the Standard display transform (thus making the “sRGB” input on the image nodes an exact inversion to linear instead of a half measure), or change the image nodes’ input transform to whatever display transform you used, i.e. Filmic sRGB or AgX, which will reverse the transform, pulling the rolled-off values back to full (to a point).

Thank you,
so far I tried solution 2.
use the Standard display (View) transform.

So in the blend file where File Output node is I set View Transform to Standard
and in the file where the image inputs are I let the default Blender View Transform AgX
and 2D image is not transparent anymore.

OK
File Output - View Transform - Standard —> image inputs - View Transform - AgX

But I do not understand why this is not the case if I do it in the reverse order
let the View Transform to Blender default AgX in the blend file where File Output node is
and set the View Transform to standard in the file where the image inputs are
and in this setup 2D image is still transparent.

BAD
File Output - View Transform - AgX —> image inputs - View Transform - Standard

And one more question what bothers me
in the OK setup:
File Output - View Transform - Standard —> image inputs - View Transform - AgX
do the image lose some quality compared to just direct Blender AgX View Transform?

But I do not understand why this is not the case if I do it in the reverse order
let the View Transform to Blender default AgX in the blend file where File Output node is
and set the View Transform to standard in the file where the image inputs are
and in this setup 2D image is still transparent.

Because in that one the transform still gets applied, rolling off the highlights in your saved file. Exact same problem you were having before. And in the other one, it doesn’t. Since Standard keeps 1.0 at 1.0.

image inputs - View Transform - AgX

Are you talking about the view transform active in the Blender file where you’re using the imported images (the option chosen in the Color Management properties), or the input transform being used on the image nodes themselves (the dropdown labeled “Color Space”)? If it’s the latter, both your examples are wrong: you should match the input transform to the data the file contains. The input transform is you telling Blender how to “decode” the image: if it’s an image saved with sRGB (aka Standard), tell it sRGB, if it was saved with AgX, tell it AgX, etc. If you’re saving out a black and white mask with Standard (so 1.0 stays 1.0), but then telling Blender it was saved with AgX, you’re blasting those 1.0 values up to 16 unnecessarily. But you also say you’re using the “default Blender transform,” which is sRGB for imported PNGs. So are you using that? Or are you talking about leaving the view transform set at default? If that’s the case, what are you setting the nodes’ input transforms to? I’m not clear which settings you’re changing and which you’re leaving the same.

You also don’t want to have AgX on if you’ve already saved out AgX PNGs: those will have the AgX look baked in, so if you leave AgX on at the project level, you’ll get a double-up.

do the image lose some quality compared to just direct Blender AgX View Transform?

You’ll always lose some quality saving to a final-image format like PNG as opposed to an intermediate format like EXR*. Might not be enough to matter in a lot of cases, but it’s something to be aware of. Again, though, I’m having trouble picturing exactly what settings you’re changing—if you’re saving an AgX-encoded image to PNG, then importing it back in and “unwrapping” it with an inverse AgX curve (by setting AgX as the input transform), yeah, the data you get back won’t be the same as the original linear data, since some of it was lost when the look was applied and the data was squished down into the PNG. Is that what you’re asking?

*If you’re intending to do more work on the images. If an export is your final stop, then of course we’d use a final delivery format. But if you want to hold onto all your data, like, for example, if you’re exporting images out to bring right back in and keep working with, then it’s worth considering EXR.