-
Notifications
You must be signed in to change notification settings - Fork 451
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
Support loading Basis-enabled Replica files #338
Conversation
To be clear, the v2019.10 tag in all repos. Also updating all Find modules to latest to make system-magnum builds work.
https://github.com/BinomialLLC/basis_universal/tree/2f43afcc97d0a5dafdb73b4e24e123cf9687a418 Unfortunately the repo has >200 MB history due to huge files added in the past, so it's not feasible to add it as a Git submodule. Disabling the (huge) BC7m6 format and a few others that Magnum has no support for, the BC7m6 file is empty because the sources include it unconditionally. Fix in BinomialLLC/basis_universal#91.
It was used internally, but never exposed to CMake GUI / ccmake.
It looks for *.basis files first and uses them, if available. Because right now Basis supports only LDR GPU compression formats, the RGB16F files are processed to already have the 0.0125 exposure applied.
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.
LGTM but can we add a test.
I would love to, but as far as I can recall, there aren't any tests for loading of the "vanilla" Replica files either (@bigbike can you confirm/deny?), so I don't know where to start. |
No, we do not have any CI tests for replica model yet. Feel free to create one. I sincerely appreciate it. |
Based on the description, it seems item 4) is our only option at this point. I understand there is a significant gain on the memory usage, I am wondering how much do we loss in terms of visual quality. |
I agree with using option 4) here. The ptex textures in replica allow you to increase visual quality and leverage the HDR features to change exposure on the fly. If a user is concerned with memory usage, the quad-colored plys do still look good at low resolutions and use very little GPU memory. |
Based on the discussion above, I'll revisit this with a BC6H in a DDS container instead of Basis (though I'm not ruling out the possibility of Basis itself supporting that some day). Currently I'm fully focused on the assert import APIs, will jump on the BC6H encoding right after. For the Replica tests -- should I add one similarly to the other Python tests and provide a "ground truth" numpy file for it? Or ... wouldn't it make more sense to have the rendering test on the C++ side (less moving parts, better diagnostic output etc.)? Comparing against a ground truth image probably won't check all corner cases of the PTex rendering, but doing that would mean (I assume) handcrafting some test data. So at least something :) |
Up to you on tests front! I would be happy with either one :) |
Actually ... 😅 Are you (or anybody else, @bigbike?) able to add the tests? Because for me it means attempting to verify the output of code that I didn't write and don't even have an exact idea what should be expected (e.g., those artifacts related to disabled use of buffer textures on macOS and such). Thanks in advance :) |
Updated CONTRIBUTING with pre-commit instructions
Closing this stale PR. |
Motivation and Context
ℹ️ Depends on #334, which is still yet-to-be-merged.
I converted the
*.hdr
files fromapartment_0
from the Replica Dataset to*.basis
using theconvert-hdr.sh
script from here (needs features from Magnum master) and this is the result:How Can This Be Tested
Download apartment_0.basis.zip (46 MB) and extract it next to the
*.hdr
files inapartment_0
. Load the model with the viewer. It should report what format it will decode Basis to (it's ASTC 4x4 in my case, it would be BCn on Mac) and then load the*.basis
files instead of*.hdr
(comparatively quite faster) and then show basically the same view as with the*.hdr
files. Please tell me what's the perceived quality / artifacts compared to what you're used to seeing -- I used just the default conversion parameters, so there's definitely room to improve.