Very confused about image formats

Started by cyphyr, February 22, 2010, 12:05:35 PM

Previous topic - Next topic

cyphyr

Hi gang, its me again, confused, ... again.
I'm still trying to get my head around using images as displacements.

According to Matt:
Quote from: Matt on February 21, 2010, 06:24:59 PM
16-bit greyscale EXR, 16-bit greyscale TIFF and 16-bit greyscale SGI images should work. They can be read into the Image Map Shader or the Heightfield Load node.

Matt

Well I can't get this to work, hardly at all. Firstly I guess I just dont understand what is meant by 16-bit. I assumed that it meant 16-bits/channel as indicated in Photoshop but now I feel it must be something differant. If I open up a terragen saved .exr file and use Photoshops "info" tool it tells me the image is 8-bit. However if I look at the menue to change its bit depth (menu>image>mode> ...) It says the image is 32-bit. If I then change the image to 16-bit/channel, the info box still tells me that the image is 8bit.

SO WHATS GOING ON !! :)

Thats the first issue of the day, the seccond is how on earth do I create a 16-bit image and save it as an SGI, ot EXR, or TIFF.

THanks in advance guys, you always come through :)

Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)


Kadri

#2
Richard , after the topic you mentioned i did a little search and reading .
I did not come with a direct answer about Photoshop , but i think OpenEXR format and the handling (at least the listing of channel depth ) is not where it should be.

http://area.autodesk.com/forum/autodesk-3ds-max/autodesk-3ds-max--3ds-max-design-2010/problem-with-openexr-specially-with-16bit-half-float-and-option-to-un-premultiply-alpha-40straight-alpha41/page-last/

You are not alone . It is not always our fault , the developers are also humans  :)

Edit : For example Xnview shows my EXR files as 24 bit . The right way should be 48 (with 16 bit per channel) if i am not wrong .

Cheers.

Kadri.

Dune

That's interesting, because Photoshop sees my saved EXR's as 32 bit.... and an interesting topic, as I couldn't import 16-bit grey Tiff's either. Worth to follow.

---Dune

Hetzen


cyphyr

Thanks for the help guys, the Autodesk link and the CGTalk link were most useful.
Also its great to know I'm not the only one who has this problem.
In Photoshop I see the exr files I save from Terragen as 32-bit (if I look at the Image>Mode>... ... ... menus) and 8-bit (if I look at the "info" panel). I'm starting to think this is at least partially a miss-understanding on my part but I'm unsure where.
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

nikita

#6
I think the "8-bit" in the info tab is just there to remind you that the color displayed and picked up by the color picker is interpreted to be 8bit, simply because your monitor and graphics card ultimately work in 8bit.

On a greyscale image, bit and bit per channel are the same, since there is only one channel (lightness*). Set mode to greyscale and 16bits and you get a 16bit greyscale image.


*I know there are differences between lightness and luminance and so on, but whatever.

Kadri

#7
Richard , these links are not directly related with your-our problem , but are in a way helpful.
The bad thing is the more i read the more i need answers about some things .

For example :

http://www.hdrsoft.com/resources/dri.html

"16-bit images (i.e. 48 bits per pixel for a color image) resulting from RAW conversion are still considered Low Dynamic Range,
even though the range of values they can encode is much higher than for 8-bit images (65536 versus 256).
Converting a RAW file involves applying a tonal curve that compresses the dynamic range of the RAW data
so that the converted image shows correctly on low dynamic range monitors.
The need to adapt the output image file to the dynamic range of the display is the factor that dictates how much the dynamic range is compressed,
not the output bit-depth. By using 16 instead of 8 bits, you will gain precision but you will not gain dynamic range. "

http://www.anyhere.com/gward/hdrenc/hdr_encodings.html

Of course assuming they know what they are talking  ;)

But if some one could find an answer about Photoshop' s behavior it would be really helpful .
I searched the web and the Adobe forums but could not find a direct answer.
What i did get only is , as i said , that there are some problems it seems with EXR .

I would love to hear the opinion of Planetside .
They have obviously knowledge about the image formats they use and some of the problems about them in the software world (not only TG2) :)

Kadri.
 

cyphyr

Yes this is the kind of information I keep comming across. I do wonder if the images we get out of TG are infact propper .exr images or actually some "Low Dynamic Range" vairient.
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Kadri

#9
From the example of my last post i get this ... If i say :

" A 16 bit (per channel) image is not the same as a 16 bit (per channel) floating point image and the OpenEXR file format of TG2 uses the 16 bit (per channel) floating point format .
So EXR renders in TG2 are half precise but high dynamic range images still  . "

Is this correct ?

Kadri.

Mandrake

I have problems with tiff files or did at one point when I used them in c4d.
C4D would write a tag that was unacceptable when used in TG2
So I would use png files in c4d and switch to tiff in tg2.
This may have been fixed, not sure.

Njen

#11
Just to clear things up, here is a list of terms and what they commonly mean:


8bit - Most commonly referred to as a single channel in either an RGB or RGBA image. The range of data is 1 to 256.
24bit - Most commonly referred to as an image depth that has 3 channels of 8bit data: red, green and blue.
32bit - Most commonly referred to as an image depth that has 4 channels of 8bit data: red, green, blue and alpha.

16bit (integer) - Most commonly referred to as a single channel in an RGB or RGBA image. It has 256 times more detail than an 8bit's channel. The range of data is 1 to 65536.
16bit (float) - Most commonly referred to as a single channel in a modern image format that can contain any number of channels (but most commonly RGBA). The data range is 0 to 1*.
32bit (float) - Similar to 16bit float, except more precision. This is what would generally be considered the highest quality method of storing image data. The data range is 0 to 1*.

*Float can also store values below 0 and above 1 as well.

OpenEXR was developed by the smart people at ILM, and is capable of storing images in (per channel) 8bit, 16bit integer, 16bit float (commonly known as "half float") and 32bit float (commonly known as simply "float"). The OpenEXR format doesn't have any problems, though the programs implementation of how they interact with OpenEXR's might.

cyphyr

Great, thats a little more clear. :)

Any idea what software is good for reading and writing 16bit (integer or float) exr's. Photoshop dose not seem to do it but I dont really know.
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Kadri

Quote from: njen on February 24, 2010, 11:58:18 AM
... The OpenEXR format doesn't have any problems, though the programs implementation of how they interact with OpenEXR's might.

That was what i had in mind too. The program side of handling EXR . But i wasn't clear i see after reading ones more what i wrote.

Thanks , Njen . I think what i know about these things are not so wrong after all (ı hope :) )
I still didn't find anything about Photoshop but i am going to assume it is a problem with it .

Kadri.

Oshyan

As far as I know, TG2 supports full 32 bit per channel, i.e. 96 bit (3 channels, RGB, alpha is separate) for EXRs that it saves from renders. For loading EXRs, what you want is a single channel image with 16 bit data. Same with TIFF and SGI. It's difficult to get most image editors to do exactly what you want though, they're used to making multi-channel, full-color images. It's possible that TG2 is not loading your images right even though they're encoded right, but it's also very possible that you haven't figured out how to encode it right. It would of course be more helpful if TG2 could tell you what the problem was in your images...

- Oshyan