Skip to content
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

MaterialX material with name "material" fails to render in HdStorm #2076

Closed
pablode opened this issue Oct 30, 2022 · 1 comment
Closed

MaterialX material with name "material" fails to render in HdStorm #2076

pablode opened this issue Oct 30, 2022 · 1 comment

Comments

@pablode
Copy link
Contributor

pablode commented Oct 30, 2022

Description of Issue

Consider following USDA:

#usda 1.0

def Sphere "ball" (
    apiSchemas = ["MaterialBindingAPI"]
)
{
    rel material:binding = </Materials/material>
}

def Scope "Materials"
{
    def Material "material"
    {
        color3f inputs:base_color = (0.2, 0.4, 1)
        token outputs:mtlx:surface.connect = </Materials/material/SS.outputs:surface>

        def Shader "SS"
        {
            uniform token info:id = "ND_standard_surface_surfaceshader"
            color3f inputs:base_color.connect = </Materials/material.inputs:base_color>
            token outputs:surface
        }
    }
}

where a material has the name "material" (which is common).

It fails to render in HdStorm and other renderers using the HdMtlxCreateMtlxDocumentFromHdNetwork function with an exception thrown from the MaterialX library:

Child name is not unique: material

Steps to Reproduce

Open above snippet with usdview

System Information (OS, Hardware)

Windows, RTX 2060

Package Versions

USD v22.11

Build Flags

--materialx --build-variant release --opencolorio --openimageio

@sunyab
Copy link
Contributor

sunyab commented Nov 4, 2022

Filed as internal issue #USD-7739

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants