mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
101.47k stars 35.29k forks source link

Error EXR: `tiledimage`. warning: `envmap`, `tiledesc` #27933

Closed TodicaIonut closed 5 months ago

TodicaIonut commented 5 months ago

Description

warning: THREE.EXRLoader: Skipped unknown header attribute type 'envmap'. here. THREE.EXRLoader: Skipped unknown header attribute type 'tiledesc'.

Error message: type: "tiledimage" here Error: THREE.EXRLoader: Provided file is currently unsupported.

Reproduction steps

  1. warning tiledesc
  2. warning envmap
  3. Error tiledimage

Code

type : "tiledimage"

Live example

Screenshots

chrome: Untitled15

Natron: Untitled16

Version

r163

Device

Desktop

Browser

Chrome

OS

Windows

Mugen87 commented 5 months ago

I understand that one part of this issue is about adding support for tiled images to EXRLoader.

But the envmap seems unrelated to that. It seems this attribute is used to distinct between the equirectangular and cube map format. Since the loader does not support loading cube maps, it's probably better to make two issues.

This issue should focus on tiled images, a second one on cube map support.

TodicaIonut commented 5 months ago

OpenEXR spec, lineOrder, tiles is defined like so:

pecifies in what order the scan lines in the file are stored in the file (increasing Y, decreasing Y, or, for tiled images, also random Y).

This attribute is required only for tiled files. It specifies the size of the tiles, and the file’s level mode.

adding support for RANDOM_Y is feasible? adding support for envmap is feasible? adding support for tiledesc is feasible? tiles 256 random Y.zip tiles 512 random Y.zip cc @sciecode Untitled27

sciecode commented 5 months ago

As mentioned already, we won't be adding support for tiled-images for now. tiledesc and lineOrder: RANDOM_Y are all related with tiled-images, so - not feasible.

envmap, on the other hand, informs whether the image should be treated as ENVMAP_LATLONG Equirectangular, or ENVMAP_CUBE CubeMap. I can look into adding support for these. The only trouble is that the orientation conventions used for OpenEXR's envmaps differs from ours. So, the data transformation to conform with three.js's convention will take some effort. Will see if I can get it done by next weekend.