-
Notifications
You must be signed in to change notification settings - Fork 594
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
Keep name of material even if using default material #268
Labels
Comments
Current You may use callback API to assign custom material id based on material name in .obj tinyobjloader/tiny_obj_loader.h Line 2811 in e39c173
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When the .mtl file is missing, the loader Warns and uses a default material. That is all good - however, it would be nice if the default material got the name that is specified in the usemtl line in the obj-file.
In my application I load obj files, and assign them materials based on a completely different physical representation, meaning the .mtl file does not make much sense. But I would still want to be able to read the material names, and map them to my specialized materials.
Currently I achieve this by creating dummy .mtl files, but it would be nice to not have to do that.
If there is an easier way already, please point me in the right direction, thanks!
The text was updated successfully, but these errors were encountered: