While trying to compile an osl file, I'm getting an error when I try to use the 'empirical_bssrdf' (and the randomwalk too).
For example, here's a simple osl file:
shader Example ( color color_in = color(0.3, 0.18, 0.18), output closure color out = 0 ) { out = color_in * diffuse(N); //out = empirical_bssrdf(vector(0.8, 0.4, 0.4), color_in);}
When I comment in the empirical line and compile with oslc, I get the error:
test.osl:6: error: function 'empirical_bssrdf' was not declared in this scope
Looking at the debug info, I see a 'subsurface' function available (different signature). If i switch to that function the osl compiles, but when I try to use it in arnold, I get this error:
error: function 'subsurface' was not declared in this scope
My version of oslc is this:
oslc -- Open Shading Language compiler 1.8.2.pixar1697a56
The docs say that empirical and randomwalk are supported:
https://docs.arnoldrenderer.com/display/A5ARP/OSL+Shaders
Is there something else I need to do? I didn't find anything wrt empirical_bssrdf and osl on the interwebs, but maybe I missed something. Help please.
What version of MtoA are you using?
It works for me:
empirical_bssrdf is declared in C:\Program Files\Autodesk\Arnold\maya2020\osl\include\stdosl.h
Thank you Stephen for the quick answer!
It helped me figure out what was going wrong. A different oslc was in my path before the one provided by Arnold. Fixing that fixed my issue.
Again, your answer was super helpful! Thank you so much!
Not that it matters, but this was my version of MtoA
MtoA 4.0.3.2 - 66869982 (master) - Jul 13 2020 10:27:55
Thanks again!
Jake
Can't find what you're looking for? Ask the community or share your knowledge.