Skip to content

Primvars are not using the Channel Name if is defined #47

Description

@SttevanCJoga

Describe the Bug

During the export of an object, the Channel Name Map does not correctly use the custom channel names defined in 3ds Max.

In the example below, channels -2: Alpha and 0: vc are exported correctly and preserve their assigned names. However, the other channels ignore the configured Channel Name Map and are exported using the default USD naming convention (st*).

For example:

  • Channel -1: Illum was renamed to LayerWeights
  • Channel 3: map was renamed to Apple

After exporting to USD, both custom names are ignored and replaced with the default name or st* names instead of the user-defined channel names.

Expected Behavior

The USD export should preserve and use all channel names defined in the Channel Name Map for every exported channel.

Actual Behavior

Only some channels (such as -2: Alpha and 0: vc) correctly use the assigned names. Other channels ignore the mapping and are exported with default st* names.

Additional Information

Using the MaxUsd Python API, it is possible to manually define replacement names for exported channels. However, this is not a practical workaround in production scenarios where multiple objects in the same scene may use different channel mappings. The exporter should automatically respect the Channel Name Map configured on each object during export if is defined.

# Those are okay, each one respect the channel in the 3dsMax

    export_options.SetChannelPrimvarMapping(-2, "displayOpacity")  # Vertex Alpha
    export_options.SetChannelPrimvarMapping(-1, "LayerWeights")  # Vertex Illum
    export_options.SetChannelPrimvarMapping(0, "displayColor")  # Vertex Color

# Those should be following the Channel Name if is define instead here

    export_options.SetChannelPrimvarMapping(1, "st")  # UV's
    export_options.SetChannelPrimvarMapping(2, "st1")
    export_options.SetChannelPrimvarMapping(3, "st2")
    export_options.SetChannelPrimvarMapping(4, "st3")
    export_options.SetChannelPrimvarMapping(5, "st4")

    export_options.SetChannelPrimvarMapping(6, "Different_Data")
    export_options.SetChannelPrimvarMapping(7, "Different_Data2")

Attachments

Scene 3dsMax :

Image

Name of Primvars are not following the name defined :

Image

Specs (if applicable):

  • Windows 11
  • 3ds Max 2024 / 2025 / 2026 / 2027
  • Max-Usd 0.16.2.31

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions