I'm trying to build a library of materials for a project by combining the materials I need from a few different sources into one single material library. The reason it needs to be in a material library node is because I want to substantially modify these materials so that they can be controlled by the "Vary Material Assignment" and "Material Variation" nodes.
The sources for these materials are the AMD mtlx materials, the built in mtlx materials, and a bunch of materials I got from Polyhaven. I've downloaded all of these into .mtlx files and their associated texture assets, and then I've imported them with a File LOP set to sublayer mode. And then I use an "Edit Material Network" node to reveal all of the mtlx shader nodes.
And then I copied those shader nodes into a new Material Library following the instructions I found in this forum post:
https://www.sidefx.com/forum/topic/86396/ [www.sidefx.com]
But it just doesn't work. Every single one of these materials work perfectly when I apply them with an Assign Material node after the Edit Material Network LOP, but then they break when I apply them with an Assign Material node after my fresh Material Library LOP.
It loads them fine when I click on auto-fill materials, and I can apply them just fine with the assign materials node. But then it just shows a simple black shiny material on the shader ball no matter what I do. I've checked the references to texture maps, and the file paths are all valid. I'm out of ideas. Has anyone been able to do this?
On that note, how do I even go about troubleshooting something like this? I'm not getting any errors, there isn't any console output or log files that I'm aware of, and there isn't any ability to preview a particular node in the shader graph to inspect the data at that point and get a sense of how things are progressing through the flow. Unlike every other part of Houdini that I've interacted with, as best as I can tell shaders are all or nothing - just works or doesn't - so I don't even know where to start looking to try to fix things.
Can't Copy Materials Into Material Library LOP
297 3 1-
- ubietyworld
- Member
- 20 posts
- Joined: Nov. 2022
- Offline
-
- ubietyworld
- Member
- 20 posts
- Joined: Nov. 2022
- Offline
Does anyone answer questions in solaris and Karma? Some other guy was asking an identical question not too long ago and nobody answers anything.
https://www.sidefx.com/forum/topic/100783/?page=1#post-444160 [www.sidefx.com]
This is a very basic thing we're trying to do. I can copy and paste nodes everywhere else in houdini but suddenly not here in Karma? Does anyone know why?
Why does nothing work why is there no support online, and I've spent the past month running in circles, constantly running into contradictory errors that lead nowhere.
Here's just one of many examples:
I import a bunch of perfectly functioning materials from a .usda file, but I want to edit the networks.
So I drop down an edit material network node, write scripts to populate the fields, load up the networks inside of it, edit things as needed, and it works beautifully.
But guess what! There's some bug in the edit material network node that doesn't let me save the project! It simply fails to save until I delete all of the material networks that I had edited. Once I delete them, everything saves perfectly.
So then I'm like ok, obviously it's better to try to do this in a material library LOP, so let's see if we can get these things into that. So I copy and paste them in from the edit material network node, just like I can in any other houdini context, and guess what. Suddenly all of the materials don't work at all.
No reason, no error, nothing. Just unable to work. I troubleshoot, I create a very simple material to do some tests on and nothing. Doesn't work. Neither the edit material network LOP or material library LOPs allow you to manipulate your existing materials without either corrupting the houdini project or just breaking all the materials.
Anyone have any suggestions? Anyone?
Why don't we just have the ability to import material networks. Am I supposed to always re-create every single material I ever use from scratch, bespoke for each project?
I thought USD was supposed to be the end all be all of cross compatibility, but I can't even do basic basic basic stuff with it.
https://www.sidefx.com/forum/topic/100783/?page=1#post-444160 [www.sidefx.com]
This is a very basic thing we're trying to do. I can copy and paste nodes everywhere else in houdini but suddenly not here in Karma? Does anyone know why?
Why does nothing work why is there no support online, and I've spent the past month running in circles, constantly running into contradictory errors that lead nowhere.
Here's just one of many examples:
I import a bunch of perfectly functioning materials from a .usda file, but I want to edit the networks.
So I drop down an edit material network node, write scripts to populate the fields, load up the networks inside of it, edit things as needed, and it works beautifully.
But guess what! There's some bug in the edit material network node that doesn't let me save the project! It simply fails to save until I delete all of the material networks that I had edited. Once I delete them, everything saves perfectly.
So then I'm like ok, obviously it's better to try to do this in a material library LOP, so let's see if we can get these things into that. So I copy and paste them in from the edit material network node, just like I can in any other houdini context, and guess what. Suddenly all of the materials don't work at all.
No reason, no error, nothing. Just unable to work. I troubleshoot, I create a very simple material to do some tests on and nothing. Doesn't work. Neither the edit material network LOP or material library LOPs allow you to manipulate your existing materials without either corrupting the houdini project or just breaking all the materials.
Anyone have any suggestions? Anyone?
Why don't we just have the ability to import material networks. Am I supposed to always re-create every single material I ever use from scratch, bespoke for each project?
I thought USD was supposed to be the end all be all of cross compatibility, but I can't even do basic basic basic stuff with it.
Edited by ubietyworld - yesterday 07:05:33
-
- rafal
- Staff
- 1468 posts
- Joined: July 2005
- Offline
I just posted a reply to the earlier thread [www.sidefx.com] mentioned above:
If it still does not work, could you post a simplified example .hip file that illustrates the issue?
I suspect that the issue here is that when loading from USD the Edit Material Network LOP adds a hidden spare parameter (called shader_primpath) to each VOP node to tag it with the USD primitive it was created from. When pasting, that tag is also pasted, and the Materia Library respects that spare parameter and authors the changes at that particular USD location.
When inside the Material Library LOP, you can go to the VOP's Edit Parameter Interface, and in the middle panel toggle on "Show Invisible Parameters", and then delete the spare parameter, since it's useful only for Edit Material Network LOP.
If it still does not work, could you post a simplified example .hip file that illustrates the issue?
-
- ubietyworld
- Member
- 20 posts
- Joined: Nov. 2022
- Offline
Yea it didn't sort things out. Here's a simplified project that should explain everything.
https://drive.google.com/file/d/14iEV0E4D2bchEkcZGNRdNXiow6Enzbcp/view?usp=share_link [drive.google.com]
https://drive.google.com/file/d/14iEV0E4D2bchEkcZGNRdNXiow6Enzbcp/view?usp=share_link [drive.google.com]
-
- Quick Links