Some issues about aiOslShader in Maya 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, all
I've been testing aiOslShader node recently and I noticed that this node not really follows the OSL specification (especially the parameters UI configuration). I'm not sure if it's because some hidden tricks not been recorded into document yet, or this node is actually not ready to go.
Here is a simple example I use in my testing and what I'v done is just to connect it's output to aiFlat node:
shader TestShader
[[ string help = "Get the Wireframe Color",
string label = "Wire Color",
string category = "Scene Attributes" ]]
(
string coordspace = "object"
[[ string widget="popup",
string help = "world, object, camera, shader, screen, NDC, raster, or an explicitly named coordinate system",
string options="world|object|camera|shader|screen|NDC|raster",
int editable=1 ]],
output color outValue = 1.0,
output float outValueR = 0.0,
output float outValueG = 0.0,
output float outValueB = 0.0)
{
outValue = color(0.2, 0.5, 0.9);
outValueR = outValue[0];
outValueG = outValue[1];
outValueB = outValue[2];
}
and issues reveal in my testing are:
1. It works when connecting aiOslShader node's "outValue" to aiFlat node's "Color", but it fails when connect the color components between two nodes. I'm not sure whether aiOslShader could support multiple output or not.
2. "widget" seems like not take effect at all. I've tried several widget types but always got a text field.
3. When changing the output name and re-compile, old output knobs still appear on aiOslShader node (you can check it in node graph)
4. It looks like in 3ds Max users can provide a ".ui" file to make a pretty UI for OSL shader. Is there any counterpart in Maya ?