6
$\begingroup$

I use Cycles. The main goal is to render different objects from various scenes into separate files using alpha mask. It’s necessary to ensure that in future pictures do not overlap, when images superimposed out of order. All fine, BUT there is one nuance:

image with antialiasing problem

Between layers (images) there are gaps (holes).

I have found solution for similar problem but for internal render. There had to disable antialiasing.

In my case, I’ve experimented with nodes, but the result virtually unchanged: compositor nodes

Please advise how is it possible to remove all gaps (holes)?

Attached blend file with the settings I used.

$\endgroup$
4
  • $\begingroup$ Mix the final image with a color value via the color mix node $\endgroup$
    – J Sargent
    Commented Feb 25, 2015 at 16:30
  • $\begingroup$ Unfortunately I didn't understand how to use color \ mix node in my case. Could you show me some example, please? $\endgroup$
    – o6opo6o
    Commented Feb 26, 2015 at 14:04
  • $\begingroup$ The thing you need is Full Sample Anti-aliasing. In Cycles this is only available with Safe Buffers on. Also you will have to do the compositing in blender and not photoshop. $\endgroup$ Commented Feb 26, 2015 at 22:16
  • $\begingroup$ The thing is that I need separate images (ex. attached file). In photoshop I just unite them in order to demonstrate gap\hole which are present in layers joint. $\endgroup$
    – o6opo6o
    Commented Feb 27, 2015 at 12:42

2 Answers 2

5
$\begingroup$

There are a couple issues. My first question is why are you using two scenes? That will really complicate things. In this answer I have only addressed one as you can copy that information to the second one.

The first thing I noticed is you have your makes layers set, and although that could be handy in many instances, it really is not necessary in this case. Go ahead and disable all of them on all render layers:

Disable Mask Layers

Also you should try and change your compositor setup, all you need is something like this:

Composite Nodes

This setup gives me a nice result, and the issues you mentioned appear to have been fixed.

$\endgroup$
1
  • $\begingroup$ That doesn't answer the question, as you're removing the layer masks making each plate uncorrelated. Of course it works, but it's not a solution, it's eliminating the problem, which is not always possible. Sometimes you DO need the layer masks. BTW, that setup may works but it's not efficient: When the alphas aren't correlated, you can simply combine those layers with an alpha over node, plugging only the image output and leaving alpha alone (the image socket is associated RGBA, it already transports the alpha channe, so there's no need to plug it as a mixing factor). $\endgroup$
    – Gez
    Commented Apr 18, 2016 at 15:35
5
$\begingroup$

Those are correlated alphas. That basically means that you're not putting layer B over Layer A, but putting layer B in a hole poked in Layer A.

The regular alpha over operation, however, will work only for uncorrelated alphas.

If you take a look at the math beneath the alpha-over operation, you'll see that the first part of it creates a "shadow" on the background layer, and the rest adds the top layer over. When your background layer already has that shadow (i.e. it has a hole where layer B belongs) you have to skip that first part of the operation and proceed to the addition.

In other words, the alpha over operation doesn't work for this kind of correlated alphas.

Not a big deal, it's really easy to fix: just add Layers A and B RGB together, then add Layers A and B Alphas together, assign and you're good to go.

Node setup for proper correlated alpha compositing

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .