"Matte" shader?

Hello!
Is there a shader for the Rhino renderer that just reveals the background / sets the alpha channel to black? Mostly called “Matte” shader. No VRay, please.
It does actually nothing, but returns the background color. Kinda trivial, but seemingly missing.

What’s it good for: easier postproduction in PShop of course. In my case (architecture on top of a photo), I want to see the background image where a wall is. Everything behind the wall should be background, too.
(I’ve written exactly one shader in my life, in C, for Softimage XSI back then - this one).

Thanks!

You may want to check the rendering channels for Rhino Render, specifically Object IDs and Material IDs.

Ok, thanks!
I’ve turned them on in the render settings:
image

… but where can I see the extra channels in the render window, and how can I save them? (Tried openexr, but there weren’t the respective channels in it)
image

Through the View menu. Select either Material IDs or Object IDs, then hit the save icon. Save as EXR.

I show in this short video how you can use these:

1 Like

Thank you, Nathan! Got what I needed.
Yet nothing good that cannot be made better:

  • Maybe put these two
    image
    in the icon bar as well? All others are there, why not poor objectID and matID, too?

  • Why does saving the rendering as .exr not simply include the objectID and materialID? Why the need to save it extra? exr can hold any number of channels.

  • Just a sidenote: I work with Affinity Photo (would be the same with PShop), and it took me a while to figure that I need to apply an ‘Exposure’ adjustment to the objectID 32bit image with quite a low value, to see the ‘usable content’.


    Then the image needs to be converted to 8bit, because in 32bit, the ‘Select sampled color’ tool does not work.
    Some hoops to jump through to finally get a simple mask for an object.

  • Therefore, a ‘matte’ shader would still make sense, because it would spare all of the above…
    There doesn’t happen to be a shader-SDK for Rhino Render, does it?

Thanks!

Not at the moment, but I’m designing something like that for Rhino 9.

Right now there is also no user control over material and object ID, I hope for Rhino 9 that will be remedied as well.

1 Like