playcanvas / playcanvas/editor
GLB Preserve material mapping is not working properly
@willeastcott is already working on this.
Since Dec 18, 2025.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 215
- Avg merge
- 1d 29m
- Merged PRs (30d)
- 30
Description
I have a complex car model made of 71 materials just for the exterior.
I have attributed materials on the json file in the past. and now need to overwrite the source FBX file in order to generate a GLB file. It seems the GLB is only trying to match the the materials specified on the FBX file.
Here below is the

If the materials names are correctly matching the source FBX, then the mapping is working.
However i have made slight changes to the material names and attributed the materials differently on the json file.
PROBLEM: when the GLB is generated it not remember the material mapping made on the JSON.
See below the GLB created new materials (i purposely set in green to highlight):

Here below is the JSON file with existing material mapping:

I guess it should not be very difficult to re-link the existing materials to correct mesh instances nodes IDs on the GLB since the json already has the mapping done.,
This is really important to have, because when you have a complex model made of hundreds of material it is very time consuming to go one by one and re-do the mapping (without making mistakes)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.