mrdoob / three.js

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

EXR: lineOrder Decreasing #27927

Closed TodicaIonut closed 5 months ago

TodicaIonut commented 5 months ago

Description

THREE.EXRLoader: Skipped unknown header attribute type 'lineOrder'.

Reproduction steps

  1. lineOrder DecreasingY

Code

function parseLineOrder( dataView, offset ) {

            const lineOrders = [
                'INCREASING_Y'
                'DECREASING_Y'
                'RANDOM_Y'
            ];

Live example

Screenshots

Untitled11

Version

r163

Device

Desktop

Browser

Chrome

OS

Windows

Mugen87 commented 5 months ago

EXRLoader currently supports only INCREASING_Y.

According to the OpenEXR spec, lineOrder is defined like so:

Specifies 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).

@sciecode When I remember correctly the loader does in general not support tiles but do you think adding support for DECREASING_Y is feasible?

@TodicaIonut Do you mind sharing an EXR asset in this thread with DECREASING_Y line order in its header?

sciecode commented 5 months ago

@sciecode When I remember correctly the loader does in general not support tiles but do you think adding support for DECREASING_Y is feasible?

That would be correct. Unfortunately tiled images would require a major rework of the entire module, as the initial port of loader was based on a version that did not consider tiled images a possibility. I would like to address it eventually, but I don't really see this happening so soon.

DECREASING_Y scan-line images would be much simpler to implement, as it only involves re-arranging the output image scan order. I'll see if I can add support for it in the next few days.

TodicaIonut commented 5 months ago

EXR three.zip

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

Untitled12 Error message: Error: THREE.EXRLoader: Provided file is currently unsupported.

Mugen87 commented 5 months ago

@TodicaIonut We are not planning to implement tiles support soon so it's best to focus on the DECREASING_Y change for now.