After hours spending on Transparent BSDF and rendering all possible solutions and trying all solutions on internet, I’ve come to conclusion that this is definitely a bug in blender.
Please advise.
I’ve tried about 10 materials with Transparent BSDF, and all their render with eevee transparent on, and saving the render results as RGBA PNG, I’ve seen blender saving to PNG (as they should be transparent renders) will messing up alpha channel with RGB and actually save wrong channel data that will never be recoverable. Here is detail:
material shader part:
transparent BSDF color:
blender viewport with shading no problem showing transparent material:
Render output showing transparent material without any problem:
saving rendered image options (I’ve tried every combination with no luck):
now the problem arise just after saving renders. for more information, I’ve tried many other saving ways with blender python and all came with exact results.
this is saved png viewing on xnview or similar image viewers:
Well, your emission is 50, which is a huge amount, so it’s not at all a surprise your saved result is all white. What’s more strange is that you’re not seeing that in the viewport, it’s probably something to do with your color management. Regardless, turn down your emission to 2 and see how it looks
I dont think that should be problem, as many surfaces such as neon texture, explosion, … has a very great value of emission.
but in my original file, I even tried emission 2, and again color channel messed up again. so its not emission.
Took a quick look at your test scene, and it’s your emission.
If you set it to 1, it will give you the results you expect. I tried this for png, exr and tga.
Emission like 50 will mess up the saved file, and then in Affinity Photo I have to crank up the levels to get something visible in/as a alpha, and the color is gone as well.
Same for exr and tga formats with 50 emission.
I don’t know if this is a blender bug, or just values that go way off the ‘value chart’ for a png.
Look at compositing if you want to ‘level up’ the brightness imho…
I don’t see nothing wrong…
Just opened your file, rendered, save as png.
Restart blender with an empty scene, opened the image in the compositor, set the image’s color space to ‘Agx Base sRGB’ (the same color space as in your scene!!) and nothing different.
Further more, I opened your file once again and added a multicolored object behind your transparency mess… Did a render of the new object alone, and in compositor mixed this new render with the previous render from my first test. The end result is exactly the same as if I render the new modified scene with both objects visible.
the problem is, you should be enable to see png file saved in any app as it should be standard RGBA PNG.
it doesnt even show in blender “Image Editor” correctly.
also in compositing node, i cant get alpha channel and color channel to show the right way.
do you see them as I posted above?
It would help if you post the download for exactly the same scene you’re showing, instead of a different one where everybody else has no problems with.
You shouldn’t encode your PNGs in Agx… Most apps don’t have the builtin logic to operate color spaces other than pure sRGB.
Also, you have to take into account that the PNG has a premultiplied alpha. So if you want to extract the ‘true’ colors from the image, you’d need to divide the color value by the alpha value.
Yes, as others say, this behavior is due to png’s design which only recognizes opaque alpha, not additive alpha. I imagine exrs can store this information due to their float encoding nature (png encodes integer).
One way you can bake the additive alpha to opaque is this:
Try it if you must necessarily use png, if not I recommend using EXR.