-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Avoid setting PBR properties when they are not found on mtl file #4440
Conversation
… are not found on mtl file.
I’ll leave it to the core developers to comment, if necessary, on the implementation details. However, the concept expressed with this PR to optionally add the PBR properties based on their presence in the MTL file makes sense to me and shouldn’t impact anyone using a PBR workflow with OBJ. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just 2 small findings. Would you be able to solve these things? When done I will merge it. And maybe you can consider using std::optional?
Just a question from my side.
@@ -0,0 +1,29 @@ | |||
#pragma once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright is missing
#pragma once | ||
#include <assimp/ai_assert.h> | ||
|
||
template <typename T> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation is missing
Sure, I can check. I'm not really versed with std::optional, never used it before, and just tried to use something similar to STEPFile.h::Maybe, in case you were all used to this. But yes, I can change it if you prefer to use std. |
|
That might be a disadvantage, at least for this minimal use case. |
At the moment we have c++11 as our minimum. So I guess adding this class makes sense for me. Thanks a lot for checking this out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the documentation will be added.
Merged, thanks a lot for your contribution. |
This comes from #4424.
Metallic/roughness/sheen/clearcoat properties should only be added to the material if they appear on .mtl file.
Pinging @errissa here, feel free to suggest/change if you find anything odd.