1

I made a very simple volume object to create an atmosphere for my scene, however, when I save the render, all the color is gone from the volume. Also the alpha of the image is wrong. I tried to convert to premultiplied alpha, which did make it better, but it did not fix the color issue.

Here's what the render shows inside blender: enter image description here

And what the saved image is: enter image description here

I very well know emission volumes don't work if you save them to a PNG, but this is principled volume, so it should really work. Any ideas why it doesn't?

Geri
  • 1,341
  • 1
  • 8
  • 24
  • 1
    Have you tried this: https://blender.stackexchange.com/a/215722/71578 – Kuboå Jan 08 '23 at 22:22
  • I don't have access to photoshop, but I might try it with Retrobatch. Not really an ideal solution though. – Geri Jan 09 '23 at 18:08
  • I don't have Photoshop either so I tried with Krita but couldn't do much. Even if the solution is not ideal, if you can confirm that that's the problem, you can narrow down your search at least. – Kuboå Jan 09 '23 at 18:13

3 Answers3

1

Here's the solution for EXR. I hope it fulfills your needs. The VolumeDir pass should include, what you need.

enter image description here

You can combine the VolumeDir pass to use it as a png. Don't forget: It's emission data you are using. It's really not easy to transfer emission data to a png, especially if you're using transparency.

You could do your compositing completely in Blender. Then it may be easier to handle everything.

Here's an example how to combine the data to a PNG with transparency and the VolumeDir as backdrop:

enter image description here

Christoph Werner
  • 1,965
  • 1
  • 14
  • 31
1

The mist is sort of a light source. So no matter what you do, you will not be able to use it with alpha or transparency, not because of any alpha format issues, but because of physics. Emission needs to be added, not mixed in to an image. You can add volume passes together in the Compositor and output them to a file in any format with File Output node. It should not be transparent, but should be added during compositing.

If you use PNG format, you will have an image that has color management transforms applied to it so it will likely go through filmic and sRGB transforms depending on your color management settings and that makes the color values not linear, which means even if you add it while compositing those PNGs in non-linear color space, the result will be incorrect and might differ from your expectations. Compositing is done with linear color, so it doesn't matter if you like it or not (doesn't even matter how hard you are going to press that down-vote button :D ), EXR is the way to go here.

If you absolutely need to do this with PNG, this should be considered artistic process keeping in mind that the workflow is completely flawed and the best thing to do would probably be concentrating on the visual look, so you might need to adjust color and density unrealistically if you need more or less of it. What you use for alpha in that situation makes little difference - the result is going to be wrong in any case. You might as well use the combined volume passes themselves as alpha since the brighter the mist the better it is visible (but again - that's just wrong).

quellenform
  • 35,177
  • 10
  • 50
  • 133
Martynas Žiemys
  • 24,274
  • 2
  • 34
  • 77
-1

Switch the Film transparency off. Then you'll get the right Background. But if you need the transparency, then actually all works like expected (Emissions will not be displayed with transparency).

enter image description here

Christoph Werner
  • 1,965
  • 1
  • 14
  • 31
  • I need the transparent background, and when I save it to a png, I get the result from my post. – Geri Jan 09 '23 at 09:25
  • Have you tried to do an AlphaOver with the saved PNG just to check? Emission volumes normally look transparent in the saved file, but they work correctly when you compose the image over another. (note that you need to set the image Alpha to Premultiplied when you load the image) – Secrop Jan 09 '23 at 10:23
  • I have, and as I wrote in the post, the premultiplied alpha did make it better, but did not fix the color loss. Also, as I wrote, this is principled volume, not emission volume. – Geri Jan 09 '23 at 18:07
  • @Geri Did you test to use a regular color instead of an emission shader for the Volume Scatter? This should result in an image that could be better used with transparency. I haven't tested it, yet. – Christoph Werner Jan 10 '23 at 07:43
  • Not sure what you mean there with the regular color, emission shader and volume scatter. I used a principled volume node for my material with no emission. – Geri Jan 10 '23 at 10:55