POV-Ray : Newsgroups : povray.programming : Some heightfield data read questions : Re: Some heightfield data read questions Server Time
12 Nov 2024 17:19:47 EST (-0500)
  Re: Some heightfield data read questions  
From: Christoph Hormann
Date: 1 Mar 2007 07:52:52
Message: <45e6cca4$1@news.povray.org>
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.

> 
> I don't personally have any issue with red+green interpretation, I'm 
> only saying, if that's how colors get converted to elevations, why not 
> do that consistently regardless of bit depth (except for 8 bits, where 
> it makes more sense to use palette indices).

As said the red+green interpretation is an old hack that only exists for 
backwards compatibility.  And as also said there is absolutely no 
practical use in having the same hack used for 48 bit images as well.

> Heightfields today have explicit file formats -- why not support some of 
> them? [...]

POV-Ray supports PGM and PNG 16 bit grayscale images perfectly.  If you 
like to implement support for additional formats you are welcome but a 
bloated, proprietary or rarely used format will most likely not make it 
into POV-Ray.

> 
> I can see that in some cases. I believe, though, libtiff is good about 
> providing the photometric interpretation value of a TIFF image being 
> read; if you want I can attempt a quick patch here and share the code.

If you like to implement a broader Tiff support for POV-Ray using basic 
libtiff functions you are welcome.  This is not a matter of a 'quick 
patch' though.

-- Christoph


Post a reply to this message

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