f3d
f3d copied to clipboard
Feature/1187 Read EXR files from memory
Issue for reference https://github.com/f3d-app/f3d/issues/1187
Below is an image of what currently happens when reading a .usda file in f3d
This is what it looks like on this branch
file is pulled from here https://github.com/mwestphal/assets/tree/main/full_assets/StandardShaderBall
Please note you have to change some options in the cmake build files to enable USD and EXR CMakeLists.txt line 58 turn on module_exr plugins/CMakeLists.txt line 6 turn on build_usd
MemStream is a private class created inside F3DEXRReader, this is needed as Imf::RgbaInputFile needs an input that has stream like functionality or is derived from Imf::IStream https://openexr.com/en/latest/ReadingAndWritingImageFiles.html#low-level-i-o
I'm not sure if this is the best design choice to have it be a private class, i can change that if desired but im not sure if any other class is going to need to use this functionality.
Codecov Report
Attention: Patch coverage is 88.57143% with 4 lines in your changes missing coverage. Please review.
Project coverage is 96.65%. Comparing base (
afe3870) to head (0f910f8). Report is 152 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| vtkext/private/module/vtkF3DEXRReader.cxx | 88.57% | 4 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #1448 +/- ##
========================================
Coverage 96.64% 96.65%
========================================
Files 103 105 +2
Lines 7756 7861 +105
========================================
+ Hits 7496 7598 +102
- Misses 260 263 +3
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@Meakk I tried using grayscale.exr but i get the following errors
Error reading EXR file: only RGB and RGBA channels are supported Could not find expected scalar array
(im not sure why but i couldn't reply to your original message in the thread)
@Meakk I tried using grayscale.exr but i get the following errors
Error reading EXR file: only RGB and RGBA channels are supported Could not find expected scalar array
(im not sure why but i couldn't reply to your original message in the thread)
Ok fair enough. Let's use your image then, but please double check the license and add it in testing/data/DATA_LICENSES.md
Small change required for cppcheck job:
/__w/f3d/f3d/source/vtkext/private/module/vtkF3DEXRReader.cxx:63:12: error: use default member initializer for 'pos' [modernize-use-default-member-init,-warnings-as-errors]
uint64_t pos;
^
{0}
please rebase on master
hey @nabielkandiel , need any help moving forward ?