Is there a way to export an asset as usd and have the export process create a usd file that defines the SurfaceShader as MtlxStandardSurface instead of UsdPreviewSurface?
Currently when using the Bake Materials option on usd export, the resulting usda file creates the following data: def Shader "SurfaceShader" { uniform token info:id = "UsdPreviewSurface"
This results in a UsdPreviewSurface material for that asset, which is a second-class citizen when it comes to rendering (see quality comparison renders below). It is possible to rebuild this material manually as a MtlxStandardSurface, but I am looking to automate this for a large number of assets.
Please see the differences in the USD code between the material generated upon export from Unreal, and the USD code generated by manually making a materialxstandard_surface in Houdini.
I don’t think you’re missing an export setting here. The UE 5.8 USD exporter API explicitly describes baked materials as UsdPreviewSurface assets, even though Unreal supports importing MaterialX.
For a large asset library, I’d consider separating the geometry export from material conversion rather than rebuilding everything manually in Houdini.
One possible workflow would be to export the USD normally, then run a Python/USD post-processing step that creates a MaterialX Standard Surface shader for each baked material and connects the existing texture maps to the appropriate inputs.
I’d keep the original UsdPreviewSurface as a fallback and add a separate mtlx surface output where the downstream renderer supports it. That way you don’t have to replace the material bindings or modify the geometry.
One important detail: simply changing info:id from UsdPreviewSurface to a MaterialX shader identifier won’t work reliably. The inputs, texture connections, normal handling and color spaces need to be mapped properly.
Are you primarily targeting Karma in Houdini, or do you need the exported assets to work across several USD renderers?
That distinction would help determine whether a Houdini Solaris post-process is sufficient or whether a renderer-independent USD conversion tool would be worth building.
Hmm as a work-around a node adding inline USD code could potentially be added into the Houdini LOPs node graph.
For my use case, I am targeting Houdini and using MaterialX shading networks so assets can theoretically be shared to other DCCs or rendered in Houdini with other render engines besides Karma (although in this particular case I am using Karma).
In order for Unreal’s USD/MaterialX implementation to have full parity with import and export, it seems like it wouldn’t be too much of a stretch for Epic to add the appropriate USD shader code to any USD export. The mtlxstandard_surface code as seen in the image in the original post seems pretty straightforward.