playcanvas / playcanvas/editor

GLB Preserve material mapping is not working properly

Open
#202 9 comments 0 reactions 1 assignee View on GitHub

@willeastcott is already working on this.

Since Dec 18, 2025.

area: asset import area: gltf bug
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
Screenshot 2020-10-30 at 11 34 13 AM

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):
Screenshot 2020-10-30 at 11 31 34 AM

Here below is the JSON file with existing material mapping:
Screenshot 2020-10-30 at 11 31 53 AM

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.