I recently posted a quick video of a very basic and yet useful Node Group setup in Blender. I think it was a little esoteric and perhaps people didn’t think it a serious post. It was serious and for me very useful. So I decided to explain the Group here and perhaps others may find it useful too.

The Node Group

alt text As you see there are no nodes inside the Node Group this is intentional as none are actually needed. The magic is done by the input connector, labelled Toggle above. See the settings for this below.

Add an Empty Group

You may be wondering how the empty group is created:
Blender doesn’t have an empty Node Group in the Add menu, so you will need to make one. The easiest is to use a Value Node. Add it and then select it and hit CTRL-G to group it. Then remove the Value Node from within the Group and connect up as shown above:

The Group Input Connector

alt text With the Node Group expanded (select the node and hit TAB if it isn’t)
Select the Group Input and in the N-Panel select the Group Tab. Change the input socket type to Boolean, it is the one called Toggle in the diagram above, the label isn’t important, I used Toggle for clarity of use. The important part is that it is of Type Boolean.

The Group Output Connector

alt text You can also change the output connector name and type at this time too, again the name should be something that makes sense and the type is up to you, I went with Float as Type as that is the colour type the Fac input is, so it matches.

So what is happening

It may be a little confusing to find that an empty Group does anything at all, why is that.
The answer is that the input connector has a Boolean value of True or False (One or Zero), this the reason the Checkbox appears on the Node Group. This is then outputted directly (Nothing in between the input and output) as True=1 or False=0. In effect an On/Off Toggle is created.

By the way: don’t connect anything other than perhaps another Boolean to the input of the Node Group, the results won’t be what you want, it effectively bypasses the node entirely.

Example use case for the node

alt text

Well there you go the magic explained, I hope.

The original Mastodon post:

I can be reached on Mastodon: Mark B Tomlinson. You can also subscribe to this Blog via its RSS link