question

Siddhartha Basu avatar image
Siddhartha Basu asked ·

OSL - standard_surface.osl with MtoA

Recently, Autodesk has open-sourced the versatile standard surface shader:

https://github.com/Autodesk/standard-surface


Unable to get this to work in Maya/Katana, anywhere else.

Added shader folder path to ARNOLD_PLUGIN_PATH, compiled to .oso as well...

Don't know what I'm doing wrong.

Can someone share mtd format as well. Is the maya.id required? What about in KtoA, HtoA, etc

Any help would be appreciated. Thanks


mtoastandard surfacekatanaoslshader transfer
1 comment
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

standard_surface is native to all Arnold plugins.

0 Likes 0 · ·
rachid Hadj Abderrahmane avatar image
rachid Hadj Abderrahmane answered ·

Create a folder somewhere, something like, C:/custom_OSL
#Maya
add this variable to Maya.env file
ARNOLD_PLUGIN_PATH = C:/custom_OSL/bin
MTOA_TEMPLATES_PATH = C:/custom_OSL/ae

#Houdini
add this variable to Houdini.env
ARNOLD_PLUGIN_PATH = C:/custom_OSL/bin

Download here:
custom_OSL.zip


custom-osl.zip (7.7 KiB)
3 comments Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Thanks a lot. Really appreciate this. This is pure gold. Saved me days of trial and error.

Apart from the OSL language specification doc, are there any guides/docs/resources you would know of to help write portable OSL shaders/lights/nodes?

Having trouble finding templates or guides for making mtd and template files.

Cutter (http://www.fundza.com/cutter/osl/arnold/getting_started/index.html) generates mtd on compiling OSL code. Wondering if there's docs to help with this.


Thanks again!

0 Likes 0 · ·

Sorry no doc, but to learn the syntax, just look at the mtoa.mtd file in:C:\Program Files\Autodesk\Arnold\maya2020\plug-ins

and the Template.py in C:\Program Files\Autodesk\Arnold\maya2020\scripts\mtoa\ui\ae

1 Like 1 · ·
Siddhartha Basu avatar image Siddhartha Basu rachid Hadj Abderrahmane ·

Noted. Thanks again!

0 Likes 0 · ·
Ragnar Cederlund avatar image
Ragnar Cederlund answered ·

Hi, can you share more information on exactly what you want to achieve? Standard surface is built in to Arnold, so you do not need to use the reference osl implementation from github.

Cheers,
Ragnar

1 comment Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Hi,

this is because we are collaborating with freelancers and other organizations who are either on different renderers (e.g., V-Ray, Clarisse, etc) as a result of which the option is to share LookDev-ed assets shaded with OSL to renderers which support OSL shaders while also maintaining visual fidelity.


We are also looking at sharing OSL lights(geometry with OSL emission() shaders)

Any help would be really appreciated. Thanks!

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.