Skip to content

Conversation

AndreeaDogaru
Copy link

Hi @mikedh!

Currently the name of PBRMaterial is lost when calling to_simple() which causes issues when exporting meshes with named materials in obj format. More specifically, the baseColorTexture will always be saved as an image with name material_0.png, and I couldn't find any workaround to override this name; this means if saving two such meshes in the same directory, only the last texture image would be available. I provided the simple fix to pass the name, but please let me know if there is an alternative.

Thanks for the amazing library!

Currently the name of PBRMaterial is lost when calling to_simple() which causes issues when exporting meshes with named materials in obj format.
@mikedh mikedh changed the base branch from main to feat/units October 10, 2025 20:08
@mikedh mikedh merged commit 7726903 into mikedh:feat/units Oct 10, 2025
11 checks passed
mikedh added a commit that referenced this pull request Oct 10, 2025
@mikedh
Copy link
Owner

mikedh commented Oct 10, 2025

Great thanks for the fix! I also added the fix in to_simple from #2457 for the diffuse color, as they pointed out baseColorFactor needs a conversion to be considered as RGB.

@mikedh mikedh mentioned this pull request Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants