POV-Ray : Newsgroups : povray.advanced-users : HDR images as functions: is this right? : Re: HDR images as functions: is this right? Server Time
28 Sep 2024 06:11:56 EDT (-0400)
  Re: HDR images as functions: is this right?  
From: Ive
Date: 27 Jan 2011 14:34:01
Message: <4d41c8a9$1@news.povray.org>
Am 27.01.2011 20:01, schrieb stbenge:
> Hello,
>
> I'm looking for a proper way to convert an HDR image into a function and
> then back into a pigment.
>
> The problem:
>
> 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.


> 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.

-Ive


Post a reply to this message

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