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

Add cubemap support for OpenEXR #483

Merged
merged 2 commits into from
Aug 6, 2024
Merged

Conversation

vkaytsanov
Copy link
Contributor

@vkaytsanov vkaytsanov commented Jun 23, 2024

OpenEXR format can includes metadata indicating the image is cubemap which is six images in a single file.

@vkaytsanov
Copy link
Contributor Author

@microsoft-github-policy-service agree

@walbourn
Copy link
Member

Thanks. I didn't realize OpenEXR stored envmaps directly. Can you point me to an example data file?

@walbourn walbourn self-assigned this Jun 27, 2024
@walbourn walbourn added enhancement exr OpenEXR auxiliary support labels Jun 27, 2024
@vkaytsanov
Copy link
Contributor Author

vkaytsanov commented Jun 29, 2024

Hello, the test I did was using their tool that ships with vcpkg, it is called exrenvmap.exe. Official documentation: https://openexr.com/en/latest/bin/exrenvmap.html

The attribute envmap is also documented at https://openexr.com/en/latest/StandardAttributes.html

These are the test files that the tool used and produced skybox.exr in the archive. Note: I could only open these files with Photoshop to view them:
forest.zip

@walbourn
Copy link
Member

walbourn commented Jul 2, 2024

For texassemble it makes sense to load an .EXR with "envmap" as an array of six images and write it as a cube-map or array texture. For texconv it probably should be treated as a texture array for consistent behavior within the tool.

@walbourn
Copy link
Member

walbourn commented Aug 6, 2024

I'll take this PR and do the code review in a new PR #494

Thanks!

@walbourn walbourn merged commit 2f84f54 into microsoft:main Aug 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement exr OpenEXR auxiliary support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants