Is there any way to get the alpha of an object isolated from other objects of the environment, all in the same render, and in a multilayer EXR?
Why is so difficult in Blender, it’s just an alpha… In other 3d programs is very easy and quick to setup the alpha contribution in the properties of the object. I tried by render layers composed in the nodes, and ID mask from Object. But neither of these method produce a good alpha.
The only option I have to get a good alpha matte is rendering 2 layers separately to disk but this is not what I want…
Am I missing something or is this the only way to do it?
This is what I mean. If combine the render layers with the nodes, it renders the cube with the alpha, but there is a white line at the borders, I don’t know why…
Perhaps i’m doing something wrong?
You merge the cube with the BG and then use the alpha to cut it out again. But the BG color is already mixed into the border pixels of cube so they become brighter. You basically get the same effect as with rotoscoping or keying something from background. The edge pixels are contaminated with the background color.
Why do you want to “Use Alpha” in the composite node? To get the composite out properly (with alpha or not does not matter) you do not need to connect anything into the Alpha input there.
As I said, what I want is to get the alpha of the object only inside one Multilayer EXR. But of course in the beauty pass should be everything. I need this for workflow reasons, so that I can have flexibility later in the composition.
If you want flexibility in comp, dump all renderlayers into exr. Select multilayer exr as image format, it writes them all into same file. I don’t understand the need to do some part of comp (combining the beauty pass) before doing the real comp as you are trying to do now.
Ok I understand, so the renders layers are saved into the multilayer, I see, I didn’t realise, thanks.
But I made a test and what is really surprising is that the multilayer exr is very big, 17 Mb over the 7 Mb of the normal exr.
And that’s because blender seems to save like 2 multilayer exr, each for render layer, inside one exr… Of course this means that the passes (vector blur, Z, etc…) are duplicated?
Again I can’t believe that this is made so complicately, whereas in other 3d programs is just changing the alpha channel… Not adding more channels…
That’s definitely not good if you have an animation of 1100 frames and you are rendering through a render farm like in my case. Cause you are doubling the number of Gb…
Multilayer exr includes the passes for each render layer that are checked. By default these are the RGBA and Z. You can uncheck Z if you do not need it, passes are set separately for each render layer. The limitation Blender has is that multilayer exr saves all layers as 32bit float, you can not set them to half float. Why, who knows…
If you want the alpha shuffled into beauty render then yes, you must go the route you took before. And manage/avoid the possible alpha premultiplication problems. Personally I would probably shuffle the alpha in explicitly using Separate/Combine RGBA nodes because I’m not 100% sure how composite node handles the alpha. It might premult the RGB and then you lose your beauty pass.
There is one additional option. Use Write node and explicitly write alpha channel into separate sequence. Maybe some 8bit compressed format to save more space.
Hmm I don’t know why you say it cannot save 32 bit multilayer, I’m saving in half float and it allows me. You mean that you can set it to 16 bits but it saves in 32 bits anyway?
Yeah I think the only way, looking at the size of the Multilayer EXR with render layers and with the passes duplicated (and I use several of them), is to render a separate alpha, I know. But that is not exactly what I wanted. BTW what you mean with “Use Write node…”? I don’t understand that.
This is something new that Multilayer allows half float. I don’t use the multilayer option often so didn’t know it was changed. Previously it did not give the option to select full/half there.
By write node I meant File Output node. Nuke vocabulary slips in You can add an arbitrary amount of input sockets to that node and each socket can write to separate file path and format. It is a very flexible way to set up different kinds of outputs.
Thanks for the idea, I have tried that. But anyway I guess the best workaround “solution” would be making a second render for the alpha using black and white materials…
Because if I try through the render layers approach, it always gonna be a headache:
Render times are slower as Blender is rendering an unnecessary part behind the object.
It multiplies the passes for Vector, Z, etc… because Blender creates the passes for every layer.
The sequence of EXRs resultant is very big.
That’s not good if you are rendering through a render farm.
Workflow much slower because of these handicaps.
All of this just to get an alpha matte… Something that should be really simple.
I don’t understand why the Blender Foundation haven’t improved this.
Moreover, which is the point of having a multilayer EXR in Blender, and then having all this trouble just for creating a simple alpha?
There are limitations in the approach to channels, I totally agree. There are other softwares that have way better channel management that could be used as an example for future development. But at the moment one must live with what he has at hands.