Hi,
I have a problem with aiMaterialX nodes. (Issue tested in Windows 10, Maya 2020.4, Mtoa 4.2.0.0)
In Maya, I load an alembic cache in a Arnold Standin. I link a aiMaterialX node to this standin with shaders that I prepared. If I do an IPR render of the scene I see the correct result, ie I see the shaders applied to the alembic.
A thing I noticed is that when I specifiy the filepath to the mtlx file in the aiMaterialX node, I need to use backward slashes, instead of the usual forward slashes (for instance used in the filepaths of the aiIncludeGraph nodes). If I use forward slashes and do an IPR render, I have no shaders applied. And, by the way, if I use forward slashes, the looks inside the mtlx file are not detected
So far so good. The problem comes when sending this to batch rendering. I see the ass files references the materialX nodes using forward slashes :
materialx { name aiMaterialx1 selection "/*" filename "//server01/shared2/projects/devdo2021_P99999/assets/Prop/trucmuche/caches/operators/trucmuche_test01_v013.mtlx" look "default" }
And the kick crashes with this error :
............. 00:00:01 102MB | 1 materialx 00:00:01 102MB | 1 include_graph 00:00:01 102MB | 2 alembic 00:00:01 102MB | 00:00:01 102MB | rendering image at 960 x 540, 3 AA samples 00:00:01 102MB | AA samples max <disabled> 00:00:01 102MB | AA sample clamp <disabled> 00:00:01 102MB | diffuse samples 2 / depth 1 00:00:01 102MB | specular samples 2 / depth 1 00:00:01 102MB | transmission samples 2 / depth 8 00:00:01 102MB | volume indirect <disabled by depth> 00:00:01 102MB | total depth 10 00:00:01 102MB | bssrdf samples 2 00:00:01 102MB | transparency depth 10 00:00:01 102MB | initializing 12 nodes ... 00:00:01 116MB ERROR | [aiMaterialx1] file missing "//server01/shared2/projects/devdo2021_P99999/assets/Prop/trucmuche/caches/operators/trucmuche_test01_v013.mtlx": Failed to open file for reading: server01\shared2\projects\devdo2021_P99999\assets\Prop\trucmuche\caches\operators\trucmuche_test01_v013.mtlx
Is this a bug or am I doing something wrong ?
Issue tested in Windows 10, Maya 2020.4, Mtoa 4.2.0.0
The slashes are not the problem, it's a materialx-related problem.
This is, unfortunately, a known issue. And if you are rendering with kick, I don't see as workaround except "don't use UNC paths on Windows for materialx"
I would suggest Arnold pathmapping, but that doesn't seem to work with the materialx nodes.
Note: Arnold internally uses forward slashes, and when it loads an ass file, it automatically converts all back slashes to forward slashes. So it doesn't matter what slashes you put in the ass file.
Hi,
You say that this is a MaterialX problem, so you mean that it can only be solved in a materialX update ? Is this issue known on the materialX 'team' ? Should I report it to them ?
Thanks for the answer. I will try using drive letters