How can i use a texture as a mask and how can i assign a pass index to an output.


How can i use a texture as a mask and how can i assign a pass index to an output.

Please see attached blend and image.
I want to use the noise texture as a mask but i am having trouble doing so. As you can see, the glossy node is also applying a glossy effect over the emission shader, i only want it to affect the black parts where the diffuse is.

Also, is there a way to add a pass index only on the blue emission shader? I want only the glow to be blurry.

Thank you.


Attachments

Rocks.blend (7.04 MB)

you could use the emission pass instead of the matid…

http://pasteall.org/blend/index.php?id=46410

I don’t see any problem here, the compositor node setup is responsible for what you see. I rendered your scene without the compositor and everything is correct.

Unfortunately it’s impossible to set a pass index on a single shader in a material node setup. However, you can use a Glare node set to Fog Glow by adjusting the threshold. Adding a Blur node after the Glare will make the blur more noticeable. Here is the node setup for the compositor and the resulting render.



Thanks for the help, both of you.

Thanks for the info Akikun, think i will go with Secrop’s method though.