The first thing I want to note is that I don’t think it works in 2022.1.2, but seems to function in 2022.0.1 (the ‘test extension’ function in the extension manager still appeared to fail in both)
But my main problem has to do with the export process itself. My first test was to import an mdl file, export it, reimport it, and use it.
The size alone shows that the material definition was not exported in full.
mdls are ascii files so I inspected the result. it seems it’s just trying to reference the old material. I will attach both below.
I’m wondering why it isn’t self contained…
For some extra background on my goal here:
I have some mdls unlike the copper material I used for testing that are many years old and are not defined as individual files. Instead they all reference ‘architectural.mdl’. I want to turn these old iray mdl materials into new ones that are each stored in their own file. Can I use the extension in this way?
Maybe it’s something to do with how the shaders are created in Create and my materials being predefined don’t translate to usdShade as expected?
Any advice is welcome.
Some errors that I only get sometimes and the files - the small one is the one generated by Create: copper.mdl (638 Bytes)
The intent of this feature is to allow you to capture modifications made via UsdShade graphs and fold those modifications back into MDL. It wasn’t really designed to parse and replicate the original source code. Which is possible but significantly more tricky.
For the problem you’re trying to solve, is there an advantage for you to have architectural.mdl as individual files?
I see - that makes sense based on the file contents, though I’m not sure why the file doesn’t resolve when reimported into create. If it’s really just referencing the old material I’m not sure what those console errors shown above have to do with that (maybe something else is causing them).
For the problem I’m trying to solve I need a database of materials and corresponding material ID numbers. For the sake of simplicity I couldn’t have materials referencing this ‘architectural.mdl’ - I want the finalized materials that come out of iray (all based upon that original material).
To contrast this:
A subset of my library consists of modern mdl files that are self-contained and easily referenced - the goal was to convert the old materials to this format. These modern ones have many subidentifiers and can contain many different shaders with similar physical properties (i.e. Glossy Paints with subidentifiers for many different colors of paint that just change the base_color). This is ideal. The architectural.mdl file does not work this way - it has barely anything in it and I think is just a template that is used by Iray and Create to make shaders in each software.
Even with the way this USDShade exporter works, it seems this should still be possible, they’ll just be constructed a little differently - please correct me if I’m wrong.
If there’s anything I can make clearer please let me know
I appreciate your time and your response, thank you!