Plugin for building MaterialX Graphs in Substance Designer 2020.2.0
Note, this is a beta version and it's not ready for production use yet.
The plugin is NOT compatible with MaterialX v 1.38. Use 1.37 for now
Installation and usage instructions can be found in the file doc/README.md in the package.

A video getting started tutorial is avialble here: https://www.youtube.com/watch?v=bduf3TWmeMY

v 0.1.5

* Updated floor sample to avoid issues with Designer 10.2.0
* Updated Shader bindings to be more compatible with third
party consumers of MaterialX documents
* Updated paths to always use forward slashes
* Added documentation on how to use shaders in Arnold for Maya
* Corrected bug in tiled image in MDL
* Added support for the normal map node

Full changelog available in the package

Uploaded: over 1 year ago
Updated: 5 months ago
Version: 6
File Name: substance-designer-material...
Size: 3.73 MB

DownloadblackDOWNLOAD



DISCUSS
over 1 year ago

"sduserplugin" folder default install folder name is "sduserplugins"


over 1 year ago

YEESSSS!!


over 1 year ago

Огонь!


over 1 year ago

@Barecore, good catch. I'll update it for the next version!


over 1 year ago

@remark3dcz
Ignore the layout in the previous response. The message was incorrectly formatted to show exactly how things should NOT be :)
MaterialX should be a subdirectory od sdmatxplugin and nothing else


over 1 year ago

Hi David, I tried yet before, but same error


over 1 year ago

I do not know why, but if I do all according to readme.md, both MaterialX and sdmatxplugin are with errors under Plugin Manager. If I look into console protocol, I can see that sdmatxplugin do not see MaterialX. I t is ok. But MateriaX can not find "MaterialX.PyMaterialXCore". So it means that MaterialX is not "install" correctly. Is somewhere manual how implement MateralX correctly to SD? Is need some python 3 or another else? Anyway MaterialX console errors:

[ERR][2987][Python]Traceback (most recent call last):
[ERR][2988][Python] File "C:/Users/xboxp/Documents/Allegorithmic/Substance Designer/python/sduserplugins\MaterialX\__init__.py", line 1, in
[ERR][2989][Python]
[ERR][2990][Python]from .main import *
[ERR][2991][Python] File "C:/Users/xboxp/Documents/Allegorithmic/Substance Designer/python/sduserplugins\MaterialX\main.py", line 3, in
[ERR][2992][Python]
[ERR][2993][Python]from .PyMaterialXCore import *
[ERR][2994][Python]ModuleNotFoundError
[ERR][2995][Python]:
[ERR][2996][Python]No module named 'MaterialX.PyMaterialXCore'

---

sdmatxplug console errors:

[ERR][2997][Python]Traceback (most recent call last):
[ERR][2998][Python] File "C:/Users/xboxp/Documents/Allegorithmic/Substance Designer/python/sduserplugins\sdmatxplugin\__init__.py", line 66, in
[ERR][2999][Python]
[ERR][3000][Python]raise BaseException('MaterialX not found')
[ERR][3001][Python]BaseException
[ERR][3002][Python]:
[ERR][3003][Python]MaterialX not found


over 1 year ago

@remark3dcz
From the error it looks like MaterialX is directly in the sduserplugins. It shound be in the directory sdmatxplugin where the plugin is located.
The directory should be
sduserplugins
|__sdmatxplugin
|__...
|__MaterialX


over 1 year ago

I do not know why happen this:
[ERR][704][Python] File "C:/Users/xyj/Documents/Allegorithmic/Substance Designer/python/sduserplugins\sdmatxplugin\__init__.py", line 88, in initializeSDPlugin
[ERR][705][Python]
[ERR][706][Python]_buildMDLFiles()
[ERR][707][Python] File "C:/Users/xyj/Documents/Allegorithmic/Substance Designer/python/sduserplugins\sdmatxplugin\__init__.py", line 47, in _buildMDLFiles
[ERR][708][Python]
[ERR][709][Python]content = sdmatx.mtlx2mdl_library(m, 'shared', mtlx_search_path)
[ERR][710][Python] File "C:\Users\xyj\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\python\sdmatx\mtlx2mdl.py", line 801, in mtlx2mdl_library
[ERR][711][Python]
[ERR][712][Python]if isNodeSupported(node_def):
[ERR][713][Python] File "C:\Users\xyj\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\python\sdmatx\mtlx2mdl.py", line 96, in isNodeSupported
[ERR][714][Python]
[ERR][715][Python]nodeTypeSupported = mtlx_nodeDef.getType() in mtlxToMdl_types
[ERR][716][Python]LookupError
[ERR][717][Python]:
[ERR][718][Python]Nodedef: TestSuiteOptions has no outputs


over 1 year ago

remark3dcz: What version of designer are you using. It looks like it tries to load materialx but it fails which might be related to being on 2019 where the python version 3.6


over 1 year ago

xianyaoji
Your issue should be fixed in the updated release. Sorry for the inconvenience


over 1 year ago

Thank you!


over 1 year ago

Thanks Dave, I did how you desribed, but still different errors:

[ERR][2994][Python]Traceback (most recent call last):
[ERR][2995][Python] File "C:/Users/xboxp/Documents/Allegorithmic/Substance Designer/python/sduserplugins\sdmatxplugin\__init__.py", line 74, in initializeSDPlugin
[ERR][2996][Python]
[ERR][2997][Python]import sdmatx
[ERR][2998][Python] File "C:\Users\xboxp\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\python\sdmatx\__init__.py", line 1, in
[ERR][2999][Python]
[ERR][3000][Python]from .paths import getDataDirectory, \
[ERR][3001][Python] File "C:\Users\xboxp\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\python\sdmatx\paths.py", line 6, in
[ERR][3002][Python]
[ERR][3003][Python]import MaterialX as mx
[ERR][3004][Python] File "C:\Users\xboxp\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\MaterialX\python\MaterialX\__init__.py", line 1, in
[ERR][3005][Python]
[ERR][3006][Python]from .main import *
[ERR][3007][Python] File "C:\Users\xboxp\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\MaterialX\python\MaterialX\main.py", line 3, in
[ERR][3008][Python]
[ERR][3009][Python]from .PyMaterialXCore import *
[ERR][3010][Python]ModuleNotFoundError
[ERR][3011][Python]:
[ERR][3012][Python]No module named 'MaterialX.PyMaterialXCore'
[WRN][3013][Default](0): QSqlDatabasePrivate::database: requested database does not belong to the calling thread.
[WRN][3014][Default](0): QSqlQuery::prepare: database not open


about 1 year ago

<>1>


about 1 year ago

alert()


about 1 year ago

<.1


about 1 year ago

<>hello


about 1 year ago

Will there be a Mac version? Or is there a work around?


about 1 year ago

tracyParker

It works on mac but unfortunately there are no compatible MaterialX binaries available for it at this point. We hope to find a solution to that down the road to make it more smooth to use it but at the moment you need to compile it yourself.


about 1 year ago

2020.1.3(10.1.3) 安装失败


about 1 year ago

Hi, David!
Could you please clarify, what is the correct way to work with textures here?
So far I was able to connect textures (creating texture_2d sample with link to packaged texture, then gamma correct it, for basecolor), without getting any errors referring to MDL conversion.
However, I still can't use normal maps. I'm connecting texture sample to vector3 converter, or image_vector3 sampler, but I'm always getting the bad shading in viewport. If I connect normal map from the sbs graph, I get the MDL error, but shading is correct.
Also, can you clarify what purpose does a sbs graph serve? Why do I need to point at it on export, if there is no way to actually use its outputs? (MDL conversion error pops up and blocks the export)


about 1 year ago

IVedroid
There are a number of questions related to texturing in there. If you adhere to the rules in the videos https://youtu.be/bduf3TWmeMY and https://youtu.be/5VLs9nRqOAA you should be fine.
I.E Always reference textures through usage attributed (Resources and sbs instances in the graph only works for iRay anyway). Always reference the normal map through a sampler and not a vector3/color or resource. Then route it through the algnormalTStoWS. When referring to it in the wrong way there is occasionally an automatic tangent space to world space conversion happening for iRay meaning which will not be there for the other renderers.

The floor sample and painter sample in the package shows how to correctly bind textures


about 1 year ago

Great, thank you!


10 months ago

Hi Substance team, thank you very much for the plugin! it would be great if there are more tutorials and more samples for using the nodes of MateiralX in Substance Designer.


5 months ago

Hi!
I noticed that the plugin doesn't seem to export the stuff that materialX viewer expects, or there is a general miscommunication between which libraries are included or not between the viewer and the plugin.
Can you clarify, please, what the message "Could not find a nodedef for node "coat_tangent_rotate"" might mean, if the mtlx file doesn't have that node?
Then, there is the same error, but about "node_algsrgb_to_linear_1". File contains that node, and this message started appearing after I updated the materialX to 1.37.4. Previous message disappeared and is no longer reproduced.
Console also spams that viewer can't find bxdf\substanceMetallicRoughness.mtlx bxdf\ubershader_defs.mtlx alglib\alglib_defs.mtlx alglib\alglib_ng.mtlx Looks like those were removed, but the plugin still uses some of them.

Additionally, there is also an issue with exporting material for preview from Substance. It doesn't copy the textures from resources, or doesn't pick up reference correctly, so the viewer launches without any textures. Same for the export into file - I have to manually write correct relative paths into the mtlx file.

This is a bit confusing and looks like I'm once again missing something obvious.

Long story short - I can't seem to be able to view any of the exported materials in the viewer. Preview from plugin somewhat works, but exported file just doesn't open, showing errors about missing includes instead.
What might be the cause of that and how do I synchronize what I see in the plugin with what viewer expects?


5 months ago

Okay, I feel extremely stupid now.
I managed to make it work, because I figured out the usage you talked about, so you can ignore what I wrote there.
Sorry for bothering you, but I hope if someone with the head as empty as mine will be searching for answers, they'll see it.
Both videos you posted are extremely important. They need to be watched, thoroughly, no skipping around.


4 months ago

Im getting an error:
[ERR][604][SDMaterialX]Failed to initialize MaterialX plugin: MaterialX not found or can't load. Place installation in sdmatxplugin/MaterialX

Here is the path to the MaterialX folder on my HD:
C:\Users\\Documents\Allegorithmic\Substance Designer\python\sduserplugins\sdmatxplugin\MaterialX

Tried with both 2020.2.2 and 2021.1.2

thoughts?


4 months ago

^^ All good now, i think i had 1.38 materialx instead of 1.37


2 months ago

I try every think I cant. but he still not work. I cant see the imagine in Substance Designer https://prnt.sc/139zmmt


2 months ago

Make sure you are downloading the 1.37 version of MaterialX. (which is not the latest binary on GitHub) You will have to go here:
https://github.com/materialx/MaterialX/releases/tag/v1.37.4


2 months ago

Dont work for me they say that error after I make sure he was in the good folder
[ERR][1496][SDMaterialX]Failed to initialize MaterialX plugin: MaterialX not found or can't load. Place installation in sdmatxplugin/MaterialX