Arnold-usd MaterialX USD Support Request #981
|
Hi, I'd like to be able to do the following:
Currently, Arnold-USD exports to its own "flavor" of MaterialX USD. i.e. it includes Arnold operators, which cannot be interpreted by other render engines. Alternatively, is there a way to convert from an Arnold MaterialX USD definition to a Houdini 19 MaterialX USD definition? Thanks #usda 1.0 def Xform "sopcreate1" ( } def Scope "materials" } |
Replies: 4 comments 3 replies
|
Hi @syntheticperson , sorry for the lack of reply, we're just finding this discussions section now.... So, recent changes in #1195 and #1201 now allow arnold to render such materialx shaders coming from houdini, as well as arnold-specific shaders in materialx files, as generated by Arnold. This hasn't been released yet with Arnold, but it's on its way. However, for your question about whether arnold shaders could export materialx files that can be read with other renderers, it's not that simple unfortunately. If your input scene has arnold shaders, then these shaders won't be magically rendered by other renderers unless they know how to do it. If you want something that is renderer-agnostic, in the future you would have to use materialx shaders from the standard library (like those created in Houdini 19 MaterialX USD) and expect the different renderers to support them. Cheers |
|
Hi Jeroen, I have been doing a lot of research on this. There doesn't seem to be a publicly available tool yet. Since not all of the Arnold nodes have a direct replacement in MaterialX, many of those shaders need to be baked before they can be used as a map for MaterialX. They aiLayer and aiMix shaders need to be flattened and combined outside of Maya, such as Nuke, to render a flattened baked map, then read that back into Maya prior to the MaterialX conversion. What we are talking about here, is a very large cross DCC pipeline script. I need to practice doing this conversion manually, but I believe I can make the tool. I have part of the process already figured out with the slap comp GUI I made for my final project in scripting class. It can be opened in any Maya scene, user choses their paths, render settings, if they want grade or glow, and those nodes settings, then click Go! and it automates the whole slap comp process even with AOVs and shuffle nodes and the whole bit. So, I believe I could do a simplified version for flattening the layer and mix shaders to be read back in by Maya for MaterialX conversion. That is only one small piece of the puzzle though. It will take time to run manual tests then get the script going. These convert 1:1
These need baked:
These need cross DCC flattening:
|
|
Hi @ChristaChandler01. Thanks for looking into this. Helpful to know. |
|
@syntheticperson I found this page this morning: https://deepwiki.com/Autodesk/arnold-usd/7.5-materialx-integration?utm_source=copilot.com While it is talking about converting MaterialX into Arnold, the reverse of what we need to do for your project... It does contain some helpful information that might be useful in the process. Also, it might help solve some render farm issues with Houdini later on. Houdini renders are not supported on our render farm. I hear farm licensing for Houdini is extremely expensive. So, to solve this, FX should be sent back to Maya to be rendered with the scene's CG, especially if there is any image-based lighting... From my research, studios solve this by using HDA and .ass files. But it explains why MaterialX to Arnold has been researched more than Arnold to MaterialX. The following information may be useful, though it will need to be constructed with the reverse logic of Arnold to MaterialX in mind. Parameter Retrieval bool GetShaderInput(const SdfPath& shaderPath, const TfToken& param, File Path Reference Table Component File Path Key Functions/Classes Render Delegate MaterialX Setup libs/render_delegate/render_delegate.cpp 587-592 HdArnoldRenderDelegate constructor MaterialX Path Access libs/render_delegate/render_delegate.h 477-480 GetPxrMtlxPath() Node Graph Translation libs/render_delegate/node_graph.cpp 69-165 HdArnoldNodeGraph, MaterialHydraReader Node Graph Header libs/render_delegate/node_graph.h 48-92 MaterialX Constants libs/common/constant_strings.h 372 libs/common/constant_strings.h 391 MATERIALX_NODE_DEFINITIONS, mtlx USD Reader Integration libs/translator/reader/reader.cpp 252-256 Material reading in procedural Changelog References Feature history |
Hi @syntheticperson , sorry for the lack of reply, we're just finding this discussions section now....
So, recent changes in #1195 and #1201 now allow arnold to render such materialx shaders coming from houdini, as well as arnold-specific shaders in materialx files, as generated by Arnold. This hasn't been released yet with Arnold, but it's on its way.
However, for your question about whether arnold shaders could export materialx files that can be read with other renderers, it's not that simple unfortunately. If your input scene has arnold shaders, then these shaders won't be magically rendered by other renderers unless they know how to do it. If you want something that is renderer-agnost…