Displacement from image issues

Started by ajcgi, March 23, 2011, 10:21:08 am

Previous topic - Next topic

D.A. Bentley

Exr-IO appears to have a 2GB file size limit.  :(

WAS

Didn't catch that. :( I wonder if it's a 32-bit limitation? A lot of plugins target 32bit Photoshp... for whatever reason.

D.A. Bentley

No, I don't think it has anything to do with EXR being 32-Bit.  Different EXR readers/writers have different limitations.  For example, Teragen can output EXR's that are HUGE!  But other programs can't always deal with them.  Like Photoshop for example; it can load huge 4GB EXR files, but it can't save them with the standard (built-in) OpenEXR reader/writer.  There is Exr-IO, and also ProEXR, and others I imagine.  Programmers here on the forum might have more insight into why some formats have file size limitations.  Tiff also has a 4GB file size limit.  Recently I have been just using Photoshop PSB for everything I work on that is huge (It's 32-bit RGB and you can save files that are hundreds of GB).

D.A. Bentley

Quote from: WASasquatch on April 21, 2018, 02:08:14 am
Didn't catch that. :( I wonder if it's a 32-bit limitation? A lot of plugins target 32bit Photoshp... for whatever reason.


Actually I got a reply from the company that developed Exr-IO, and they said the 2GB limitation is a Photoshop limitation. 

bobbystahr

April 26, 2018, 09:06:43 pm #19 Last Edit: April 26, 2018, 09:11:54 pm by bobbystahr
Quote from: D.A. Bentley on April 26, 2018, 09:03:56 pm
Quote from: WASasquatch on April 21, 2018, 02:08:14 am
Didn't catch that. :( I wonder if it's a 32-bit limitation? A lot of plugins target 32bit Photoshp... for whatever reason.


Actually I got a reply from the company that developed Exr-IO, and they said the 2GB limitation is a Photoshop limitation. 


maybe try it in IrfanView...it's free and there may be a plugin.
Just checked and the is an EXR plugin, would that work. It's a 64 bit program, or 32; but if you run 64  use that one.

https://www.irfanview.com/64bit.htm
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

WAS

Quote from: Matt on April 14, 2018, 08:59:05 pm
Quote from: Oshyan on April 13, 2018, 08:52:09 pm
The Displacement of EXR (and any incoming file without georef/height information) is assumed to be 0-1, in meters.

- Oshyan


Actually it simply reads the pixel value in the EXR and that is the height in meters. The range you get will depend on what the exporting software writes into the image. Terragen's choices might be different from those of Gaea. I would encourage Dax to consider using the same mapping that Terragen does (pixel value = height in meters), because it eliminates the need to manually enter a scaling factor on a case by case basis.

Matt


32bit EXR files handle color depth and contrast differently than 16bit, probably where the changes are from. I'm not entirely sure why you'd need a 32bit EXR for Terragen, honestly. The effects where you'd assume artifacts may show up are pretty much useless to TG.

Matt

Yes, 16-bit integer is different from 16-bit float. 16-bit integer (as in TER and 16-bit TIFF) is usually enough for most terrain needs, as long as the data is normalized to fill the space from black to white. But 16-bit float (as in 16-bit EXR) has variable precision which can cause visible stepping at high altitudes. I worked on a project last year where this was noticeable, so I needed to add support for 32-bit EXR to solve this. The alternative is to stay with 16-bit integer TIFF, and this will save some disk space, but the downside is that you have to keep track of where black and white are.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

digitalguru

Quote16-bit float (as in 16-bit EXR) has variable precision which can cause visible stepping at high altitudes


Yes, I had the same thing before 32 bit exrs were introduced - see:
https://planetside.co.uk/forums/index.php/topic,21829.msg240240.html#msg240240     Reply #6

shows exactly that  :)

Quotebut the downside is that you have to keep track of where black and white are.


That's why I prefer 32 bit exr, the values are a real world correlation to Terragen.

I see a lot of post with people wrestling with large file sizes - for displacement I presume, and running into limits imposed by Photoshop and suchlike.

I have a solution that might work for some people - more info soon.


D.A. Bentley

I have been doing some more testing with 32-bit EXR heightfields, as well as 32-bit Tiff heightfields and has discovered a few things.  I think Oshyan mentioned it before, but older versions of Photoshop like CS5 don't properly save 32-bit exr files.  The exr files get clamped at 16-bit levels for some reason, so when loading on in as a heightmap in terragen the max height for the heightfield will show as 65.5 km, which I think relates to the max channel value of 65536 in 16-bit images.  I did try saving the same 32-bit exr as a 32-bit grayscale tiff out of Photoshop CS5 and that worked perfectly in Terragen as a heightfield.

erx-io as mentioned is a plugin that supports saving 32-bit exr's with a bunch of options and that does properly save the 32-bit exr for use as a heightfield in Terragen.

Another interesting thing I discovered is the "Height range" displayed at the bottom edge of the Heightfield load shader is very useful for knowing how much elevation data is in your heightmap.  With an 8-bit heightmap the max value you will see there is 256m (0-255 channel values) and for 16-bit heightmaps you will see up to 65.5 km (0-65536) and for 32-bit heightmaps you can see values beyond 1.03e+003 km (0-1,024,000 +).

Not that I would recommend doing this for any reason but just because I was curious I made a heightmap with such a huge range I had to use a displacement multiplier of "0.00000000000000000000000000000000001" to get my heightfield to the appropriate height within the terragen camera view.  The range for that 32-bit heightmap was "min = 0 mm, max = 3.4e+032 Mm". 

 Well, glad I got that figured out.  :)

-Derek

WAS

So erx-io is the way to go it looks like. Did you try proexr? That's what I was looking at for awhile.

D.A. Bentley

Quote from: WAS on May 01, 2020, 03:01:57 pmSo erx-io is the way to go it looks like. Did you try proexr? That's what I was looking at for awhile.
No I haven't tried ProEXR yet, and I thought it was a paid plugin but now looking at the web site it looks like it is free.
I'll download it and check it out as well.  Thanks!

sboerner

ProEXR works well. With some renderers you can use it to store all of the render passes in a single layered file, very handy. (Perhaps other EXR plugins do this as well, I've only used this one and OpenEXR.) Don't recall ever running into any limitations with very large files. I licensed it years ago and saw just recently that it is now free.