I baked the scene in Unity and showed it in three.js, and loaded the lightmap in .exr format in three.js. As a result, the exr map of 512 * 512 pixels and below were displayed normally, and the map of 1024 * 1024 pixels and above were displayed normally. Display with red, green and blue noise. for example:
1 exr maps baked by Unity to use as a lightmap锛宻ize 1024*1024
1 exr maps baked by Unity to use as a lightmap for the model, size 1024*1024
4 exr maps baked by Unity to use as a lightmap for the model, size 512*512
NVIDIA GeForce GTX 1060 5GB;
Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
@threethreenine Thank you for letting us know about the problem.
Is it possible to share the .exr file in question?
Also, report the values inside textureData.header
, please.
new EXRLoader()
.load( 'textures/file.exr', function ( texture, textureData ) {
console.log( textureData.header )
} );
@sciecode If possible, please give me an email address and I will send the documents to this email.
I screenshot the value oftextureData.header
as follows
Nothing stands out in the header info, so I'm guessing this is yet another bug with PIZ compression.
@sciecode I have shared files on Google Cloud, here is the link https://drive.google.com/file/d/12yK5C-4k2a7Ah9v1C-xciaCZFzdhTDNN
Yes, the issue is indeed related with the compression algorithm used internally.
It might take a while to debug exactly the cause, but I've saved the file using a different compression that works correctly. You might want to use that while I try to find the cause of the problem.
If unity allows control over the internal compression for the .exr file, prefer using ZIP or DWA in the meanwhile.
@sciecode Thanks for your help and suggestions. I will try to replace the compression method of .exr files in Unity.
Or save the .exr file generated in Unity again using image processing software similar to Photoshop, I think you should use Photoshop to help me change its compression method.
Just filed a PR to solve this issue, would appreciate if you could test it @threethreenine.
@sciecode I have tested it, the effect is normal;
Most helpful comment
@sciecode I have tested it, the effect is normal;
