Skip to content
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

Hio module does not support Monochrome EXR images #2800

Closed
JGamache-autodesk opened this issue Nov 9, 2023 · 6 comments
Closed

Hio module does not support Monochrome EXR images #2800

JGamache-autodesk opened this issue Nov 9, 2023 · 6 comments

Comments

@JGamache-autodesk
Copy link
Contributor

Description of Issue

We have a unit test in MayaUSD that reads OpenEXR images with 1, 2, and 4 channels in both half and float format to make sure every image type loads correctly.

The unit test failed on Linux with 2 channel images and crashes on Windows with 1 and 2 channel images.
image

Steps to Reproduce

  1. Extract these test scene files and try them all in usdview. The RGBA ones will succeed (albeit with a warning) and the RG ones will fail. The status of the R ones depend on the platform.

These images used to load correctly in USD 23.8.
OpenEXRFormats.zip

System Information (OS, Hardware)

Windows: heap corruption crash before the scene shows
Linux: Corrupted images

Package Versions

USD 23.11 with MaterialX 1.38.8

Build Flags

@jesschimein
Copy link
Contributor

Filed as internal issue #USD-8927

@meshula
Copy link
Member

meshula commented Nov 9, 2023

Thanks for the report, and posting test data.

@meshula
Copy link
Member

meshula commented Nov 10, 2023

Hmmm, the previous version of Hio does not treat your images properly. For example, the test file RG16F is loaded by Hio as the file name implies, the first channel treated as red, the second as green. See screenshot below. However, opening your image to inspect it's layer attributes, RG16F has two channels, one labeled "Y" for luminance, and one labels "A" for alpha. It should look as the second screenshot.

R16F however works as expected, in the previous version.

image image

@JGamache-autodesk
Copy link
Contributor Author

In MayaUSD we expand vec2 YA image to vec4 YYYA (RGB greyscale + alpha) so they render like this in our unit test:
image

Might be an option for the HIO image loader as well.

@meshula
Copy link
Member

meshula commented Nov 10, 2023

Great, that's what's intended in Hio as well, but not happening due to an error. Thanks for the confirmation of what you'd expect!

seando-adsk added a commit to Autodesk/maya-usd that referenced this issue Nov 13, 2023
…-maya-usd

* Disabled test that is failing with USD 23.11 because of problem in Usd.
  PixarAnimationStudios/OpenUSD#2800
seando-adsk added a commit to Autodesk/maya-usd that referenced this issue Nov 13, 2023
…-maya-usd

* Disabled test that is failing with USD 23.11 because of problem in Usd.
  PixarAnimationStudios/OpenUSD#2800
pixar-oss pushed a commit that referenced this issue Dec 11, 2023
- Added support for Y channels (support exists in OIIO EXR reader)
- Fix swizzling AY to YYYA (feature was broken in OIIO EXR reader, AY became RG01)
- Add support of channel expansion for 2 and 3 channel images
- Fix swizzling logic in decoder

Fixes #2800

(Internal change: 2307933)
@JGamache-autodesk
Copy link
Contributor Author

Dec 11th commit fixes the issue. Thanks!

seando-adsk pushed a commit to autodesk-forks/USD that referenced this issue Mar 1, 2024
- Added support for Y channels (support exists in OIIO EXR reader)
- Fix swizzling AY to YYYA (feature was broken in OIIO EXR reader, AY became RG01)
- Add support of channel expansion for 2 and 3 channel images
- Fix swizzling logic in decoder

Fixes PixarAnimationStudios#2800

(Internal change: 2307933)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants