POV-Ray : Newsgroups : povray.advanced-users : 24 and 32 bit heightfields : Re: 24 and 32 bit heightfields Server Time
1 Jul 2024 05:46:30 EDT (-0400)
  Re: 24 and 32 bit heightfields  
From: clipka
Date: 29 Oct 2009 08:29:07
Message: <4ae98a93$1@news.povray.org>
Mike Williams schrieb:

> The PNG specs only allow 8 or 16 bit greyscale. You can hack the format 
> by setting the parameters to say that the image is a normal full colour 
> PNG with transparency, and get 8 bits for each of the R, G, B and A 
> channels, then use the red channel as the high order 8 bits, etc. Other 
> programs that handle PNG files will render it as full colour with 
> transparency. It will not be possible to find graphics applications that 
> would be able to manipulate the image as if it were greyscale.

The old hacked formats were invented because (a) formats with the same 
capabilities didn't exist, or could be processed only by very few 
applications, while converters were difficult to find, and (b) they were 
necessary.

Now again, formats supporting 32-bit greyscale are few, and the programs 
supporting them are even fewer. What's different, however, is that they 
are not needed.

16-bit depth greyscale formats were required to eliminate terracing with 
height fields, which would be a common effect with 8-bit depth images. 
Even with a uniform slope, terracing would occur at resolutions as low 
as 256x256.

With 16 bit depth, however, you can represent...

... the entire earth's topology (including ocean floors) to a vertical 
resolution of ca. 30 cm, or 1'0".

... the entire earth's continental topology (i.e. above ocean level) to 
a vertical resolition of about 15 cm, or 6".

... a section of the Grand Canyon to a vertical resolution of about 2,5 
cm, or 1".

If you really /need/ such a high vertical resolution (and can't get away 
with a 16-bit floating-point based format for instance, placing the 
range of highest precision around the camera elevation), chances are 
you're doin' it wrong, and that nobody will really bother to implement 
input/output routines for some exotic file format in POV-Ray just to 
help you out, unless he's at it anyway and implementing it would be just 
a few lines extra.

The good news is that I think nobody will bother to hack some other file 
format to serve that purpose either - at least as far as official 
POV-Ray is concerned.


Post a reply to this message

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