0
$\begingroup$

I have some trouble in the compositor and I need help. I made this super simple scene to demonstrate the problem:

1

Then what I did is render out the cube and the sphere separately into two images with transparent backgrounds. I used OpenEXR format with Z buffer enabled, and I connected the depth value of the render layer to the Z socket of the composite node. (Though I don't need depth values in this example, I do in my actual project.)

Then I Z combined the two images and also rendered out the floor plane and put the two objects on top of it with an alpha over node: (It is necessary to have a non-alpha background to get the bloom to show at all.)

2

An now you see the problem, only one object shows the bloom effect. If I swap around the image and Z values of the two objects, the bloom swaps as well for some reason:

3

I am absolutely unsure about what causes this behavior, by all means it should work in my opinion, both objects should have bloom no matter in what order they're combined, but they don't. If you know a solution to this, please let me know!

Edit: With the colors set to black and white, you can see only one object is visible at a time:

4

$\endgroup$
  • 1
    $\begingroup$ I believe Z combine is only a masking technique helping you to mask objects with higher depth value. Only the contour of the selected pixels are used, not any post proc effect. Just try with flat color image inputs, one black and one white for example, keeping the Z inputs the same.... What are you trying to achieve exactly here? $\endgroup$ – Bruno Apr 6 at 18:55
  • $\begingroup$ Well, in my actual project which is too complex to show this with I also have an emissive object with bloom, and a particle system with thousands of object particles that are also emissive. I've rendered out these 2 thing onto 2 separate image sequances, and I wanted to combine them back together. However, when the particle emission starts, the bloom from the other object disappears. $\endgroup$ – Geri Apr 6 at 19:04
  • $\begingroup$ Also you are right with the silhouette aspect, only one object is visible at a time, I'll add a picture of it to the post in a minute. $\endgroup$ – Geri Apr 6 at 19:07
0
$\begingroup$

Well, I found an answer myslef. Thanks to Bruno, I got the idea of combining the masks that the Z combine node creates for each object, so I made a setup like so:

2

It combines both objects' silhouettes to make a combined mask, and as you see, the depth values are correct as well.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.