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
Update Magnum from v2019.10 to latest master #496
Conversation
Oooo, maybe time for swap away from GLOG? |
Depends what else from #121 needs to get implemented :) ... the CI is failing on the JS tests and I have no idea what could cause it -- IIRC there wasn't any significant change affecting glTF import that would cause this to break. Is anybody who has the web build set up be able to reproduce this? Or is there a way to get the diff image out of the CI? |
@mosra, looks like something in rendering changes as visual comparison with previously saved frames changed: https://app.circleci.com/jobs/github/facebookresearch/habitat-sim/6779 |
@mathfac yeah I know, which is why I asked if somebody could retrieve the diff image for me ;) Managed to reproduce the difference using the viewer utility, investigating locally. |
Okay, it was due to an unfortunate breaking change in Magnum's math lib that I reverted after rethinking the consequences (plus hardened the tests in mosra/magnum@c85b537 and mosra/magnum@4a0f843 to make sure these important properties don't get broken again), but the CI still reports a 11% difference (instead of 90%) and the threshold is 10%. Is anybody able to reproduce this and get the diff image to verify that everything is okay? Or should we just bump the threshold a bit more? It's getting late here and I don't want to block you by this for yet another day -- @matthewjmay @aclegg3 @erikwijmans if you can check or think it's fine to bump the threshold to 12% or 15%, feel free to do this on this branch :) |
@apsdehal I believe you wrote this test in JS? Do you mind verifying that JS is working as expected on this branch? |
@mosra I checked the other sensor output tests we have and for the scenes we have on the CI, they don't pass. Everything looks fine and I would be totally happy with changing the value here https://github.com/facebookresearch/habitat-sim/blob/magnum-master/tests/test_sensors.py#L126 to |
Wait, so this is an additional failure apart from the JS fail? Interesting. Should I bump those numbers or are we waiting for a 3rd person to confirm? |
Bump the values IMO, things look completely as expected. |
Codecov Report
@@ Coverage Diff @@
## master #496 +/- ##
==========================================
- Coverage 59.28% 59.26% -0.03%
==========================================
Files 165 165
Lines 7386 7381 -5
Branches 84 84
==========================================
- Hits 4379 4374 -5
Misses 3007 3007
Continue to review full report at Codecov.
|
Fixes a few issues that cropped up lately: - Removed the ResourceManager singleton that got deprecated in v2019.10 to unbreak multithreaded workflows - Resource no longer attempts to fetch updated data when not needed - TinyGltfImporter now sets shininess to 80 by default, instead of 1 - A (partial) workaround for crashy BufferTexture on macOS. There's still one corner case left to fix but it can be easily prevented in the code (see the apple-buffer-texture-unbind-on-buffer-modify workaround for details) No known regressions or compatibility breakages, apart from the single missing include and a slight difference in how tinygltf parses transformations, which warranted an update to comparison thresholds. Also removed a now-obsolete Basis CMake workaround.
Updated the thresholds to make tests pass. The slight difference in rendering was bothering me, and I managed to track it down to a commit updating the bundled To be sure, I audited all other commits happening since the |
24987d7
to
ae4c9cc
Compare
It was also failing and randomly increasing the threshold lead nowhere, impossible to actually know if the rendering is correct. With this in place, you get a full per-pixel diagnostic implicitly in the CI log, and regenerating ground truth image is as simple as passing --enable-diagnostic to it.
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.
Thank you for investigating the difference. Looks good to go for me. We should update the test pictures to compete to new etalon.
The Now everything should be finally passing again :) |
* Update Magnum from v2019.10 to latest master. Fixes a few issues that cropped up lately: - Removed the ResourceManager singleton that got deprecated in v2019.10 to unbreak multithreaded workflows - Resource no longer attempts to fetch updated data when not needed - TinyGltfImporter now sets shininess to 80 by default, instead of 1 - A (partial) workaround for crashy BufferTexture on macOS. There's still one corner case left to fix but it can be easily prevented in the code (see the apple-buffer-texture-unbind-on-buffer-modify workaround for details) No known regressions or compatibility breakages, apart from the single missing include and a slight difference in how tinygltf parses transformations, which warranted an update to comparison thresholds. Also removed a now-obsolete Basis CMake workaround. * Rewrite SimTest using Corrade's TestSuite. It was also failing and randomly increasing the threshold lead nowhere, impossible to actually know if the rendering is correct. With this in place, you get a full per-pixel diagnostic implicitly in the CI log, and regenerating ground truth image is as simple as passing --enable-diagnostic to it.
* Bug fix in calculating valid area. Check Eq.(51) in "The Double Sphere Camera Model" * No need to caclulate for cos value
Motivation and Context
Obsoletes facebookresearch/habitat-lab#295 and unblocks #489.
Was much less painful than I expected it to be.The critically important things this brings:ResourceManager
singleton that got deprecated inv2019.10
to unbreak multithreaded workflows (mosra/magnum@e7aeaf7)Resource
no longer attempts to fetch updated data when not needed (mosra/magnum@47e1106)TinyGltfImporter
now sets shininess to80.0f
by default, instead of1.0f
(mosra/magnum-plugins@ecec794)GL::BufferTexture
on macOS (ping: @bigbike). There's still one corner case left to fix but it can be easily prevented in the code (see theapple-buffer-texture-unbind-on-buffer-modify
workaround)The seven megatons of other stuff you didn't ask for but get "by the way":
Array
s that aim to be faster thanstd::vector
(blogpost is in the pipeline!)KHR_lights_punctual
support in TinyGltfImporter, in case you'd want to import light setup from a file instead of having it hardcoded (ping: @matthewjmay)TinyGltfImporter
now supports interleaved vertex attributes, broadening asset compatibilityStanfordImporter
, bringing it closer to what we'll need here for PLY files (see also the benchmark below)v2019.10
tag:There are no known regressions, and no compatibility breakages that would affect the use in Habitat. I also removed one now-obsolete CMake workaround for the Basis submodule and updated all
Find
modules. The asset pipeline rework (sneak peek benchmark below) is fortunately still in a branch, otherwise this relatively straightforward upgrade wouldn't be possible. The bigger update is yet to come :)How Has This Been Tested
I trust my code ✔️ (and hope the CIs turn green)