Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OSL Datatype 'color' with 'outAlpha' in Maya

2 REPLIES 2
Reply
Message 1 of 3
campi81
544 Views, 2 Replies

OSL Datatype 'color' with 'outAlpha' in Maya

Hi,

I am relatively new to OSL coming from a GLSL background so forgive me if this is ignorant.

I am having trouble in Arnold with Arrays running out of range when connecting an OutColor.Red in maya from Node A to a Node B with an OSL Parameter of Datatype float.

Vice Versa if I define a variable in the OSL Node with Datatype 'color' and connect an OutAlpha from another Node into the Parameter of the OSL Node I get

[osl] Index [3] out of range in[0..2]: :-683395736 (group MyOSLNode, layer 1 arnold_link0_0, shader arnold_link0_0)

Do I need to define every attribute as a float[4] array and do all the processing for each [i] in order for the user to be able to freely mix and match float values (OutAlpha to In.red, Out.red to in.value etc.) the way they are used to in standard maya nodes ?

Thanks,

Jens

Tags (2)
Labels (2)
2 REPLIES 2
Message 2 of 3
Stephen.Blair
in reply to: campi81

Out Color R to Cin.R works for me. It's Out Alpha to Cin.R that gives the index out of range error.

Could be a bug in the range checking code.



// Stephen Blair
// Arnold Renderer Support
Message 3 of 3
campi81
in reply to: campi81

Thanks Stephen.

You are right OutColorR to Cin.R works, it is always OutAlpha that is acting up, for example OutAlpha to Cin.R as well. Guess I can't fix that but thanks for confirming that it might be a bug.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report