envtools icon indicating copy to clipboard operation
envtools copied to clipboard

32bit float tif format

Open velkyel opened this issue 11 years ago • 1 comments

hello,

i'm trying to use envtoirr.c but when i convert (imagemagic tool) your cube.tif like this:

$> convert etc/cube.tif -depth 32 -define quantum:format=floating-point cube-float.tif

cube-float.tif looks ok in osx Preview.

$> ./envtoirr -n 128 -f cube-float.tif cube-irr.tif Spherical harmonic coefficients: 0.09265 0.08183 0.05268 -0.02050 -0.02379 -0.01875 0.01137 0.01039 0.00868 -0.00058 0.00017 0.00088 -0.01319 -0.01128 -0.01012 0.00549 0.00483 0.00035 -0.00869 -0.00703 -0.00668 -0.01011 -0.00871 -0.01014 -0.00062 -0.00123 -0.00239

this values are so low and produce almost black irradiance map. I know it's probably problem in conversion, but tif format has so many options and i don't know what could be wrong. How should look like etc/cube.tif in 32bit float format? How do you convert to this format?

velkyel avatar Apr 10 '14 15:04 velkyel

Hi velkyel,

The irradiance environment formulation presumes a high dynamic range input, which the example cube map is not. There's a good likelihood that the output that you see is correct, and the LDR input is just too dim to produce anything useful. You could try stretching the exposure with Imagemagick, but since the sky and the trees will have roughly the same brightness, you might not get the expected sky-like illumination.

rlk avatar Apr 15 '14 14:04 rlk