Node Selector Node Input number

Houdini Integrated Plugin

Moderator: juanjgon

Post Reply
blobbybarack
Licensed Customer
Posts: 250
Joined: Sun Feb 03, 2013 9:11 pm
Location: Paris
Contact:

Can we set more than 8 pins with the selector node ?
bassruettler
Licensed Customer
Posts: 18
Joined: Fri Jan 10, 2020 5:24 pm

blobbybarack wrote:Can we set more than 8 pins with the selector node ?
If you want to switch textures/colors, then you could write an osl texture like this:

Code: Select all

shader Texture(
    color in0 = 0,
    color in1 = 0,
    color in2 = 0,
    color in3 = 0,
    color in4 = 0,
    color in5 = 0,
    color in6 = 0,
    color in7 = 0,
    color in8 = 0,
    color in9 = 0,
    output color c = 0)
{
    int i = 0;
    if (i == 0) { c = in0; }
    if (i == 1) { c = in1; }
    if (i == 2) { c = in2; }
    if (i == 3) { c = in3; }
    if (i == 4) { c = in4; }
    if (i == 5) { c = in5; }
    if (i == 6) { c = in6; }
    if (i == 7) { c = in7; }
    if (i == 8) { c = in8; }
    if (i == 9) { c = in9; }
}
User avatar
juanjgon
Octane Plugin Developer
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Be aware that the node selector is not a standard Octane shading node. It is a tool created on the plugin side to physically rewire the shader node tree while building complex HDAs, like the render target.

In a shading workflow, probably the material mixer node, or an OSL solution like the one posted above could be better.

Thanks,
-Juanjo
blobbybarack
Licensed Customer
Posts: 250
Joined: Sun Feb 03, 2013 9:11 pm
Location: Paris
Contact:

Thank you juanjgon.
I still don't have the Osl reflex for now.
This is a very elegant way to takle this problem.
Post Reply

Return to “Houdini”