Community
Arnold for Maya Forum
Rendering with Arnold in Maya using the MtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't Compile OSL for Arnold; function 'empirical_bssrdf' not declared

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
396 Views, 2 Replies

Can't Compile OSL for Arnold; function 'empirical_bssrdf' not declared

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.

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

What version of MtoA are you using?

It works for me:

empirical-bssrdf.png



empirical_bssrdf is declared in C:\Program Files\Autodesk\Arnold\maya2020\osl\include\stdosl.h



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

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.

Post to forums  

Technology Administrators