Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions THIRD_PARTY_LICENSES.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,17 @@ repository, unchanged.
- Model: © 2014 PixelMannen, [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/legalcode).
- Rigging and animation: © 2014 tomkranis, [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/legalcode).
- Conversion to glTF: © 2017 @AsoboStudio and @scurest, [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/legalcode).

## OpenEXR

`src/ae3d/exrpiz` (the PIZ block decoder of `ae3d.openexr`) follows the structure of the OpenEXR library's PIZ
decoder, written from the format's documentation and that library's source: the wavelet's level loop and its
Haar steps, the code-length table's run codes and the canonical code assignment. The library is BSD-3-Clause,
Copyright (c) Contributors to the OpenEXR Project; its notice is in that module's header. ae3d links none of it:
`tools/exr_reference/exrref.cpp` is a development tool against the official library, outside every build, that
wrote the PIZ test fixtures and the decodes they are held to.

## Poly Haven

`tests/fixtures/env/polyhaven/` holds two 1k HDRIs from [Poly Haven](https://polyhaven.com), published under
CC0 1.0 (public domain); see `tests/fixtures/env/PIZ.md` for the assets and their URLs.
12 changes: 12 additions & 0 deletions changes/2026-10-28-exr-piz.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### OpenEXR PIZ files load as environment maps (#875 follow-up)

- `ae3d.exrpiz`, the PIZ block decoder of `ae3d.openexr`: a block's Huffman stream, the per-channel 2-D wavelet
(the 14-bit and the 16-bit forms) and the value table from its bitmap, back to the scanlines the other
compressions leave, for HALF and FLOAT channels, RGB, RGBA and a lone Y, any data window. Pure Aether, from the
format's documentation and the structure of the OpenEXR library's decoder (BSD-3 notice in the module header).
Every Poly Haven EXR is PIZ, so `engine_set_environment` and `AE3D_ENV` now take them.
- Still refused by name: PXR24, B44, B44A, DWAA, DWAB, tiled, deep and multipart files.
- `half_to_float` keeps a half's negative zero a negative zero (it was +0), so a decode equals OpenEXR's bit for bit.
- Tests: `test_envimage` holds 24 PIZ files written by the OpenEXR library, and two Poly Haven 1k assets, to
that library's own decode, bit for bit (a hash of the texel bits), and cuts and damages the small ones at every
byte; `tools/exr_reference/exrref.cpp` writes and dumps them (a development tool, not built, not linked).
7 changes: 4 additions & 3 deletions docs/rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,10 @@ place and `engine_environment_error()` says why.
The map is an equirectangular (latitude-longitude) Radiance `.hdr` (RGBE, flat
or run-length, the four mirror orientations of its resolution line) or OpenEXR
(`ae3d.envimage`, from the formats' descriptions, no library): scanline files,
HALF or FLOAT, R G B (A) or a lone Y, compression NONE, RLE, ZIPS or ZIP, lines
in any order and any data window. PIZ, PXR24, B44, B44A, DWAA, DWAB, tiled,
deep and multipart files are refused by name. It is placed as a painted sky
HALF or FLOAT, R G B (A) or a lone Y, compression NONE, RLE, ZIPS, ZIP or PIZ
(`ae3d.exrpiz`, what Poly Haven's EXRs are), lines in any order and any data
window. PXR24, B44, B44A, DWAA, DWAB, tiled, deep and multipart files are
refused by name. It is placed as a painted sky
is: the top row is the zenith and the middle column looks along +x. Its light
is the engine's radiance times `intensity`: 1 is the file's own values, and
exposure handles the rest.
Expand Down
Loading
Loading