Author Topic: MaterialX  (Read 2495 times)

The new MatX plugin needs a intro Tutorial.
Im not able to get something usefull out of it.

Even the installation doc is confusing.
Is there anything in the works?

I have the same feeling that the install is very confusing, I have to read the init.py code to figure out the right MaterialX path.
Now that I successfully install the plugin, but I can't preview the material because of the error "Failed to convert MaterialX to MDL".

Same here im not able to export my materials.
Error :: "MDL to MaterialX Conversion Error. No output node defined in the Graph."
Last Edit: April 10, 2020, 02:31:43 pm

Same here.
I installed MaterialX successfully, but can't make a step for further works.
AND tutorials for MDL in substance academy are too old to apply current SD.

Even docs for MDL or MaterialX are not enough to do something with it.

where are you supposed to put the prebuilt materialX files?  The documentation is a bit confusing.

I copied them beside the substane plugin into an new folder i named MaterialX.

Im still have a hard time getting it to work.

I have tried copying the MaterialX folder to:
C:\Users\{user name}\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\MaterialX

and
C:\Users\{user name}\Documents\Allegorithmic\Substance Designer\python\sduserplugins

and I get a bunch of errors in the console
[ERR][1190][Python]Traceback (most recent call last):
[ERR][1191][Python]  File "C:/Users/gngda/Documents/Allegorithmic/Substance Designer/python/sduserplugins\sdmatxplugin\__init__.py", line 88, in initializeSDPlugin
[ERR][1192][Python]   
[ERR][1193][Python]_buildMDLFiles()
[ERR][1194][Python]  File "C:/Users/gngda/Documents/Allegorithmic/Substance Designer/python/sduserplugins\sdmatxplugin\__init__.py", line 47, in _buildMDLFiles
[ERR][1195][Python]   
[ERR][1196][Python]content = sdmatx.mtlx2mdl_library(m, 'shared', mtlx_search_path)
[ERR][1197][Python]  File "C:\Users\gngda\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\python\sdmatx\mtlx2mdl.py", line 801, in mtlx2mdl_library
[ERR][1198][Python]   
[ERR][1199][Python]if isNodeSupported(node_def):
[ERR][1200][Python]  File "C:\Users\gngda\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\python\sdmatx\mtlx2mdl.py", line 96, in isNodeSupported
[ERR][1201][Python]   
[ERR][1202][Python]nodeTypeSupported = mtlx_nodeDef.getType() in mtlxToMdl_types
[ERR][1203][Python]LookupError
[ERR][1204][Python]:
[ERR][1205][Python]Nodedef: TestSuiteOptions has no outputs

I tried looking at the images of the python project in the doc folder and it doesnt help.  I downloaded the pre-built librarlies and extracted the files into a MaterialX folder.


Thanks
Gregg

Have you set the python path in Designer?

And did you download the VisualStudio2017 version of MaterialX?

I downloaded:
MaterialX_Windows_VS2017_x64_Python37
from the github page.  Do I also need to have visual studio installed?

Where do I point the python project path to?


I used the root of the plugin for the python path.
C:\Users\{user name}\Documents\Allegorithmic\Substance Designer\python\sduserplugins

Like mentioned in the install Docs.

I have the python path pointed to the same location but I still get errors:

[ERR][1190][Python]Traceback (most recent call last):
[ERR][1191][Python]  File "C:/Users/gngda/Documents/Allegorithmic/Substance Designer/python/sduserplugins\sdmatxplugin\__init__.py", line 88, in initializeSDPlugin
[ERR][1192][Python]   
[ERR][1193][Python]_buildMDLFiles()
[ERR][1194][Python]  File "C:/Users/gngda/Documents/Allegorithmic/Substance Designer/python/sduserplugins\sdmatxplugin\__init__.py", line 47, in _buildMDLFiles
[ERR][1195][Python]   
[ERR][1196][Python]content = sdmatx.mtlx2mdl_library(m, 'shared', mtlx_search_path)
[ERR][1197][Python]  File "C:\Users\gngda\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\python\sdmatx\mtlx2mdl.py", line 801, in mtlx2mdl_library
[ERR][1198][Python]   
[ERR][1199][Python]if isNodeSupported(node_def):
[ERR][1200][Python]  File "C:\Users\gngda\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\python\sdmatx\mtlx2mdl.py", line 96, in isNodeSupported
[ERR][1201][Python]   
[ERR][1202][Python]nodeTypeSupported = mtlx_nodeDef.getType() in mtlxToMdl_types
[ERR][1203][Python]LookupError
[ERR][1204][Python]:
[ERR][1205][Python]Nodedef: TestSuiteOptions has no outputs


Any idea what is happening?

Thanks

Now that you have all those errors i took a closer look to the console.

I have also a lot of errors but the plugin is working.
If i start Designer i get the option to create a MaterialX Graph in the beginning.
If i move the MaterialX to an other location i dont get this option. So i assume its working.

Here my log.

[ERR][850][Python]Traceback (most recent call last):
[ERR][851][Python]  File "C:/Users/mir/Documents/Allegorithmic/Substance Designer/python/sduserplugins/sdmatxplugin\__init__.py", line 100, in initializeSDPlugin
[ERR][852][Python]   
[ERR][853][Python]ShadergraphPlugin.initializeShaderGraph()
[ERR][854][Python]  File "C:\Users\mir\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\python\ShadergraphPlugin\__init__.py", line 22, in initializeShaderGraph
[ERR][855][Python]   
[ERR][856][Python]MaterialXEditor.init()
[ERR][857][Python]  File "C:\Users\mir\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\python\ShadergraphPlugin\MaterialXEditor.py", line 88, in init
[ERR][858][Python]   
[ERR][859][Python]sdGraphDefinition.addType(sdType)
[ERR][860][Python]  File "C:/Program Files/Allegorithmic/Substance Designer/resources/python\sd\api\sdgraphdefinition.py", line 128, in addType
[ERR][861][Python]   
[ERR][862][Python]raise APIException(SDApiError(_res))
[ERR][863][Python]sd.api.apiexception
[ERR][864][Python].
[ERR][865][Python]APIException
[ERR][866][Python]:
[ERR][867][Python]SDApiError.Undefined
[WRN][868][Python]Failed to load plugin '__init__'
[ERR][869][Python]Traceback (most recent call last):
[ERR][870][Python]  File "C:/Users/mir/Documents/Allegorithmic/Substance Designer/python/sduserplugins/sdmatxplugin\python\__init__.py", line 66, in <module>
[ERR][871][Python]   
[ERR][872][Python]raise BaseException('MaterialX not found')
[ERR][873][Python]BaseException
[ERR][874][Python]:
[ERR][875][Python]MaterialX not found
[WRN][876][Python]Failed to load plugin 'python'

greggdaly: I am working on a fix for this issue. It should be on share before the end of the day.
moduglu: This issue seem to be related to the MaterialX libraries not loading. Can you confirm you are on Designer 2020/10.1.1?
The python version was upgraded from 3.6 to 3.7 between the versions and the MaterialX python libraries won't load properly in the old version

New build is up now. Should fix greggdaly's issue.
Hoping to provide a release soon providing better error messages when loading the materialx libraries fails.

Yes im on 2020/10.1.1
Is there anything else i could do?