The Material Library LOP has a "Tab Menu Mask" parameter (inside the Tab Menu collapsible folder) that filters the entries in the Tab menu inside.
You can add your name to that list. Or if you name your HDD with the "builder" suffix, then the globbing entry '*builder' should already allow it.
Found 639 posts.
Search results Show results as topic list.
Solaris and Karma » Creating a custom Materialbuilder hda
-
- rafal
- 1460 posts
- Offline
Solaris and Karma » .mtlx to .usda?
-
- rafal
- 1460 posts
- Offline
There is no direct conversion from .mtlx to .usda in Houdini. The only way to to it is to read .mtlx with a Sublayer LOP (Tab > File), and then save the LOP's stage out to .usda file (eg, RMB on the LOP > Save > ...)
Solaris and Karma » How to extend the MaterialX standard library?
-
- rafal
- 1460 posts
- Offline
Solaris and Karma » filename substitution in materialx
-
- rafal
- 1460 posts
- Offline
vrbn studiosGeomPropValueUniform will be available in the next version of Houdini.
This could also be achieved with the new GeomPropValueUniform node which was added to materialx last month. Is there a timeline yet for when this could be added to houdini?
Solaris and Karma » nested shaderX
-
- rafal
- 1460 posts
- Offline
tamteOr if you want to have two levels deep, then you should be able to put down a subnet inside the LOP, and put the material builders inside it. Then point to them in the LOP's parameters to create USD materials.
My current solution is to create a "Material Library" node and add a MaterialX Shader Builder node for each sub-mesh.
Technical Discussion » Can't save default.shelf in 20.5
-
- rafal
- 1460 posts
- Offline
What version of Houdini are you using? There were some issues with saving shelf tools, and that bug has been fixed in H20.5.402.
Solaris and Karma » Mtlx Hda questions
-
- rafal
- 1460 posts
- Offline
It should work fine in any H20.5. Make sure you switch to Karma in the viewport top-right corner.
Edited by rafal - Aug. 28, 2024 16:27:08
Solaris and Karma » Karma AOVs won't work inside a subnet (and therefore HDA)
-
- rafal
- 1460 posts
- Offline
The subnet in the kma_aovs.hiplc file needs a "Render Mask" spare parm to help Solaris figure out the correct shader translator. See attached fixed file.
The Material Library LOP traverses VOPs starting from the terminal (eg, subnet outputs in this case), and for each VOP it tries to use an appropriate shader translator based on the render mask intrisic property of an HDA or based on 'shader_rendermask' parameter. Karma networks consist of MaterialX and Karma-only nodes, so the translators can switch from node to node.
The subnet VOP can be quite problematic because it is common node use by many "languages", so deciding on a correct translator can be tricky. There are some heuristics trying to guess a best match, and it works most of the time. Here however, it looks like a wrong translator is picked which messes up the shader translation.
Because only Karma understands AOVs set up like that, it is crucial that the translation is performed using the karma shader translator throughout the whole network. And for that, the subnet needs to have that Render Mask spare parm set.
You can add such spare parm from RMB on the subnet > Parameters and Channels > Edit Parameter Interface..., then in the left-most panel choose Node Properties and search for "shader_". You will see a bunch of spare parms that help guide the translation of VOPs, and "Render Mask" is one of them.
The Material Library LOP traverses VOPs starting from the terminal (eg, subnet outputs in this case), and for each VOP it tries to use an appropriate shader translator based on the render mask intrisic property of an HDA or based on 'shader_rendermask' parameter. Karma networks consist of MaterialX and Karma-only nodes, so the translators can switch from node to node.
The subnet VOP can be quite problematic because it is common node use by many "languages", so deciding on a correct translator can be tricky. There are some heuristics trying to guess a best match, and it works most of the time. Here however, it looks like a wrong translator is picked which messes up the shader translation.
Because only Karma understands AOVs set up like that, it is crucial that the translation is performed using the karma shader translator throughout the whole network. And for that, the subnet needs to have that Render Mask spare parm set.
You can add such spare parm from RMB on the subnet > Parameters and Channels > Edit Parameter Interface..., then in the left-most panel choose Node Properties and search for "shader_". You will see a bunch of spare parms that help guide the translation of VOPs, and "Render Mask" is one of them.
Solaris and Karma » Mtlx Hda questions
-
- rafal
- 1460 posts
- Offline
This popped up again recently so I re-did the example using an HDA as jsmack suggested.
Solaris and Karma » MtlX Signature prefixes
-
- rafal
- 1460 posts
- Offline
It's probably because you used "-n switch_20" on the command line. I think the MaterialX shader name is derived from the HDA name.
You can change the shader name in the HDA Op Type Properties in Houdini (RMB > Edit Operator Type). In the inputs/outputs there is a shader name for each signature. You can change that to an arbitrary shader name.
You can change the shader name in the HDA Op Type Properties in Houdini (RMB > Edit Operator Type). In the inputs/outputs there is a shader name for each signature. You can change that to an arbitrary shader name.
Solaris and Karma » Vop2mtlx: UI with no input connections - Ordered Menu
-
- rafal
- 1460 posts
- Offline
MaterailX shader nodes have only inputs, thus only VOP node inputs get translated to materialx. However, your channel reference approach (to the 'blend_mode' top parameter) should work, since ultimately you are setting a value on a MaterialX shader input.
As for the color-space value, in MaterialX, they are authored as an attribute of the input element. But `vop2mtlx.py` might not be handling them properly. It, it may be a bug/limitation of that script.
As for the color-space value, in MaterialX, they are authored as an attribute of the input element. But `vop2mtlx.py` might not be handling them properly. It, it may be a bug/limitation of that script.
Solaris and Karma » Network Boxes not supported in USD and Edit Material Network
-
- rafal
- 1460 posts
- Offline
Eventually yes, Houdini will utilize the UsdUIBackdrop but there are higher priorities at the moment. Houdini will need to do it for Karma and MaterialX builders. The 3rd party renderers will need to author them in their custom shader translators. And Houdini's Edit Material Network will need to recognize them for all renderers.
Solaris and Karma » Mtlx Hda questions
-
- rafal
- 1460 posts
- Offline
MR SMITHYou're welcome. Happy to hear it worked.
Thanks Rafal! truly appreciate the effort creating those files. I managed to do some tests.
MR SMITHI think that's all fine. You can create HDAs in Indie, but they are saved in an indie format, so will downgrade the session if loaded into a fully commercial session.
*One thing that was a bit weird is that I was able to make an .hda file without issues even though i'm on Indie. Is this something temporary or did that limitation change?
MR SMITHYes, it's reliable, and will continue to be. That's pretty much how MaterialX standard nodes are processed for Houdini releases.
Is this roundtrip with mtlx / hda / json still reliable for future hou versions and mtlx standards?
Solaris and Karma » Mtlx Hda questions
-
- rafal
- 1460 posts
- Offline
Actually HoudiniGL seems to recognize the karmaNodeGraphs.json file, so it renders the new custom shader as long as it's implemented entirely with standard MaterialX nodes.
The rough steps are:
1) Build a subnet VOP containing the implementation of your custom shader. There are some annoyances with defining subnet inputs and naming them. Pretty much the input name is imposed by the Subnet VOP, and will need to be hand-edited in step 3.
2) RMB > Save > MaterialX... to a foo.mtlx file
3) Hand edit the foo.mtlx file to add the nodedef element for you shader. Also delete the shader nodes that are outside of the nodegraph but were saved nonetheless in step 1. Remember to remove references to them from the nodegraph's inputs and outputs.
4) run the `mtlx2hda.py` and the `mtlx2karma.py` scripts on the command line to create an .hda file for Houdini (to crate new VOP nodes) and .json for Karma to render them.
5) test out by restarting Houdini, loading .hda and creating a new node.
Here is an example .hip file with steps described in the sticky notes. This file works in my setup. The .hda and .json files should be put in Houdini search path, but they also work if you just start Houdini from the command line in the foo subdir.
The rough steps are:
1) Build a subnet VOP containing the implementation of your custom shader. There are some annoyances with defining subnet inputs and naming them. Pretty much the input name is imposed by the Subnet VOP, and will need to be hand-edited in step 3.
2) RMB > Save > MaterialX... to a foo.mtlx file
3) Hand edit the foo.mtlx file to add the nodedef element for you shader. Also delete the shader nodes that are outside of the nodegraph but were saved nonetheless in step 1. Remember to remove references to them from the nodegraph's inputs and outputs.
4) run the `mtlx2hda.py` and the `mtlx2karma.py` scripts on the command line to create an .hda file for Houdini (to crate new VOP nodes) and .json for Karma to render them.
5) test out by restarting Houdini, loading .hda and creating a new node.
Here is an example .hip file with steps described in the sticky notes. This file works in my setup. The .hda and .json files should be put in Houdini search path, but they also work if you just start Houdini from the command line in the foo subdir.
Solaris and Karma » Mtlx Hda questions
-
- rafal
- 1460 posts
- Offline
Native mtlx nodes should be faster than python shader translation scripts invoked during cooking.
To get .mtlx shader implementation you can use `vop2mtlx` or you may have some luck with RMB > Save > MaterialX. You may still need to manually adjust the .mtlx and create the nodedef for your shader.
Then you will need to run mtlx2karma to generate karma networks for your mtlx shader.
This probably means that HoudiniGL will not render your shader, though.
To get .mtlx shader implementation you can use `vop2mtlx` or you may have some luck with RMB > Save > MaterialX. You may still need to manually adjust the .mtlx and create the nodedef for your shader.
Then you will need to run mtlx2karma to generate karma networks for your mtlx shader.
This probably means that HoudiniGL will not render your shader, though.
Solaris and Karma » Mtlx Image string inputs connection return error
-
- rafal
- 1460 posts
- Offline
Indeed, MaterialX 1.38 does not have a geom prop value shader that would return a uniform string. There is one planned for 1.39.
p.s.
In MaterialX 1.38 is a little bit iffy when it comes to strings they can only be uniform, and yet geom prop value shader returns a varying string.
p.s.
In MaterialX 1.38 is a little bit iffy when it comes to strings they can only be uniform, and yet geom prop value shader returns a varying string.
Solaris and Karma » Network Boxes not supported in USD and Edit Material Network
-
- rafal
- 1460 posts
- Offline
Edit Material Network re-constructs the shader network from USD primitives. And the USD shader primitive network does not encode the network boxes.
P.s., There is a concept of UsdUIBackdrop, but the shader translators don't make use of it yet.
P.s., There is a concept of UsdUIBackdrop, but the shader translators don't make use of it yet.
Solaris and Karma » Issue with Edit Material Properties node
-
- rafal
- 1460 posts
- Offline
This is a bug in the Edit Material Properties LOP, which is being worked on.
It has trouble with hide-when and disable-when expressions, because that LOP deals with "inputs:diffuseDoubleSided" (incoded into alpha-numeric name to avoid a colon), but the hide-when expression still uses just "diffuseDoubleSided" from the shader's HDA node.
In the parameter pane toolbar, if you click (gear) > Edit Parameter Interface, you can manually clean it up. Eg, delete the hide-when expression, and accept. Then the parameters should show up.
It has trouble with hide-when and disable-when expressions, because that LOP deals with "inputs:diffuseDoubleSided" (incoded into alpha-numeric name to avoid a colon), but the hide-when expression still uses just "diffuseDoubleSided" from the shader's HDA node.
In the parameter pane toolbar, if you click (gear) > Edit Parameter Interface, you can manually clean it up. Eg, delete the hide-when expression, and accept. Then the parameters should show up.
Solaris and Karma » Solaris Material Networks hanging when in Manual mode
-
- rafal
- 1460 posts
- Offline
You can contact support@sidefx and ask to be added to that issue ticket to see the status.
Solaris and Karma » Karma Material Builder plugged into Collect node
-
- rafal
- 1460 posts
- Offline
Usually, you can just connect the shader outputs to the Collect inputs.
This should produce a USD Material primitive with several terminal outputs uniquely identifying shader type (surface vs. displacement) and shader context (karma vs mtlx).
This should produce a USD Material primitive with several terminal outputs uniquely identifying shader type (surface vs. displacement) and shader context (karma vs mtlx).
token outputs:kma:displacement.connect = </materials/collect1/karmamaterial.outputs:displacement>
token outputs:kma:surface.connect = </materials/collect1/karmamaterial.outputs:surface>
token outputs:mtlx:displacement.connect = </materials/collect1/mtlxmaterial.outputs:displacement>
token outputs:mtlx:surface.connect = </materials/collect1/mtlxmaterial.outputs:surface>
-
- Quick Links