I'm using the compositor to automatically segment parts of objects into masks. This works well for most materials, but when doing the same for a mix shader of glossy and transparent it doesn't, how to fix this?

An example of what one of multiple masks looks like: enter image description here

A possible reason (I tested whether there are any very light grey values, the output is a solid white): enter image description here

On a sidenode: The same thing happens when I use materialIDs.

The current node setup: enter image description here

The file is too big for the official uploader; I hope dropbox doesn't deter you. https://www.dropbox.com/s/alv6jq6vnvshgzs/stack.blend?dl=0

You'll have to set the output path and should then be able to reproduce by pressing render.


You need to set Alpha Threshold to 0, then all materials will be equally solid as ID Masks. Don't know what you're after with the set alpha nodes, but they don't do anything in this node setup so you can skip them.enter image description here

| improve this answer | |
  • $\begingroup$ Yup, works for both, MaterialID and ObjectID, thanks! $\endgroup$ – WhatAMesh Sep 10 '18 at 16:43

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.