Closed JenusL closed 5 years ago
The only piece of code I could find to explain this is shown below but I see no reason that wouldn't work... https://github.com/Autodesk/sitoa/blob/52a0a4b35f51bccb6223a8206d04b40edc80071c/plugins/sitoa/sitoa.cpp#L103-L113
Can you explain the behavior a bit more so I can reproduce?
Can you explain the behavior a bit more so I can reproduce?
Just try and render a scene that have a physical_sky
shader. The shader will not be exported to Arnold when rendering with xsibatch.
physical_sky
is a special case where it exits early in auto shaderdef code for it to be manually defined in ArnoldShaderDef.js
.
https://github.com/Autodesk/sitoa/blob/52a0a4b35f51bccb6223a8206d04b40edc80071c/plugins/sitoa/loader/ShaderDef.cpp#L554-L555
So far I've been unable to find why it's not working.
OK, I will try it later tonight.
So here's what I've found so far.
ArnoldShaderDef.js
is loaded first then Load()
in ShaderDef.cpp
because of the OnStartup
callback.Load()
is called directly which causes ArnoldShaderDef.js
to be loaded after.This is the only thing that differs the two.
Good news is that I think I have a work around, but I'm still not sure why the reverse load order is causing the shaders defined in ArnoldShaderDef.js
to fail in batch.
I made a fix for this but shaders that are defined in ArnoldShaderDef.js
needs to be explicitly skipped in ShaderDef.cpp
. See the above commit for the fix.
I should note that in the process I removed most of the manual define of physical_sky
from ArnoldShaderDef.js. Only the extra buttons at the bottom and the logic is defined there now, and the rest is handled by the auto shaderdef.
Now, only set_parameter
is defined in js.
As of right now, only
physical_sky
is defined inArnoldShaderDef.js
and that fails silently when rendering with xsibatch on Windows. Tested with testsuite, RoyalRender and just manual command. They all fail. Why would this happen? Is it a known limitation of some sort? @caron Do you have any idea?