USDZ + ShaderGraphMaterial not working?

I'm trying to make a simple demo of using ShaderGraphMaterial in a USDZ file that I can preview on Mac and VisionOS but I'm having trouble.

In Reality Composer, I make a sphere, then assign a ShaderGraphMaterial to the material, with a simple diffuse color (green) input. When I save the file as .usda, it displays as a gray sphere on mac rather than the green sphere shown in reality composer. If I then convert to usdz using Reality Converter, I get a warning on import: "Shader nodes must have “id” as the implementationSource, with id values that begin with “Usd”. Also, shader inputs with connections must each have a single, valid connection source." And the exported .usdz also shows as a gray sphere.

Is there a simple demo of a .usda file using ShaderGraphMaterial that displays on Mac, iOS, and VisionOS that I can look at to see how it looks internally? My actual problem is creating usdz / usda files on visionOS for viewing on iOS / Mac / VisionOS.. but the first step is showing it's possible to even use ShaderGraphMaterial across all platforms. Thanks

Answered by in 782967022

Hello,

ShaderGraphMaterial is currently only supported on visionOS. When you look at your USDZ on macOS, it defaults to the Physically Based material on the entity, if one exists alongside the ShaderGraphMaterial. I suspect the gray material you see is the Physically Based material with default parameters.

In Reality Composer Pro, you can switch a material between "Physically Based" and "Custom" in the right-side inspector panel. If you switch to "Physically Based", you should see the gray material. While you cannot customize it as much as "Custom" materials, you can still change a fixed parameter set from the right-side inspector panel. Once done, set the material back to "Custom". Then the USDZ will use the custom (ShaderGraphMaterial) on visionOS, but will use the Physically Based material on other platforms like macOS.

Geoff

Accepted Answer

Hello,

ShaderGraphMaterial is currently only supported on visionOS. When you look at your USDZ on macOS, it defaults to the Physically Based material on the entity, if one exists alongside the ShaderGraphMaterial. I suspect the gray material you see is the Physically Based material with default parameters.

In Reality Composer Pro, you can switch a material between "Physically Based" and "Custom" in the right-side inspector panel. If you switch to "Physically Based", you should see the gray material. While you cannot customize it as much as "Custom" materials, you can still change a fixed parameter set from the right-side inspector panel. Once done, set the material back to "Custom". Then the USDZ will use the custom (ShaderGraphMaterial) on visionOS, but will use the Physically Based material on other platforms like macOS.

Geoff

Thanks, I will test out using the PBR material as a backup on non visionOS platforms. Can you share if there are any plans to support ShaderGraphMaterial on iOS or Mac? My use case is authoring usdz content on the Vision Pro, and sharing with others on iOS / Mac platforms.

USDZ + ShaderGraphMaterial not working?
 
 
Q