-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Fix reflectivity parameters parsing in loadOBJFile #1599
Conversation
Theres was a bug, attempting to make a reasignment to a reference, on the reflectivity parameters parsing stage. I also added support to the Tr tag, used by meshlab, which apparently is simply the complement of the "d" dissolve parameter.
Hey Sérgio, was this reassignment error a compilation error? 'Cause this rgb value is not used anywhere, is it? Don't know anything about this Tr tag. Is there any documentation in Meshlab, which mtl-format it supports? Would be nice to have a link to the mtl-format specification PCL supports (or is working towards supporting) in the MTL reader documentation, wouldn't it. Cheers, |
It was not a compilation error. Just the underlying logic was messed up. The rgb value is used here and here. I remember I bumped on this bug while working with a specific file, and noticed the material parameters were messed up.
True. For the Tr tag I took the description from wikipedia, but there's no reference to an actual standard. |
True, but don't these functions just fill that local rgb variable based on the contents of |
You're right. Let me have a look tonight to see if I find my offending case :) |
Just figured out what we were overlooking in our discussion. So notice that in my fix, |
I will add some comments in line. As a side note, please put different fixes in separate commits, makes them easier to review ;). |
Must have been the weather conditions, all good. Thanks! |
There was a bug, attempting to make a reassignment to a reference, on the reflectivity parameters parsing stage.
I also added support to the "Tr" tag, used by meshlab, which apparently is simply the complement of the "d" dissolve parameter.