Page 1 of 1

Format of Opacity Renders

PostPosted: Fri Jun 08, 2018 5:53 pm
by Toridan
Greetings, I've been using OctaneRender for Unity to render various passes for a given scene.
The thing is, when rendered using the Info Channels kernel (and saving as beauty render pass) or the save button in the PBR viewport, the resulting image consists of 128 bits per pixel, with 4 channels: RGBA
However, when adding an opacity render pass and saving the image as an opacity render pass, it's saved differently, with 32 bits per pixel.
I'm using FreeImage in another program to read the rendered images and apparently there's trouble reading the alpha channel when the opacity is saved as a render pass (32bpp).
I would like to know which specific format is used to save images using the viewport button, the beauty render pass and the opacity render pass.

Thank you for your assistance

Re: Format of Opacity Renders

PostPosted: Mon Jun 11, 2018 12:56 pm
by ChrisHekman
Your observations are correct.

Info/shadow passes are saved as single channel monochrome images whenever possible. This includes Opacity.
Any pass that can have multiple colors are saved as RGBA images. This includes the beauty/diffuse/specular etc. But also the normal passes.

So when you save the beauty pass as an PNG 8-bit, you will get an RGBA PNG with 8 bit per channel.
When saving as Opacity as PNG 8-bit you will get an R PNG with one 8 bit channel
This works the same with EXR's and the PNG 16Bit

This means that the Opacity image will not have an alpha channel for FreeImage to pick up.

If this is a nessesity you can always add an alpha channel with photoshop or another image editing tool.