KhronosGroup / KhronosGroup/UnityGLTF

On Demand Remap for Material Assignments

Open
#881 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
2.2k
Forks
536
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug 💬

It would be nice to have the same On Demand Remap feature as the FBX importer has.
This often comes in handy, when you want to share materials between seperately imported glTF assets. For example a repeating material that is not unique to one object.

I might invest time to implement this myself. Could someone point me to the right place to get started with this feature?

Thanks!

### Steps to reproduce 🔢

It could work the same way as in the FBX importer:
1. Import an object
2. Go to Import Settings > Materials
3. Hit "On Demand Remap" to automatically look for materials in the project that have the same name as the material slot on the imported object and setup the material remapping.

### Files to reproduce the issue ♻

_No response_

### Editor Version 🎲

6000.0

### Render Pipeline and version

URP 17.0.3

### UnityGLTF Version

2.17.0

### Operating System 👩‍💻

Windows

### When does this problem happen?

- [x] Editor Import
- [ ] Runtime Import
- [ ] Editor Export
- [ ] Runtime Export

### Additional Info 📜

_No response_

### Validations 🩹

- [x] I have [searched existing issues](https://github.com/KhronosGroup/UnityGLTF/issues): no issue already exist that reports the same problem.
- [x] I follow the [Code of Conduct](https://www.khronos.org/about/code-of-conduct)
- [ ] I provided a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example), including files when necessary.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the Unity FBX importer's On Demand Remap behavior with the glTF editor import settings under Materials. Trace how material slots are matched to project materials by name, then verify that the described import workflow automatically configures remapping for shared materials.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.