Skip to content

USDPreviewSurface opacityMode port type differs #2896

Description

@ld-kerley

In MaterialX ND_UsdPreviewSurface_surfaceshader specifies the opacityMode input as type integer

<input name="opacityMode" type="integer" enum="transparent,presence" enumvalues="0,1" value="0" uiname="Opacity Mode" />

The UsdPreviewSurface specification defines it to be a token. I think this most closely matches the MaterialX concept of having a string input type with a enum attribute defining the supported types. This is in fact what we're already doing for wrapS and wrapT on ND_UsdUVTexture_23

<input name="wrapS" type="string" value="periodic" enum="black,clamp,periodic,mirror" uniform="true" />
<input name="wrapT" type="string" value="periodic" enum="black,clamp,periodic,mirror" uniform="true" />

I think we should follow the same pattern for opacityMode.

Aligning the types is important for the interchange between the two shading system nodes, but also because the current MaterialX convention using the enumvalues attribute it not supported by the UsdMtlx translation code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions