Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Material path length #1

Closed
Puxtril opened this issue Feb 19, 2023 · 1 comment
Closed

Material path length #1

Puxtril opened this issue Feb 19, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Puxtril
Copy link
Owner

Puxtril commented Feb 19, 2023

3D models are exported with empty materials, but the materials are named and assigned to the correct vertices. The material names are exported directly with no formatting. Sometimes the material name length exceeds the Blender limit of 64 characters.

Possible solutions:

  • Clamp material lengths to 64 characters (not good)
  • Remote the beginning material path length. Often what causes these to exceed 64 characters is a full path: ex. /Lotus/Characters/Tenno/Excalibur/SomeMaterial. This can be trimmed to SomeMaterial.
  • Implement the above, but also export the full path to Blender's Custom Properties section. I'm not sure if this is possible with glTF.
@Puxtril Puxtril added the bug Something isn't working label Feb 25, 2023
@Puxtril
Copy link
Owner Author

Puxtril commented Feb 26, 2023

fx-gltf allows for any extra properties via the extensionsAndExtras property on materials. This is also supported on meshes.

Blender will import anything in the "extras" extension. So to add a Blender "Custom Property" to materials, the code is mat.extensionsAndExtras["extras"]["FullPath"] = materialPath;

@Puxtril Puxtril closed this as completed Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant