Allow to suppress exporting default materials
- Dominant language
- Wolfram Language
- Stars
- 905
- Forks
- 223
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 17
Description
I hope this Feature Request is not something that is already possible, but I couldn't find a way in the documentation to do this.
**Is your feature request related to a problem? Please describe.**
If my understanding is correct, Maya requires every mesh to have a material, and by default the `initialShadingGroup` is assigned. When exporting with Maya-USD with materials, when a mesh a with a default material is exported, this default material is written to the USD file.
For certain scenes, we have utilize meshes for different purposes, some meshes might have actual (non-default) materials assigned that we want to export, but also have meshes that should not have materials associated with them (e.g. related to collision detection). Currently, I could not find a way to suppress writing such default materials to these meshes.
**Describe the solution you'd like**
I would like to have a flag, e.g. `-exportDefaultMaterials` that defaults to `true`, that allows us to disable writing the `initialShadingGroup` to USD files.
Or alternatively, more fine-grained control which materials are exported than just export all materials, or export no materials.
**Describe alternatives you've considered**
Currently, we work around this by using an export filter, and explicitly removing the default material from any mesh that has it assigned. This works, however it seems cumbersome to do this, and feels like something that should be supported in Maya-USD rather than being a post-process step.
It might be possible to do this with a custom shader writer, however I have not yet explored this possibility. If this would be recommended approach, I would love to know that.
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue identifies Maya-USD material export and the initialShadingGroup, but names no file or test. Start by tracing the material-export path and comparing it with the existing export-filter workaround and possible custom shader writer. Done means providing a documented, tested way to omit default materials while preserving non-default materials.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100