Hi everyone!
I’m new to shading and rendering in Maya, and I’m trying to create custom OSL shaders for Arnold. I can write and compile the OSL shaders into .oso
files using the oslc
compiler, but I’m not sure how to actually use and view the shader in Maya.
Here’s what I’m stuck on:
- How do I load and apply a custom OSL shader in Maya?
- How can I see the result of my custom shader in the render?
- How do I connect the OSL shader to a material like
aiStandardSurface
?
Example:
Here’s an example:
shader simple_shader(
color color = color(1, 0, 0),
output color outColor = 0
)
{
outColor = color;
}
I compile it to simple_shader.oso
, but I’m not sure what to do next in Maya to see it in the render.
Any help or advice would be much appreciated!
Thanks!