Vop2mtlx: UI with no input connections - Ordered Menu

   284   3   1
User Avatar
Member
129 posts
Joined: Nov. 2016
Offline
Hi!

I want to ask something about the process of convert HDA nodes into MtlX. I'm a bit familiarized with the process thanks to the Shader Guy [www.youtube.com] video.

Right know I have the three process working correctly (vop2mtlx, mtlx2hda and mtlx2karma), I already converted some shaders.

Now I want to ask if there is any way to export an UI that is not represented as a node input, for example an Ordered Menu that controls an internal Switch node, this kind of menu:



Or which can be the method to have a menu like that controlling an internal switch node? Right now I only copied the parameter as relative reference to the switch controller with no success, the created mtlx node has only the color inputs that I created with the Subnet Input Connectors, but nothing from the Ordered Menu that the HDA has on the UI controlling the switch, and the ordered menu values are float to be compatible with the Switch "which" parameter.



Maybe I need to create the menu manually on the mtlx file? Let me know if there is something I can do,

Thanks!
User Avatar
Member
129 posts
Joined: Nov. 2016
Offline
Well after check a lot of MtlX nodes I see that almost none of them have that kind of UI, so maybe that's something we can't do yet with MtlX? I'm not very familiarized with the current limitations we can have with it.

Let me know, thanks!
User Avatar
Staff
1449 posts
Joined: July 2005
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.
User Avatar
Member
129 posts
Joined: Nov. 2016
Offline
Hi Rafal, thanks for your answer.

Yes the `vop2mtlx.py` probably can't translate Ordered Menus indeed, I found that there are a few mtlx nodes with menus, like the Place2D node where the menu is a int parameter, I tried to convert the ordered menu on a int menu but with no success, it is not translated either as you can see on this test video:

  • Quick Links