Open FrantzVZ777 opened 4 years ago
It seems the GLB is only trying to match the the materials specified on the FBX file.
This is correct as it's a new asset. Unfortunately, you will you will have to redo the mappings.
It would be nice to add an extra option (preserve material mapping from json file)
The issue that during the conversion process, there's no relationship of the JSON from the FBX file. It just converts FBX to GLB.
I reopened the issue as there could be some custom editor code that can be ran in the console to copy the material order and reapply them to the GLB assuming the nodes are in the same order.
That would be nice to have for the time being...
For longer term, some extra option could be integrated here as mentioned above.
preserve material mapping from json file
Hi @FrantzVZ777,
Sorry about this, we're working on a fix!
Thanks
@slimbuck Did we fix this? 😅
@vkalpias Was this fixed by you?
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)