POV-Ray : Newsgroups : povray.advanced-users : HDR images as functions: is this right? : Re: HDR images as functions: is this right? Server Time
27 Jun 2024 13:59:17 EDT (-0400)
  Re: HDR images as functions: is this right?  
From: stbenge
Date: 27 Jan 2011 14:59:57
Message: <4d41cebd@news.povray.org>
On 1/27/2011 11:33 AM, Ive wrote:
> Am 27.01.2011 20:01, schrieb stbenge:
>> HDR images, when used as functions, produce color banding due to clipped
>> (wrapped) color values. This is the typical behavior of functions, and
>> should be expected.
>
> Ahh!!! Now I get it. It is not the function itself, it is the range of
> the color_map that limits to the 0..1 range. Of course. So Jaimes min()
> makes perfectly sense and your solution overcomes this limitation.

Yeah, it really had me stumped for a while :) I too tried min(), but 
that just clamps the intensities... you might as well be using a PNG or 
TGA image.

>> My solution:
>>
>> Divide the image function by 255 and multiply each channel's color by
>> 255:
>
> The only issue: why 255? Using the 8bit byte range is a completely
> random choice and I've seen much higher light intensities within HDR
> image files. Given that OpenEXR uses 16bit floats (and Radiance
> effectively also) and POV-Ray internal 32bit floats you can safely use a
> value of e.g. 10000 without loosing precession.

I'll admit that I guessed the range of values an HDR image can hold. I'd 
like to find the maximum possible value so I can update Rune's 
illusion.inc to support HDR images to the fullest extent.

Sam


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.