[Bf-cycles] Booleans/switches in the Cycles node system and reversing the direction of the ray switch node.

Matthew Heimlich matt.heimlich at gmail.com
Sun Mar 24 22:16:07 CET 2013

Hey all,

I'm wondering how hard it would be to add something akin to a
boolean/switch node in the Cycles node editor, ideally something where
you could click a checkbox or on/off button and have the ability to
turn sections of a node group on and off. This would make the creation
of complex node groups much more reasonable, as currently having
complicated node groups where parts are turned on and off solely with
sliders is substantially slower than using individual nodes. For
example, with my ubershader, making it a simple diffuse shader takes
about 15-30% longer than just using a diffuse shader because the
entire rest of the shader tree still needs to be evaluated for each
sample. Ideally a boolean toggle would tell the renderer not to even
traverse the tree for additional shader types if they aren't turned
on. I realize a true ubershader will be coming soon and will most
likely make the above case void, but it would still be a useful tool
to have in the future for creating a personal (or shared) shader

My other suggestion (which would probably be more difficult to change)
is to reverse the direction of the ray switch node. As is, it is
really only usable as a factor for a mix node, which means with
complicated materials where as many time-saving tricks are taken as
possible you need nearly a dozen mix/ray type nodes to get the desired
effect. My suggestion is to change the function of the ray switch and
instead have it function as a node that sits just before the surface
output node. Rather than working as a factor, it would operate by
plugging all desired outputs into the desired ray types on the left
side of the node with a single output on the right side. Obviously
each socket would have to be able to accept more than one input,
something I'm not sure if the node system is currently capable of? I
can create an image showing how this would look if that is confusing
for anyone.

Anyway, I just think that those ideas would go a long way towards
getting the shader nodes for Cycles up to the level of other packages.
The node system in Blender is already the fastest, cleanest, and
easiest to use that I'm aware of. With a little more "oomph" it could
certainly become comparatively powerful as well.

More information about the Bf-cycles mailing list