Autodesk / Autodesk/3dsmax-usd
Primvars are not using the Channel Name if is defined
- Dominant language
- C++
- Stars
- 94
- Forks
- 6
- Avg merge
- 6d 20h
- Merged PRs (30d)
- 1
Description
## 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.
```python
# 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 :
Name of Primvars are not following the name defined :
**Specs (if applicable):**
- Windows 11
- 3ds Max 2024 / 2025 / 2026 / 2027
- Max-Usd 0.16.2.31
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the export with the attached 3ds Max channel mappings, then trace the exporter path that handles the Channel Name Map and the MaxUsd Python API's SetChannelPrimvarMapping calls. Compare channels -1, 1, 3, 6, and 7 with the working -2 and 0 cases. Done means every configured channel preserves its user-defined primvar name in the exported USD.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100