POV-Ray : Newsgroups : povray.programming : Some heightfield data read questions : Re: Some heightfield data read questions Server Time
12 Nov 2024 17:21:55 EST (-0500)
  Re: Some heightfield data read questions  
From: Ray Gardener
Date: 1 Mar 2007 17:53:25
Message: <45e75965@news.povray.org>
Christoph Hormann wrote:
> Ray Gardener schrieb:
>> 
>> Elev encoding uses the red channel as the most signficant, but 
>> GREY_SCALE3 only gives red a third of the "volume", so 16/3 ~= 5
>> bits. The resulting renders in POV-Ray bear that out; the HF winds
>> up terraced to about 31 levels.
> 
> Huh?
> 
> If you have a grayscale image stored in an RGB format (so R, G and B
>  identical for each pixel) i don't see how this handling reduces the
> data to 31 levels.

It's when the channels are used in red+green encoding; certainly a
grayscale image would work but it would only enjoy up to eight bits of
precision, which defeats the purpose of using 16 bits. For 16-bit r+g 
though that only gives 10 bits so r+g+b would be preferred.

Maybe the consistency should work the other way... apply GREY_SCALE3 to
24-bit RGB as well, and if people want elev precision beyond eight bits,
they need to use PNG/PGM. I wanted to offer a freedom of choice in terms 
of formats because POV-Ray lists several of them when reading HF files, 
but limiting Lev's POV export to PNG/PGM is probably more warranted -- 
doesn't hurt the functionality and avoids potential confusion.

Ray


Post a reply to this message

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