Node Selector Node Input number

Forums: Node Selector Node Input number
Houdini Integrated Plugin

Moderator: juanjgon

Node Selector Node Input number

Postby blobbybarack » Mon May 11, 2020 9:25 am

blobbybarack Mon May 11, 2020 9:25 am
Can we set more than 8 pins with the selector node ?
blobbybarack
Licensed Customer
Licensed Customer
 
Posts: 250
Joined: Sun Feb 03, 2013 9:11 pm
Location: Paris

Re: Node Selector Node Input number

Postby bassruettler » Mon May 11, 2020 8:16 pm

bassruettler Mon May 11, 2020 8:16 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; }
}
bassruettler
Licensed Customer
Licensed Customer
 
Posts: 18
Joined: Fri Jan 10, 2020 5:24 pm

Re: Node Selector Node Input number

Postby juanjgon » Tue May 12, 2020 9:17 am

juanjgon Tue May 12, 2020 9:17 am
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
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Re: Node Selector Node Input number

Postby blobbybarack » Tue May 12, 2020 8:11 pm

blobbybarack Tue May 12, 2020 8:11 pm
Thank you juanjgon.
I still don't have the Osl reflex for now.
This is a very elegant way to takle this problem.
blobbybarack
Licensed Customer
Licensed Customer
 
Posts: 250
Joined: Sun Feb 03, 2013 9:11 pm
Location: Paris

Return to Houdini


Who is online

Users browsing this forum: No registered users and 11 guests

Fri Apr 19, 2024 6:46 am [ UTC ]