parameter node still broken in material builder

   2717   8   0
User Avatar
Member
340 posts
Joined: June 2017
Offline
The parameter node still seems to be broken in the material builder over several Houdini builds. I'm not sure if it pertains only to the OSX version, but if one collapses several material nodes into a material builder and then adds a parameter node set to custom structure and shader layer, it will not accurately output a layer to a layer mix. Attached is a screen shot of the material setup and correct render when the nodes are not collapsed into a material and a parm node added and a screen shot when they are showing the problem. According to SideFX's videos, this should work.
Edited by Island - Jan. 25, 2022 17:06:25

Attachments:
ParmIssue1.jpg (101.2 KB)
ParmProblem.mantra.jpg (127.7 KB)
ParmProblem2.jpg (273.1 KB)
ParmProblemShow.mantra.jpg (86.7 KB)

User Avatar
Member
7741 posts
Joined: Sept. 2011
Online
Island
The parameter node still seems to be broken in the material builder over several Houdini builds. I'm not sure if it pertains only to the OSX version, but if one collapses several material nodes into a material builder and then adds a parameter node set to custom structure and shader layer, it will not accurately output a layer to a layer mix. Attached is a screen shot of the material setup and correct render when the nodes are not collapsed into a material and a parm node added and a screen shot when they are showing the problem. According to SideFX's videos, this should work.

I think I responded to one of your other posts with the same issue. The problem wasn't the parameter, but that you've collapsed the materials without connecting them to uvs, resulting in your pattern outputting in a constant value of 0 instead of the pattern. I recommend not to collapse individual portions of the shader into a material builder. There's zero benefit and much to go wrong if you don't know all the hundred gotchas of doing so. Collapse the entire network into a builder to avoid 'contamination' of networks, or to avoid the automatic shader epilogue when you know better then it does.
User Avatar
Member
340 posts
Joined: June 2017
Offline
I understand your advice to collapse the entire network into a builder to avoid contamination of networks, but I don't really understand the reasoning regarding connecting them to UVs. The UV coordinates node gets built into the material builder when one selects the nodes and compacts them into a material builder. The geometry test objects have UV's already created and in SideFX's tutorial, they do exactly what I did but get a working result in the layer mix: https://vimeo.com/212603065?embedded=true&source=vimeo_logo&owner=1723479 [vimeo.com]


Addendum: I missed your previous demo file. I see what you did, but can't figure out why adding another UV coordinate node as you did and connecting it to the material builder's UV input still does not work with the material builder. The attached nodal system still did not work. The only "fix" was adding a compute lighting and output variables and parameters node as you did in your example in addition to the second UV coordinates node, but which was not done in SideFX's tutorial. At least your fixes got it working but I am mystified by the differences between the tutorial and the need for your additional nodes.
Edited by Island - Jan. 25, 2022 18:55:59

Attachments:
ThisWorks.jpg (119.0 KB)
NotWorking.jpg (121.9 KB)

User Avatar
Member
7741 posts
Joined: Sept. 2011
Online
I'm not sure why it's not working for you. I made a similar network as in the tutorial and it works, even without the extra connected uv coordinates.

I did notice there was an issue combining a material without a displacement context for the shaderlayer export with one that used displacement. It caused the model to explode. After adding 'displace' to the contexts on the layer struct, it worked fine though.

Attachments:
layer_materials2.hip (641.7 KB)
layer_shader_graph.png (628.4 KB)

User Avatar
Member
340 posts
Joined: June 2017
Offline
jsmack
I did notice there was an issue combining a material without a displacement context for the shaderlayer export with one that used displacement. It caused the model to explode. After adding 'displace' to the contexts on the layer struct, it worked fine though.

I wonder whether that is the issue with my file. You are saying you can't use layer mix with two material builders or a material builder plus a principled shader if one of them has displacement and the other doesn't unless you add some displacement nodes to the one that has no displacement? Also, why did you add the two additional nodes after the layer mix in your original example? Without them, it fails even with an extra uv coordinates node. See attached Houdini file. One object that has the additional nodes renders fine. The one that is similar to the SideFX tutorial but with the extra UV coords node fails.
Edited by Island - Jan. 25, 2022 20:47:36

Attachments:
ParmProblemShow.hiplc (792.1 KB)
Demo.jpg (172.1 KB)

User Avatar
Member
7741 posts
Joined: Sept. 2011
Online
Island
wonder whether that is the issue with my file. You are saying you can't use layer mix with two material builders or a material builder plus a principled shader if one of them has displacement and the other doesn't unless you add some displacement nodes to the one that has no displacement?

yeah, your scene is exploding the same as mine was, like it's referencing uninitialized memory. When you combine two materials with displacement using a layer mix, the layer output has to include the displacement context. Without it, bad stuff happens. If one of the materials has no displacement, then you just get no displacement which is no big deal. The issue was an invalid displacement shader.

Island
Also, why did you add the two additional nodes after the layer mix in your original example?

I add them because I like to make my own shaders, and not leave it to some automatic material completion script that may or may not work. A material ending in anything other than an 'output' or a 'collect' is incomplete, and requires some automatic epilogue or wrapper shader. I'd rather make that part myself since stuff can go wrong when leaving it to chance.
Edited by jsmack - Jan. 25, 2022 21:16:04
User Avatar
Member
340 posts
Joined: June 2017
Offline
Adding the two additional nodes seems to obviate the need to add the additional displacement nodes. I'm not sure why that fixes it without all the additional displacement nodes. In the SideFX tutorial, none of this was necessary, but maybe things changed between Houdini 16 and 19 that broke some defaults.
User Avatar
Staff
1448 posts
Joined: July 2005
Offline
Island
After adding 'displace' to the contexts on the layer struct, it worked fine though.
Island
I wonder whether that is the issue with my file.
Yes.
jsmack
The issue was an invalid displacement shader.
Indeed. The materialbuilder1 node exported only surface info and not the displacement info. Therefore displacements could not be mixed.

To fix the problem, set the "Export in Context" parameter on "/mat/materialbuilder1/parm1" node to "surface displace".

Island
In the SideFX tutorial, none of this was necessary
In that tutorial, around 17m30s, the two material builder nodes did not have any displacement shaders, so it worked.

Later on, around 23m20s that tutorial mentions the layer export for "displace" context.
User Avatar
Member
340 posts
Joined: June 2017
Offline
Thank you! That fixes it in a simpler way.
Edited by Island - Jan. 28, 2022 14:33:13
  • Quick Links