Wiring OSL output nodes

andres.hernandezB63FL
Advocate

Wiring OSL output nodes

andres.hernandezB63FL
Advocate
Advocate

Hi everyone!
I'm very much stuck with this one so I was wondering if someone could give me a hand. 
I have created two OSL nodes:

idOSL.OSLpath = (getdir #maxroot) + "/OSL/" + "GetMtlID.osl"
mapOSL.OSLpath = (getdir #maxroot) + "/OSL/" + "Float1ofN.osl"

I need to connect to the mapOSL(Float1ofN) index input, the index output of the idOSL(GetMtlID), but I can't find a way to access to the specific out since the GetMtlID has 2 outputs (color and index)
I really appreciate any help. 
Thanks a lot

0 Likes
Reply
Accepted solutions (1)
351 Views
1 Reply
Reply (1)

andres.hernandezB63FL
Advocate
Advocate
Accepted solution

I found the solution. If anyone is stuck with the same, you need to use the texture map "MultiOutputChannelTexmapToTexmap ".
So in my case it would be something like this:

outMap = MultiOutputChannelTexmapToTexmap sourceMap:idOSL outputChannelIndex:2
mapOSL.index_map = outMap