Glare effect in compositing

Hi everyone,

I’m adding a glare effect to my character but of course it affects the eyes as well. I don’t want it to affect the eyes. Therefore, I made separate render layers for the body and the eyes. This way, it works fine when I apply glare effect to the body’s render layer only. However, in the render layers, when I put the body before the eyes in the compositor, the eyes are a little bit out of the eye sockets - basically they are a little bit in front of where they are supposed to be. I guess Blender is putting the eyes on top of the body. And when I put the eyes first, of course it’s behind the body and completely invisible.

How it’s supposed to be:
how it should be

How it turns out when I use separate render layers for the body and the eyes
how it turns out

As you can see, the eyes (including the eyelids - they are together with the eyes. Tried eyes alone without the eyelids - still same isue) are popped a little bit forward, out of the eye sockets.

How can I fix this?

Copy just the polygons around the eyes into a new object with new material (maybe holdout) and use as mask ? (if animated this ahouls also work if you copy the object and delete all but the polygons around the eye…?)

1 Like

Thanks a lot for your reply!

I understand what you are saying but is this one of the right/legit ways to do it? I’ve tried ID Masking while keeping the eye and the body together in one render but couldn’t get it work until now. I should be able to apply Glare just to the body and not eyes (pass index and material index then adding the ID Mask in the compositor) while having them both in the same render layer but yeah doesn’t work.

I would actually keep the eyes as a separate render because that way the eyes would be least affected in the final render. I will give your suggestion a try now! Hope it works :slight_smile:

Why don’t you use kryptomate as a mask for the eyes? It can be a separate object, but you don’t need to make a render of them separately.

1 Like

As @Calandro said, just activate Cryptomatte for the objects in the View layer properties tab
image

Then on the compositor you can use this node to separate the part you need to be affected (or isolated) by the effect. In this case I separated the eyes, to add them back after the glow filter

Here’s a comparison of the difference after adding the eyes back after the glow is applied:

2 Likes

Thank you very much for your replies guys!

Working on cryptomatte now :slight_smile:

2 Likes

It’s fixed! Thank you guys very much for your help :slight_smile:

2 Likes

Sorry, I could not explain the process. I needed to work here. I am glad @julperado did it perfectly.

2 Likes

No problem at all! Your contribution was more than enough and Julperado explained perfectly on top of yours :slight_smile:

1 Like