Unable to load OSL shader in Houdini

Unable to load OSL shader in Houdini

jstewartJ2BWZ
Explorer Explorer
1,155 Views
7 Replies
Message 1 of 8

Unable to load OSL shader in Houdini

jstewartJ2BWZ
Explorer
Explorer

Hi, I'm trying to load an OSL shader in Houdini and it's not working at all. The shader (Julius Ihles windowbox) works perfectly well in Maya and I was expecting it to do the same in Houdini. I've tried loading directly into the OSL node but I get no usable parameters. I've also tried exporting from Maya and importing as a .mtlx osl .ass. Same result every time. Undefined output and no parameters. Hoping it's just human error. Any help is much appreciated. Thanks


0 Likes
1,156 Views
7 Replies
Replies (7)
Message 2 of 8

madsd
Advisor
Advisor

Does this compile and return a somewhat light grey color?


shader i
(
float a = 0.3,
output float b = 0,
)
{
b = a+a;
}
0 Likes
Message 3 of 8

jstewartJ2BWZ
Explorer
Explorer

I don't even get that far with my above method. What is now working is the shader is loading because i placed a compiled version in the shader folder. Arnold now picks it up. However, it's not rendering as a box as it does in maya. Just as a plane. The images are the correct colour so far.


0 Likes
Message 4 of 8

jstewartJ2BWZ
Explorer
Explorer

After exporting the basic plane from Maya - it now works as expected. I will investigate what the difference between my Houdini and Maya planes are tomorrow. wb1.JPGwb2.JPG

0 Likes
Message 5 of 8

Stephen.Blair
Community Manager
Community Manager

HtoA is missing the osl/include folder

htoa-osl.png



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 6 of 8

jstewartJ2BWZ
Explorer
Explorer

Thanks Stephen. So, I need to get the stdosl.h file and add it to my HtoA folder, is that correct? Where would I find that file?

0 Likes
Message 7 of 8

Anonymous
Not applicable

The stdosl.h file is located here:
\HtoA\htoa-6.0.2.0_r0ad447a_houdini-19.0.498.py3\scripts\materialx\stdlib\osl

0 Likes
Message 8 of 8

Stephen.Blair
Community Manager
Community Manager
Arnold needs ../osl/includes (relative to the location of Arnold itself eg ai.dll or libai.so)

HtoA is missing that in the install (Arnold and the other plugins have it)




// Stephen Blair
// Arnold Renderer Support
0 Likes