Edit Material in Component Material

   920   1   0
User Avatar
Member
11 posts
Joined:
Offline
After watching the video on the component builder, it was my understanding that the dive target for the Component Material was intended to operate on the particular variant represented by the node.

I have a setup with a couple of materials in the Material Library.
For each material, i have a distinct Component Material chained between the original Component Material and the Component Output.
On each Component Material, I have explicitly set the Primitives path to point at the '/ASSET/geo' scope, and the Material Path to point at the particular material in the graph. So far so good.

However, I am trying to create a novel material variant by targeting an existing material in the Material Component's Material Path and then creating an Edit Material in its dive target, and overriding the diffuseColor. When I throw a setVariant node after the Component Output node, and target the appropriate variant, i get inconsistent results. The houdini gl view picks up the new color, but Karma does not. And storm picks up what appears to be the original point color.

As for the material that I am overriding, it is a materialx standard surface shader, which should be compatible with Karma..

I assume that this is a composition arc issue, but I also assumed that the Component Builder was designed for this and that it would work its magic. Is there a specific override to Reference Type that i should set on the Edit Material Properties node in the dive target?


As a followup, I looked a bit deeper into what is going on and realized that the editmaterial properties is indeed targeting /ASSET/mtl/white/mtlxstandard_surface1_preview

That of course explains why it is showing up in gl but not karma. I assume that is because the expression on the Primitives in the Edit Material Properties node is targeting the preview surface. However, when I tried targetting the material as a whole or the mtlxstandard_surface1 Shader in particular, I only achieve the wrong sort of consistency; the override is ignored.
Edited by jGrBr - May 2, 2022 12:09:04
User Avatar
Member
11 posts
Joined:
Offline
I seem to have answered my own question.

The issue it turns out is pretty simple. In the Component Material, I plunked down an Edit Material Properties node and simply hit "Create Parameters". The Primitives path expression picked up the preview surface shader that had been created on my behalf instead of the surface shader itself. Targeting the Primitives directly did the trick.
  • Quick Links