-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple MaterialX examples not displaying correctly in usdview #1636
Comments
Filed as internal issue #USD-6941 |
@pmolodo there has been some recent work done to the MaterialX integration. Would you mind confirming that this is still failing for you in the latest release candidate? Thank you! |
@FlorianZ - I just retested using the latest dev, ff1e6fd After changing to try In some cases the failure mode was slightly different - ie, in some cases for the checker-material tests, I would get what I described as Anyway, my full test results are in the attached file... |
Thank you for all the test cases, and for re-testing them. Unfortunately you are coming across some of the current limitations. Having nodes outside the nodegraph are not supported (Image File - test 1), Interfaces are not supported (Checkerboard - test 3), and support for texcoord nodes while not currently supported will be added shortly (Checkerboard test 1). The rest of your test cases are playing with custom nodedefs which are unfortunately also not fully supported. Currently, the two mtlx file approach is needed, placing the nodedef.mtlx file where it is not a sibling of the material.mtlx file. If they are siblings HdMtlx will end up including both nodedef.mtlx and material.mtlx in the document it is recreating for the material, and cause the error you saw about the material name not being unique. The nodedef.mtlx file needs to be included in the material.mtlx file, and its path should be indicated with the Again custom nodedefs are not fully supported so using textures, or primvars (such as the texcoord node or geomprop nodes) in that custom nodedef will not work in Storm (recent git Issue for this). However, using primvars dose work in HdPrman. In my recent testing it seems like there are some issues maintaining correct connections downstream of a custom node. So it should work if your node/nodedef is directly providing the nodegraph output, and do all the above. One last thing to mention about your last test case. When you reference a mtlx file in a usda file, that mtlx file will be processed into UsdShade, which is also what happens when you run that same mtlx referencing usda file through usdcat. So I would expect Thanks again! |
… shader. See #1636 (Internal change: 2219533)
See #1636 (Internal change: 2220098)
…xture coordinates See #1636 (Internal change: 2220101)
…s defined in libraries Custom nodes defined in a separate library indicated with the PXR_MTLX_PLUGIN_SEARCH_PATHS envar that use textures need to have the 'textureuser' group so that UsdMtlx and hdMtlx know they use textures and can properly initialize texture coordinates. Similarly custom nodes that use texcoords need the 'texcoorduser' group. These custom nodes now work in both Storm and HdPrman. Changes in hdSt are since custom nodes can name the input for the file anything instead of 'file' which the stdlib texture nodes use. Note: - users need to add 'textureuser' or 'texcoorduser' as the custom node's nodegroup - need to use the fallback texture coordinates - cannot use mutliple textures inside one custom node Fixes #1636 Fixes #1786 (Internal change: 2242208)
If material inputs are coming from a node output, we create a nodegraph around that node as well as any upstream nodes or other nodes providing connections to different material inputs. Essentially doing what we previously required the user to do; contain all nodes that ultimately feed into the material/surfaceshader nodes, inside a nodegraph. Fixes #1636 (Internal change: 2242218) (Internal change: 2242222)
…odes that use textures or texcoords. Fixes #1636 (Internal change: 2242575)
…ections Fixes #1636 (Internal change: 2243209)
…oving use of deprecated GetConnectedSource() from FileFormat test Fixes #1636 (Internal change: 2243217)
Description of Issue
I've been trying to get some basic MaterialX examples to display in usdview, and haven't had much luck.
I'm not sure which of these are expected failures - ideally, ALL of these .usda files should work, somehow. (Though obviously some of the combinatons of env vars won't work - I was just flailing a bit, trying to find some way to set env vars to make usdMtlx read my library files correctly...)
Steps to Reproduce
Results - Basic Parameter Override
One mtlx file, just setting inputs to a standard shader
WORKS
WORKS
Results - Image File
One mtlx file, with image node hooked up to a standard shader
WORKS
FAILS
One mtlx file, with the image node in a nodegraph
WORKS
WORKS
One mtlx file, with a custom nodedef wrapping an image node
WORKS
FAILS
FAILS
FAILS
Separate material + nodedef files, using an xml include statement
WORKS
FAILS
FAILS
Separate material + nodedef files (using search-path env vars)
WORKS
(Note that you do need to specify an extra arg, "--library nodedefs", to identify the subfolder on the MATERIALX_SEARCH_PATH.)
FAILS
FAILS
FAILS
FAILS
Separate material + nodedef files (using search-path env vars, with extra folder level for libraries)
WORKS
FAILS
FAILS
Results - Checkerboard Shader Graph
One mtlx file, with one big shader graph
FAILS
WORKS
One mtlx file, with a custom checkerboard nodedef in it
FAILS
WORKS
One mtlx file, with one big shader graph (and declared input)
FAILS
WORKS
Separate material + nodedef files (using search-path env vars)
FAILS
FAILS
WORKS
Separate material + nodedef files (using search-path env vars, with extra folder level for libraries)
FAILS
FAILS
FAILS
FAILS
WORKS
Flattening .mtlx into one big .usda (ie, using UsdShade only)
FAILS
System Information (OS, Hardware)
Windows
Package Versions
I was using the latest dev branch tip at the time (c1efe0b). (There's been a dev update since then, but nothing that would obviously affect this.)
Build Flags
--materialx
matx_tests.v2.zip
The text was updated successfully, but these errors were encountered: