Cycles, Alpha Texture and ID Mask problem.

Hallo! to the point:

  1. I’ve imported texture with alpha channel, made this recepie from nodes: It works in render.

  2. I wanted in compositor to have little fun with colors/contrast of each element but…

ID Mask of imported texture looks like this:

(in order: ID mask, Texture view, RenderView).

Texture (woman model) is inside the scene (not just added in compositing). It quite ruins my plans to Color Correct some elements in post.

Help would be very appreciated. How to solve this problem?

I tried to make another scene, with only texture and from this scene make alpha layer, but all I can get from this solution is one mask for texture - it still affects everything behind or with contact with texture.

no one? Is my post not clear? Maybe you need something?

More info please. You say you “import”, so does it mean that you pre-rendered everything and reimported ready images into compositor?
If so: where does your ID Mask come from. Is it an output of object index pass? material index pass? What is it?
jpg is not enough to see if it’s useful. Most of the valuable information of ID Masks are stored in values way beyond 1.0. jpg clamps everything, so it’s impossible to say what your ID Mask represent.
I’m sure I could help you, but could you show us what you tried so far? Did you create any node setup and it didn’t work, or you don’t know where to start?

I’m honored with mr. Bartek :slight_smile: Dziękuję bardzo.

Ok, more info and files:

blend comp & texture:

  1. Image seqence is re-rendered in AE after keying movie sequence, and “imported as plain” into blender. So, no - I don’t re-import after render in blender.
  2. I use material index pass.
  3. those are png files.
  4. I work in Cycles.

I’ve tried some nodes setup (let’s say, basic ones - I’ve watched yours “Introduction to Compositing in Blender” and some other stuff), but all I can do and it’s quasi-working, is to make linked-object-image in other scene, and make mask from it - but it does not fix the problem.

If you look into a file, and compositor:

  1. It renders monkey as a… whole monkey.
  2. In compositor, monkey (as ID mask index:2) has cut off ear (it’s behind texture, as this texture had no alpha).

Attachments (252 KB)

Ok, I think I see the point now.

The problem you’re facing is that “Material Index” doesn’t take alpha channel of your plane into account.
This is unfortunately how it works. When “Material Index” or “Object Index” is created only geometry is analyzed. Your objects intersect, so if there were no texture on your plane - monkey would have its ear cut off by this plane. This is reflected in what you get as material indices.

I assume that you want to separate the monkey so that you’re able to color correct it without influencing the lady on the plane and vice versa, right?

If so, I’d suggest the following:

  1. Take care about having the alpha channel of your image. In your setup the alpha channel is 1.0 all over the image. You should change some settings in render, i.e. in “Film” - activate “Transparent” option.

  1. Before rendering I’d place the plane in one layer, monkey in the other one and create separate render layers for them. Then you could use alpha channels of those render layers to separate stuff.

Bardzo proszę :slight_smile:

Thank you!

I know at least that I can’t make something working as I wanted to :slight_smile:

I thought about render layers, but problem is rendertime. I wanted to do my render, saving as much time as I can.

On next project I will try this :slight_smile: