-
-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multi-layer feature #53
Comments
Please describe an issue more precisely. |
Given I have a exr with n layers, how would you access it from tinyexr? |
Example questions: A) Require a list of the layers B) Allow selection of different layers C) Accessing the pixel info We are assuming rgba... but that may not be the case, but for game dev assuming rgba is not that bad. |
OpenEXR specification does not support multilayer, it is stored in multichannel manner. https://github.com/openexr/openexr/blob/develop/OpenEXR/IlmImf/ImfChannelList.h#L179 Currently |
Current balance: 0.05 ETH |
I have assigned Bounty program to this issue. Bounty hunter wanted! Requirements : Load, parse and create data structure of multiple layers. Write a document on multiple layer support in TinyEXR. |
@syoyo I've noticed this issue hasnt had any progress in some time, if you're happy, we'll put in some SNT as well to help increase the bounty value. |
Cool! It would be nice! How can we do it? |
We've added some SNT to the bounty as well now! |
@arash009 Awesome! |
I'd suggest editing the issue title to be clearer, as it's not just about documenting things but adding a multilayer feature to TinyEXR to handle this out of the box (the documentation part for what's currently possible would be what is described in #53 (comment)). |
I have fixed the title! |
We discussed about two modes:
Merge down is harder but is needed by our implementation. Split is easier but requires ui on the implementation. Comments? |
PR for GUI for layer splitting would be appreciated. |
Hello @syoyo and @fire,
|
Imagine in a game engine, you have the ability to get an exr image. What do you want to do with it? You may want to get every single layer stacked and exported as one exr image. How do you do this with multiple layers? You have multiple choices.
This assume the engine only has the ability to have one output rgbafloat in the default configuration. Channels is a different problem. |
I think I understand now. And by default tinyexr can search for RGB channels in all the layers and return first one found.. That would keep it functional with normal and multilayer exr-s. |
One more question: the issue is not only about loading multi-layer images but also about producing them right? Is it possible to produce multi-layer images with tinyexr right now? I thought it might be possible because layers are just channel naming... Thanks for the explanation @fire |
These are the original use cases. This is the photoshop use case. I have different layers in a document and I want to name them differently but composite them together. This is the CGI usecase. I have 4 PBR materials for a 3d mesh. The first layer is RGBA for the albedo. So this image would contain all the textures for one material. [Edited for grammar] |
multi-layer is already supported and you can access channels if you use https://github.com/syoyo/tinyexr/blob/master/tinyexr.h#L11370 I think it would be better to implement More better solution may be adding OpenEXR compatible API > #120 Merging layers would not be an task of TinyEXR. |
Hello, |
@usakhelo Awesome! merged PR! |
@usakhelo so you are eligible to receive 0.05 ETH as a bounty. Do you have ETH address? |
Thanks for fixing the leaks and merging @syoyo ! |
How do you use multiple layers with this library?
The text was updated successfully, but these errors were encountered: