Page MenuHome

Channels are incorrect when saving out a transparent render of volumes
Closed, DuplicatePublic

Description

System Information
Operating system: Windows 10
Graphics card: GTX 970

Blender Version
Broken: 2.93

Short description of error
Channels are incorrect when saving out a transparent render of volumes.
Render looks correct in Render preview, but when saving the file, the channels are misaligned and alpha seems to be missing.
For some reason it's is different with Cycles and Eevee, though both have issues.


I have tried saving out as different formats and bitdepth, PNG, TIFF, OpenEXR with no improvement.
Turning off "transparent" there are no issues.
Issues occur both when saving from the render preview and when outputting renders directly from a batch render.
I have tried creating a new file from scratch and get the exact same issue.

Exact steps for others to reproduce the error
Open the below file and try to render and save.

Event Timeline

Hmm it appears Krita is having issues displaying channels and making it worse. The main problem might just be that the alpha is way too dark and I don't understand why.

Looking more into this. I assume this is the same issue as described here https://developer.blender.org/T73152. I can indeed see in the viewer as well that the alpha channel is black.

I however don't understand how you are supposed to work around this. Why is the alpha black if the volume is dense enough that it would block an object behind it if it were in the scene.

Thank you for the report. This isn't a bug in Blender, but Krita's inability to handle associated (premultiplied) alpha.
Compositing software such as Blender's compositor, Nuke/Natron, and DaVinci Resolve do accurately handle associated alpha.

Nuke:

Why is the alpha black if the volume is dense enough that it would block an object behind it if it were in the scene.

Ah, but it isn't dense at all. ☺ You set the simulation to be only fire, which is pure emissive light. Light doesn't block light. There isn't anything to occlude (block) what is behind the fire. Setting the density to 1,000 just results in 0, since there is 0 density to begin. Had you set the simulation to be fire + smoke, there would be some smoke to absorb and scatter the light coming from behind the simulation. How much depends on the settings of course.

Suzanne behind the fire Frame 2:


Suzanne behind the fire Frame 2 with exposure down 10 stops. Suzanne is visible behind the fire:

We can even make Suzanne glow brighter than the fire with an emission shader, which shines right through the fire showing you that the fire doesn't block anything.

Emission of 250 iirc.


Same but exposure down 5 stops.

See T78578: Blender does not save the alpha channel correctly for volumetric flames / fire with no smoke for more details. I will merge this report into that one as a duplicate.

I forgot to mention: I didn't get any channel misalignment when saving images from your file, and opening them in Blender, Nuke, and GIMP.

Ahhh this all makes so much more sense now. Thanks so much for clearing it up. I really couldn't wrap my head around it.