Hey,
I saw that there is a python script mentioned in the documentation called mtlx2hda.py to automatically convert mtlx node defs into Karma HDAs so I was wondering how do I use this script.
I see it supports a -p (—path) input for a mtlx file but I haven’t had any luck getting the script to work in any form (due to my lack of knowledge).
I would really appreciate it if someone could run me over how to use this script as it would be a very useful tool for me.
Best,
Rich
Found 37 posts.
Search results Show results as topic list.
Solaris and Karma » mtlx2hda.py | How do I use it?
- Hypershader
- 37 posts
- Offline
Solaris and Karma » MaterialX Thinfilm BSDF not Working
- Hypershader
- 37 posts
- Offline
Hi,
I was wondering if anyone had any luck using the Thinfilm BSDF
I have tried layering it on top of dielectrics, conductors and diffuse BSDFs as well as using it on its own (which is not expected to work) And I haven’t had any luck.
I mentioned this in the MaterialX Discord Server’s Solaris chat and it seems no one else there has had any luck with the BSDF either.
If it is functional it would be great to see an example of it working.
Best
Rich
I was wondering if anyone had any luck using the Thinfilm BSDF
I have tried layering it on top of dielectrics, conductors and diffuse BSDFs as well as using it on its own (which is not expected to work) And I haven’t had any luck.
I mentioned this in the MaterialX Discord Server’s Solaris chat and it seems no one else there has had any luck with the BSDF either.
If it is functional it would be great to see an example of it working.
Best
Rich
Solaris and Karma » MaterialX Layer has limited functionality.
- Hypershader
- 37 posts
- Offline
Hey,
I was wondering how I can go about using the mtlx2hda.py script mentioned in the documentation you sent over?
Best,
Rich
I was wondering how I can go about using the mtlx2hda.py script mentioned in the documentation you sent over?
Best,
Rich
Solaris and Karma » MaterialX Layer has limited functionality.
- Hypershader
- 37 posts
- Offline
Solaris and Karma » MaterialX Layer has limited functionality.
- Hypershader
- 37 posts
- Offline
Hi Rafal,
Thanks for the speedy answer.
I'm assuming this is due to Houdini not using the most up to date version of MaterialX?
When I take a look at the pbrlib_def.mtlx there is a ND for ND_layer_vdf which takes a VDF base and a BSDF top.
Since the Lama definitions were only put in since 1.38.2 I'm also assuming this definition was not around in the version implemented into Houdini which im guessing is just using 1.38.0?
If so this makes sense and i hope an update for this can be released at some point in the future.
Also us it possible to make our own MaterialX VOP nodes based on the ND's for the time being or is this not available for public access? and are there any resources available for writing shaders for karma?
Thanks for your help,
Rich
Thanks for the speedy answer.
I'm assuming this is due to Houdini not using the most up to date version of MaterialX?
When I take a look at the pbrlib_def.mtlx there is a ND for ND_layer_vdf which takes a VDF base and a BSDF top.
Since the Lama definitions were only put in since 1.38.2 I'm also assuming this definition was not around in the version implemented into Houdini which im guessing is just using 1.38.0?
If so this makes sense and i hope an update for this can be released at some point in the future.
Also us it possible to make our own MaterialX VOP nodes based on the ND's for the time being or is this not available for public access? and are there any resources available for writing shaders for karma?
Thanks for your help,
Rich
Edited by Hypershader - March 21, 2022 13:38:44
Solaris and Karma » MaterialX Layer has limited functionality.
- Hypershader
- 37 posts
- Offline
Hi,
I have recently been creating the Lama node definitions inside of Solaris using the MaterialX BSDFs and the Node definitions from MaterialX and I noticed that the mtlxlayer node doesn't have the functionality described by MaterialX
in the pbr spec it states:
If transmission scattering is enabled the node may be layered over a VDF describing the surface interior to handle absorption and scattering inside the medium, useful for colored glass, turbid water, etc.
The mtlxlayer (layer) should support the layering of vdf and bsdf with an output result of bsdf.
It seems this is currently not supported and I was wondering if this will be possible in the future, otherwise a true implementation of the lama nodes defined by MaterialX is not possible.
Best,
Rich
I have recently been creating the Lama node definitions inside of Solaris using the MaterialX BSDFs and the Node definitions from MaterialX and I noticed that the mtlxlayer node doesn't have the functionality described by MaterialX
in the pbr spec it states:
If transmission scattering is enabled the node may be layered over a VDF describing the surface interior to handle absorption and scattering inside the medium, useful for colored glass, turbid water, etc.
The mtlxlayer (layer) should support the layering of vdf and bsdf with an output result of bsdf.
It seems this is currently not supported and I was wondering if this will be possible in the future, otherwise a true implementation of the lama nodes defined by MaterialX is not possible.
Best,
Rich
Edited by Hypershader - March 21, 2022 09:16:55
Solaris and Karma » MaterialX | Importing Node Definitions/Graphs
- Hypershader
- 37 posts
- Offline
Basically all I’m asking is will sideFX create an alternative import/export for MaterialX that supports NodeDefs at some point. USD currently does not support NodeDefs for MaterialX meaning we cant import the majority of MaterialX materials that ship with MaterialXView or any materials made in Houdini from BSDFs
This means the syntax from the saved file is wrong and even if the syntax was correct, it would still not be able to be reimported through USD as NodeDefs are not supported yet.
This is the reason the Lama nodes are not working and why we cannot transfer BSDFs but can transport Standard Surface meaning we need an alternative way to import MaterialX or hope that USD supports NodeDefs in the future
Best,
Rich
This means the syntax from the saved file is wrong and even if the syntax was correct, it would still not be able to be reimported through USD as NodeDefs are not supported yet.
This is the reason the Lama nodes are not working and why we cannot transfer BSDFs but can transport Standard Surface meaning we need an alternative way to import MaterialX or hope that USD supports NodeDefs in the future
Best,
Rich
Solaris and Karma » MaterialX | Importing Node Definitions/Graphs
- Hypershader
- 37 posts
- Offline
jsmackHypershader
But even totally functioning MaterialX nodegraphs in MaterialXView cannot be imported into Houdini which would say this isn’t an issue of the correct node graph setup as anything other than a standard surface fails, this is an issue with the USD Mtlx importer as a whole as it does not support nodegraphs with BSDFs as it only imports the surface (see screenshot from my first post).
mtlx nodegraphs from other sources have worked when imported to Houdini most of the time, such as from the AMD material library.
as I mentioned in that bit you quoted, everything other than standard surface materials fails.
as far as I'm aware the AMD material node graphs are all using the standard surface so they work totally fine right? I could be wrong as I have only tried one or two materials from there
Edited by Hypershader - March 18, 2022 12:27:17
Solaris and Karma » MaterialX | Importing Node Definitions/Graphs
- Hypershader
- 37 posts
- Offline
rafal
Anyway, try saving starting from Mtlx Surface Material VOP, and things may be smoother.
Likewise, I have tried this and still no results as it produces a broken MaterialX file with incorrect syntax.
What I originally tried is:
Oren-nayar diffuse —-> surface —-> surface material
The exported mtlx file does not work.
MaterialX view claims the syntax is wrong and Houdini cannot read the BSDF nodes back (see my first post)
It does not seem to include <output> or <nodegraph> in the MaterialX file so not even MaterialXView cant identify it is a Material so no wonder it can’t be read back into Houdini as it’s not even exporting valid materials.
As far as I am aware, I have not seen a single person get this to work.
But even totally functioning MaterialX nodegraphs in MaterialXView cannot be imported into Houdini which would say this isn’t an issue of the correct node graph setup as anything other than a standard surface fails, this is an issue with the USD Mtlx importer as a whole as it does not support nodegraphs with BSDFs as it only imports the surface (see screenshot from my first post).
Even if it does support it, when saving out the MaterialX file, the syntax is still incorrect and can’t even be read into MaterialXView, therefore it is not a valid mtlx material
Would be great to know if sideFX are aware of these issues/limitations and what plans there are to overcome them as otherwise MaterialX has no real advantage over the vex shaders as you cant even export and import <nodegraphs> from one Houdini session to another, let alone between other softwares.
Best,
Rich
Edited by Hypershader - March 19, 2022 03:15:14
Solaris and Karma » MaterialX | Importing Node Definitions/Graphs
- Hypershader
- 37 posts
- Offline
jsmack
As far as I can tell, writing out mtlx files is completely non-functional. The resulting mtlx is either invalid, or missing all of the nodes from the graph.
It works fine if it's used entirely within the context of usd, and not for exporting to mtlx.
I agree, the output file does seem broken due to the lack out <nodegraph> and <output> but if manually added they do work successfully in MaterialXView.
The issue seems to be you cannot import nodegraphs back into Houdini even after the syntax is fixed as they are not supported to import through USD through a sublayer.
That being said, it works for the standardsurface for some odd reason??? I’m assuming as it’s recognised as a material by USD instead of as a shader/node.
I’m assuming this is because <nodegraph> and <output> are not required for these shaders as they are pre compiled in the material. If not then I have no clue.
Would definitely be interesting to hear why this is happening and what’s causing the issue because as far as I can see it is on the USD/Solaris side and not with MaterialX files as the shaders do work in MaterialX once tweaked to have the correct syntax. That being said, the syntax does need to be fixed when exporting nodegraphs. Having a Save -> MaterialX Nodegraph which fixes the syntax issues would be a great option so you don’t have to manually edit it.
Either way, it’s exciting to see SideFX implement such an exciting project and at least on the Karma side it’s running very well in general.
Solaris and Karma » MaterialX | Importing Node Definitions/Graphs
- Hypershader
- 37 posts
- Offline
Hey,
Thanks for the reply!
As far as I am aware, the UsdMtlx file format allows for nodegraph transfer as listed on the documentation but could it be the case its not properly supported yet? here [graphics.pixar.com]
Unfortunately it does say that nodedefs are not currently supported but this shouldn't affect node graphs, right?
It does seem to work when plugging a standard surface into a surface material but this is the only situation I can get it to work. for any materialX files with node graph definitions. It does not seem to work when plugging a BSDF into a surface. I cannot open this file in MaterialX View either as you can see in the attachment below.
see attachment 1:
Taking a look at the exported BSDF nodes Mtlx file and comparing it to the node definition which works in MaterialXView there seems to be some discrepancies. those being the lack of:
<nodegraph> and <output>
see attachment 2: file on the left is the node definition and the right is a mtlx file saved from Houdini using the method above.
When i add <nodegraph> and <output> manually, I can succesfully load this file into MaterailXView.
see attachment 3:
Unfortunately, I cannot reimport this file back into Houdini through a sublayer. So im assuming this is due to a lack of support on USD end for importing MaterialX node graphs despite what it says in the documentation? This would explain why we cannot import the lama nodes as well as they are node graph definitions.
If you have any more insight I would love to know. It would be amazing if we could have an alternative way of importing node graph definitions into houdini as currently through USD it does not seem to work restricting the use of Houdini's implementation of MaterialX massively. I cannot stress how impressed I am with the implementation this far, and i look forward to see what's to come!
Thanks for the reply!
As far as I am aware, the UsdMtlx file format allows for nodegraph transfer as listed on the documentation but could it be the case its not properly supported yet? here [graphics.pixar.com]
Unfortunately it does say that nodedefs are not currently supported but this shouldn't affect node graphs, right?
It does seem to work when plugging a standard surface into a surface material but this is the only situation I can get it to work. for any materialX files with node graph definitions. It does not seem to work when plugging a BSDF into a surface. I cannot open this file in MaterialX View either as you can see in the attachment below.
see attachment 1:
Taking a look at the exported BSDF nodes Mtlx file and comparing it to the node definition which works in MaterialXView there seems to be some discrepancies. those being the lack of:
<nodegraph> and <output>
see attachment 2: file on the left is the node definition and the right is a mtlx file saved from Houdini using the method above.
When i add <nodegraph> and <output> manually, I can succesfully load this file into MaterailXView.
see attachment 3:
Unfortunately, I cannot reimport this file back into Houdini through a sublayer. So im assuming this is due to a lack of support on USD end for importing MaterialX node graphs despite what it says in the documentation? This would explain why we cannot import the lama nodes as well as they are node graph definitions.
If you have any more insight I would love to know. It would be amazing if we could have an alternative way of importing node graph definitions into houdini as currently through USD it does not seem to work restricting the use of Houdini's implementation of MaterialX massively. I cannot stress how impressed I am with the implementation this far, and i look forward to see what's to come!
Edited by Hypershader - March 17, 2022 09:03:35
Solaris and Karma » MaterialX | Importing Node Definitions/Graphs
- Hypershader
- 37 posts
- Offline
Hi All,
I've tried exporting a simple MaterialX graph with a diffuse bsdf, surface and surfacematerial and haven't had any luck.
I'm assuming this is due to Node Definitions/Graphs not being supported yet.
I was wondering if anyone has had any luck or knows of any developments into this area as it would be great to be able to import graph definitions such as the lama node set as well as import custom node graphs exported as mtlx.
Best,
Rich
I've tried exporting a simple MaterialX graph with a diffuse bsdf, surface and surfacematerial and haven't had any luck.
I'm assuming this is due to Node Definitions/Graphs not being supported yet.
I was wondering if anyone has had any luck or knows of any developments into this area as it would be great to be able to import graph definitions such as the lama node set as well as import custom node graphs exported as mtlx.
Best,
Rich
Edited by Hypershader - March 16, 2022 11:07:03
Solaris and Karma » Creating Primvars with Python in LOPs
- Hypershader
- 37 posts
- Offline
for anyone interested you just need to add 'primvars:'+ to the front and then set the custom to false with 0 at the end
example.
example.
asset.CreateAttribute('primvars:test', Sdf.ValueTypeNames.String,0).Set('hi')
Edited by Hypershader - Feb. 18, 2022 14:01:32
Solaris and Karma » Creating Primvars with Python in LOPs
- Hypershader
- 37 posts
- Offline
Hey,
Thanks this seems to work great for creatiing an attribute but unfortunately it isn't a primvar so i cannot reference it in a shader
I do need to be able to create a Primvar so any more info in regard to this would be useful
Thanks this seems to work great for creatiing an attribute but unfortunately it isn't a primvar so i cannot reference it in a shader
node = hou.pwd() stage = node.editableStage() from pxr import Sdf, Usd, UsdGeom asset = stage.GetPrimAtPath('/Asset') asset.CreateAttribute('test', Sdf.ValueTypeNames.String)
I do need to be able to create a Primvar so any more info in regard to this would be useful
Edited by Hypershader - Feb. 18, 2022 07:55:17
Solaris and Karma » Creating Primvars with Python in LOPs
- Hypershader
- 37 posts
- Offline
Hi,
I was wondering how I would go about creating a primvar using python inside of Solaris?
I hope someone can help!
Best,
Rich
I was wondering how I would go about creating a primvar using python inside of Solaris?
I hope someone can help!
Best,
Rich
Technical Discussion » Tagging MaterialX BSDF to be used in a LPE
- Hypershader
- 37 posts
- Offline
Hi dlee,
Thanks for explaining this, I am currently on 0.455 so this explains why the SSS label isn’t working for me, I will give my Houdini an update
Do you know if there is any intention to make this not hard coded in the shader? Having an editable label on the MaterialX BSDF nodes would be incredibly useful in production to adjust specific specular lobes etc.
For example in a skin shader you could label a dielectric BSDF ‘sebum’ so you could adjust the sebum amount in comp without affecting the other specular lobes.
Just an idea!
Best,
Rich
Thanks for explaining this, I am currently on 0.455 so this explains why the SSS label isn’t working for me, I will give my Houdini an update
Do you know if there is any intention to make this not hard coded in the shader? Having an editable label on the MaterialX BSDF nodes would be incredibly useful in production to adjust specific specular lobes etc.
For example in a skin shader you could label a dielectric BSDF ‘sebum’ so you could adjust the sebum amount in comp without affecting the other specular lobes.
Just an idea!
Best,
Rich
Edited by Hypershader - Jan. 8, 2022 07:12:00
Technical Discussion » Tagging MaterialX BSDF to be used in a LPE
- Hypershader
- 37 posts
- Offline
Hi,
It seems that the mtlx subsurface shader in karma isn’t tagged with sss so it cannot be picked up by LPE so I was wondering how I can tag the BSDF nodes to be used in LPE.
The AOV and Dot node both seem to be unable to take a BSDF as an input and I don not want to do this on a surface level as I will be unable to layer other BSDF on top. Any ideas?
Best,
Rich
It seems that the mtlx subsurface shader in karma isn’t tagged with sss so it cannot be picked up by LPE so I was wondering how I can tag the BSDF nodes to be used in LPE.
The AOV and Dot node both seem to be unable to take a BSDF as an input and I don not want to do this on a surface level as I will be unable to layer other BSDF on top. Any ideas?
Best,
Rich
-
- Quick Links