AcademySoftwareFoundation / MaterialX

MaterialX is an open standard for the exchange of rich material and look-development content across applications and renderers.
http://www.materialx.org/
Apache License 2.0
1.85k stars 350 forks source link

Mtlmix can't mix 2 shader #896

Closed Brizengan closed 2 years ago

Brizengan commented 2 years ago

I use Houdini and i can't mixed two shader. If i try to mix 2 texture color the node mtlxmix work fine. But if i use the matX mix to mix two shader he dont work

box

jstone-lucasfilm commented 2 years ago

@Brizengan, this sounds more like a question for the Houdini Solaris team! MaterialX definitely has the ability to perform a mix between two surface shaders, and we have an example of this usage in our test suite:

https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/resources/Materials/TestSuite/pbrlib/surfaceshader/shader_ops.mtlx

Is there a forum for Houdini Solaris where you could bring this up, and experts on their team could provide advice on this usage?

Brizengan commented 2 years ago

Hmm, The only way is to report a bug to Sidefx. We can talk about it in the forum but I don't think the devs are there. In any case, this problem puts a big brake on the production speed :/

jstone-lucasfilm commented 2 years ago

Here's another good example of surface shader mixing in MaterialX, and you can load this example directly in MaterialXView, to visualize what happens as you adjust the mix weight:

https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/resources/Materials/TestSuite/pbrlib/surfaceshader/surface_ops.mtlx

Here are some screenshots of this mix node in action, blending between two very different surface shaders in MaterialXView:

Mix weight 0.0: TestSuite_SurfaceMix_Weight_0 0

Mix weight 0.5: TestSuite_SurfaceMix_Weight_0 5

Mix weight 1.0: TestSuite_SurfaceMix_Weight_1 0

My sense is that this feature is working as expected in the open-source MaterialX codebase, and the next step would be to follow up with the Houdini/Solaris team, as they have developed some very sophisticated closed-source code for MaterialX handling in Solaris, which our team does not have access to.

jstone-lucasfilm commented 2 years ago

@Brizengan I'll close out this issue for now, but feel free to reopen if the related SideFX discussions point out improvements we can make in the open-source codebase.