Comments (8)
I have no experience with OpenEXR image. I suppose that since it is HDR image, its pixel value doesn't fit in the range [0, 1] which is used by RGBA32
texture, is that correct?
If that's the case, I can add support for RGBAFloat
texture as well.
Can you post a sample EXR image and a JPEG/PNG counterpart of what it should look like?
from unityasyncimageloader.
Yes absolutely. Most of the time, EXR contains 16 or 32 bit data (often imported as RGBAHalf
or RGBAFloat
), In unity it can also be imported as RGBA32 but everything above 1.0 is clamped. Also EXR tend to contain HDR linear data.
From what I experienced using the API I assumed that the data read would fallback to pure white float4(1.0,1.0,1.0,1.0) so it doesn´t break the import. I have put my eyes in the code but I couldn't really understand how FreeImage works :/
If you can have a look to make it import properly it would really be awesome! <3
Regarding the sample data, I publshed some years ago a bunch of flipbooks containing data both in TGA and EXR that you can use as example : https://blog.unity.com/technology/free-vfx-image-sequences-flipbooks
Also, there are many full linear HDR EXR available at https://polyhaven.com/hdris under CC0 license
from unityasyncimageloader.
@peeweek I added support for EXR image in the latest release. Let me know if you have any issue with loading EXR image.
from unityasyncimageloader.
Wow thanks ! It did work with my textures :) .
I had also a bunch of textures from https://github.com/AcademySoftwareFoundation/openexr-images but some of them did not load correctly. I am giving you the callstack but it seems it breaks from a burst job.
I am not sure whether these images are standard or contain quite Advanced EXR features that are borderline to be supported. I will do some exception handling for these images.
System.InvalidOperationException: Illegal instruction executed
This Exception was thrown from a job compiled with Burst, which has limited exception support.
0x00007ffc571d27d3 (e50d06487d315d3d1d42e3eef89a917) [unknown:0] Unity.Jobs.IJobParallelForExtensions.ParallelForJobStruct`1<AsyncImageLoader.TransferRGBFloatImageToRGBAFloatTextureJob>.Execute
0x00007ffc571d2621 (e50d06487d315d3d1d42e3eef89a917) a4b79d6fc4e40dcd47f38264cdb951c4
0x00007ff60fd388e0 (Unity) ExecuteJob
0x00007ff60fd38c55 (Unity) ExecuteJobCopyData
0x00007ff60fd3995f (Unity) ForwardJobForEachToManaged
0x00007ff60fd34c0c (Unity) JobQueue::Exec
0x00007ff60fd34f3e (Unity) JobQueue::ExecuteJobFromHighPriorityStack
0x00007ff60fd35614 (Unity) JobQueue::ProcessJobs
0x00007ff60fd3782f (Unity) JobQueue::WorkLoop
0x00007ff60ff35ea7 (Unity) Thread::RunThreadWrapper
0x00007ffc88907614 (KERNEL32) BaseThreadInitThunk
0x00007ffc893626a1 (ntdll) RtlUserThreadStart
from unityasyncimageloader.
Can you try turning off Burst and see if it still works? Also, send me the image that results in this error as well.
from unityasyncimageloader.
I just tried disabling burst compilation with the same results. However, with compilation enabled and safety checks disabled, the issue is not present anymore.
Otherwise, the output image has correct size, color format but all zeroes as data.
from unityasyncimageloader.
Please post me the EXR image, so I can test it out myself.
from unityasyncimageloader.
Sure, here it is. If you want EXR test images you can grab more from here : https://github.com/AcademySoftwareFoundation/openexr-images/tree/master/TestImages (this image originates from this repo)
from unityasyncimageloader.
Related Issues (14)
- LoadImageAsync fails to generate mipmaps HOT 6
- Question: Does this plugin work with android builds? HOT 7
- Exception: Bitmap bitdepth not supported: 8 HOT 1
- Change interface from byte[] to Memory<byte> HOT 1
- System.ArgumentException: Invalid length of '{0}'. It must be greater than 0. HOT 1
- Encode Texture2d Asynchronously
- CreateFromImageAsync Texture2D does not work async / SupportsTextureFormatNative error HOT 6
- Could you add performance tests?
- Maybe Prefer to use simpler api for larger ammount of use cases? HOT 1
- webgl HOT 2
- Transparency issue vs using unitys native importer HOT 3
- MacOS HOT 1
- Texture Blinking Issue HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unityasyncimageloader.