Additional settings in material groups

Hello.

I’m making lately a blend file with materials for speeding up setting up the scenes etc.
But since some materials are so similar so it requires a small change in the group itself to make them separate.
Is it possible to make a input option of group working as On/Off (1/0 if we say it in binary :P)?
And to connect it to such option in the group for ie. Clamp in MixRGB?

I hope I didn’t make it too complicated.

There’s no way to have a real switch but there’s a way around. For your specific case of a switch in between 2 Color Mix nodes, here is what I’d do:


(You didn’t say if it was for Cycles or BI. I can assure that it works with Cycles. For BI, I would only say that it works in theory since all the required nodes are available.)

What happens here is that the Math node “Greater Than” makes the switch in between the Mix node without clamping and the one with clamping depending on the value fed to the “Clamp” socket. The “Clamp” value is limited to the range 0 to 1 to makes things easier to handle. You just need to click and pull toward 0 or 1 and you even have a very comfortable margin since the test is on 0.5. The output value of the “Greater Than” node is only 0 or 1 so, here is your binary switch!

Of course, I made a node group so it’s reusable as well in the same file as appended in another one. (I love node groups!) :smiley:

Thank you for reply. It’s better than nothing. :wink:
And yes I meant groups for Cycles.
I’m happy that doesn’t require any Open Shading Language stuff, because it’s not supported by GPU rendering :frowning: