Autodesk / Autodesk/arnold-usd
osl include path - shader not picked up
- Dominant language
- Python
- Stars
- 284
- Forks
- 68
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 14
Description
**Describe the bug**
I have a usd file where the shader is set like this
```
def Shader "MyShaderTest"
{
uniform token info:id = "osl:Category/MyShaderTest"
float inputs:density = 0.5
point3f inputs:inManifold = (0, 0, 0)
float inputs:normal_randomize = 0.5
string inputs:output_space = "world"
float inputs:scale = 0.1
color3f outputs:c_out
}
```
Shader lives under this directory
```
/dev/osl_test
└── Category
├── TestShader.osl
└── TestShader.oso
```
I'm setting arnold plugin path and osl include paths to
`/dev/osl_test:/dev/osl_test/Category`
But arnold render log throw this
```
00:00:00 254MB | loading plugins from /dev/osl_test ...
00:00:00 255MB | loading plugins from /dev/osl_test/Category ...
00:00:00 255MB | TestShader.osl: TestShader
00:00:00 255MB | loaded 1 OSL shaders in 0:00.00
....
00:00:00 315MB ERROR | node "osl:Category/MyShaderTest" is not installed
```
Tested in 7.1.3.1.
Should a token id which contains ex "osl:Category/" be expected to work?
Many thanks!
Contributor guide
Research direction
Reproduce the issue with the shown USD shader definition, the /dev/osl_test and /dev/osl_test/Category paths, and TestShader.osl/TestShader.oso. Start from the plugin and OSL include-path handling, then verify whether the osl:Category/MyShaderTest token is resolved; done means the behavior is clarified or the shader is correctly recognized.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100