HI,
is it possible inside a material network to use a custom attribute as input for the switch node ? That way you could assign different textures based on object id's . I k now I can get a custom float attribute in there, and I can use it to shade things, but I can't seem to access that value and use it as input for the, switch node, node selector, etc...
Thanks !
Wout
Switch node + attribute
Moderator: juanjgon
The node switcher node is not a conventional Octane shader node. It is an internal plugin tool designed to physically rewire the shader tree at the scene extraction time, so it only can have fixed parameters. I'm afraid that this node can't be configured using attributes. Perhaps you could use the material or texture mixer nodes to configure your shader.
Thanks,
-Juanjo
Thanks,
-Juanjo
Hi Juanjo,
Hmm, if you have only two inputs then yes that would work, with a boolean 0-1 input, but for multiple textures?
Perhaps with a texture osl ? I'd have to get into the coding part there, I'm not familiar with that.
Hmm, if you have only two inputs then yes that would work, with a boolean 0-1 input, but for multiple textures?
Perhaps with a texture osl ? I'd have to get into the coding part there, I'm not familiar with that.

Last edited by WoutTgh on Wed Mar 11, 2020 11:25 pm, edited 1 time in total.
So I was playing around with the osl texture node
here's what I got:
The float comes in, because I can see it shading the box,
inside the osl node it seems to always return 1 and not the float value ?
here's what I got:
The float comes in, because I can see it shading the box,
inside the osl node it seems to always return 1 and not the float value ?
Hello again,
so I did two tests,
in the first I'm simply passing on the value from the colour vertex attribute to the osl shader which passes it on correctly to the diffuse input. In the second test I'm trying to include it into an if statement, which doesn't seem to work, unless I've made a syntax mistake perhaps. ( no error warnings though)
so I did two tests,
in the first I'm simply passing on the value from the colour vertex attribute to the osl shader which passes it on correctly to the diffuse input. In the second test I'm trying to include it into an if statement, which doesn't seem to work, unless I've made a syntax mistake perhaps. ( no error warnings though)
Simplified tests: when the output color is set to a single float value, it works,, when it is set to a color/vector with 3 components, it doesn't work.