POV-Ray : Newsgroups : povray.binaries.utilities : Looking for a 16bit heightfield to logarithmic converter : Re: Looking for a 16bit heightfield to logarithmic converter Server Time: 23 Jul 2019 11:42:38 GMT
  Re: Looking for a 16bit heightfield to logarithmic converter  
From: Mike Williams
Date: 18 Dec 2003 12:04:10
Wasn't it Mike Williams who wrote:
>Wasn't it anidon who wrote:
>>I use POVRAY to make images of straylight in optical systems.  The very low
>>intensity parts of the image are the most interesting.  Although the
>>information is present in the red/green image it is not visually
>>intelligible. It would be nice to have a POV output file format that was
>>logarithmic - but otherwise a *.exe utility which inputs the heightfield
>>and outputs an image file which is proportional to the log ( decimal or
>>natural )of 1 to 65535.
>>
>>Is anyone able and willing and sufficiently interested to create one and
>>publish it?
>
>
>If you have an image processing program that accepts Adobe-compatible
>plugins, then I can let you have a plugin that will perform such
>processing. Windows only. I've tried testing it on a dark HF_gray_16 TGA
>file, and it seems to be doing the right sort of thing, but I don't have
>any images that are in any way improved by being logarithmised and the
>output looks pretty naff until I perform additional contrast and
>brightness processing.
>
>If you don't have an image processing program that accepts Adobe-
>compatible plugins, then it's possible to do it for free with Irfanview,
>by installing "8BF-Filters.dll" from the Irfanview plugins page, which
>allows Irfanview to run Adobe-compatible plugins.

I've now put the plugin on my website

http://www.econym.demon.co.uk/plugins/index1.htm

There seems to be a bit of a problem if you use the plugin with Paint
Shop Pro 8. I can't find any way to persuade PSP8 to save the data in
HF_Grey_16 format that's accepted by POV as a heightfield after
processing. It seems to be OK under Irfanview and PSP7.

I currently use the following rules (when my "Scale" parameter is left
at zero):

For 8-bit grey output: output=loge(input)*23.0832

For HF_Grey_16 output: output=loge(input)*5909

[These magic numbers were chosen such that the max input value of 65535
maps to the max output value (255 and 65535 respectively)]

I could easily change it to use other rules if you'd like. Or I could
write one that applies Gamma correction from HF_Grey_16 to HF_Grey_16.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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