I've tried every possible option on the export and usage of MaterialX, but can't seem to get it to work.
There is some basic documentation and a tutorial for Arnold, but following it does not get my materialx operator to work.
What I've tried:
- I've exported a range of materials using the "Export Selection to MaterialX" script in the utilities tab. Using all export combinations.
- I also tried all the examples of the materialx website.
- I've tried applying a materialX operator in the Operator tab in the render settings
- I also tried applying it to a ass file and a gpu cache.
The materialx operator doesn't give an error and on materialx files with looks it also displays them in the look field, so it's recognizing the files, but on rendering it doesn't overwrite the original shaders.
(the ignore operators options also isn't enabled)
Does anybody have a idea what I'm doing wrong, what the correct workflow is or why it's not working?
Also does anybody know for sure if the shaders made in maya can be exported as materialx and used in Houdini. That's all I'm trying to test.
Cheers,
Aron
Using: Mtoa 3.3.0.2 (Core 5.4.0.2), Maya 2019
Solved! Go to Solution.
Solved by Stephen.Blair. Go to Solution.
Use Arnold shaders only (ones that are listed in nodedefs.mtlx)
Is the selection expression of the materialx operator selecting the right object? Set the log verbosity to Debug to see whether's it matches.
I only used standard surface shaders and for Selection I used different options like (*) for selecting everything and (*.(@node == 'polymesh')) for all meshes. But nothing sticks.
Do a test on a sphere with the default name pSphereShape1 and select that specific node
still doesn't work...
here is the render log: arnold.1.txt
and here the tranlation info output, if that helps. Its the only log that mentions MaterialX: arnold_translation_output.txt
here one of the .mtlx files I'm using: SimpleSrf.txt (saved as .txt, otherwise I couldn't upload it)
Use Standard Surface, not the Maya surface shader.
When I export my own shader standard surface shader it also doesn't work:
here is the .mtlx export from a standard surface shader on which I only adjusted the base color and weight.
You export full paths like /pSphere1/pSphereShape1
That's the name you have to match
So in Maya, you need to turn on Render Settings > System > Render Settings > Export Full Paths
Also, for now I would use the pipe character | instead of forward slashes /
Turning on Render Settings > System > Render Settings > Export Full Paths in combination with using the pipe character as export seperator fixed the issue.
It turns out the Export Full Path option box in the materialx exporter has to be the same as set in the arnold render settings.
Thanks Stephen:)
Additional question... I don't know if anyone is still gonna read this. But now I'm questioning my belief on what materialx is capable of.
Is it possible to apply a materialx to not just the object that generated it, but also other objects? What is the selection suppose to do in the materialx operator if it is only going to assign the shader to the object that generated it?
Can I remove the materialassign from the .mtlx file so it can be assigned to all objects?
I thought it was possible to create a material library of materialx files that could be assigned to anything you'd want.
The selection is to select the object in the scene with a name that matches the name exported to materialx
So you cannot assign that material to any object in the scene that matches the selection expression.
The materialx operator itself is fairly flexible and supports glob expressions to assign things to geometries and collections. The general idea is that the materialx documents contain look-dev for individual assets, where the assignments are relative to the asset for portability across shots. The operator selection can then filter what assets in the scene are subject to a particular look-dev, e.g. imagine one case where you have 10 characters and you want to vary the look version or variant for certain characters.
Note that in the future the intention is that the operator will also support assigning materials without predefined assignments in the mtlx document. In that case the idea is that the operator selection is the only assignment, where instead of choosing a look you choose a material that the selection should get.
Lastly, the current export process bakes out the assignments to give you a look that can be approved, where it works best with stand ins as the look will be portable across shots and other DCCs. We plan to offer more flavours of look dev processes in the future so stay tuned.
Thanks Orn,
That clears things up.
I watched all the talks about materialx and remembered the possibility of assigning materials without predefined assignments. Now I know I'm getting ahead of myself:P
Apart from standins how would the assignment work across DCCs? Don't DCCs maintain different naming conventions? Making it pretty hard to make the assignment work.
Let's take Maya and Houdini as an example. How would one assign a .mtlx file to a object in Houdini that came from maya and that was used to create the .mtlx file in maya?
One simple thing would be to allow baking materialx files relative to some point in the hierarchy, where the look can then be reapplied relative to a different prefix path in a different DCC for instance.