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

How to get the material names without a .mtl? #374

Closed
wxfred opened this issue Dec 18, 2023 · 1 comment
Closed

How to get the material names without a .mtl? #374

wxfred opened this issue Dec 18, 2023 · 1 comment
Labels

Comments

@wxfred
Copy link

wxfred commented Dec 18, 2023

Describe the issue
My model dosen't have a .mtl file, but I need to get the material name for each face. How can I do that?
I tried ObjReader::ParseFromFile, but the size of materials is 0, while there are 8 usemtl in the .obj file.

@syoyo syoyo added the question label Dec 18, 2023
@syoyo
Copy link
Collaborator

syoyo commented Dec 18, 2023

I think you can use Load API with Mtl callback. No example code for MTL only callback API though

bool LoadObj(attrib_t *attrib, std::vector<shape_t> *shapes,

@syoyo syoyo closed this as completed May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants