POV-Ray : Newsgroups : povray.beta-test : Headers in crater.pov and crater_dat.pov : Re: Headers in crater.pov and crater_dat.pov Server Time
30 Jul 2024 18:21:22 EDT (-0400)
  Re: Headers in crater.pov and crater_dat.pov  
From: Ron Parker
Date: 13 Nov 2001 14:01:53
Message: <slrn9v2rh2.6p8.ron.parker@fwi.com>
On Mon, 12 Nov 2001 20:57:09 +0100, Rune wrote:
> Thanks Ron an Christoph!
> 
> I'd also like some more information on the PPM format. First of all, does it
> work on all systems and operating systems? Second, how does it work
> with/without hf_gray_16 and with/without 16bit specified?

Yes, it works on all systems and operating systems.  With hf_gray_16, it
outputs the red/green sort of heightfield we're used to seeing in TGA images.
(though I would argue that it should output a 16-bit grayscale (PGM) image.)
Without hf_gray_16 and with +fp16, it outputs a 48-bpp RGB image in the 
format supported by netpbm and other fine programs (note that Photoshop is
not a "fine program" by this metric.  For a supposedly professional program,
their support for 48-bpp file formats is abysmal.)  With hf_gray_16 and +fp16, 
the output is broken: its header claims to be for a 48-bpp PPM image, but the 
data is that of a 24-bpp PPM image in the red/green format.

The bugs noted in the above paragraph have been entered into the Team's 
bug-tracking system and will be fixed at some point.  This is how it should
work when it's fixed:

+fp and no hf_gray_16:   24-bpp PPM
+fp and hf_gray_16:      16-bpp PGM
+fp16 and no hf_gray_16: 48-bpp PPM
+fp16 and hf_gray_16:    16-bpp PGM

I realize that this provides no way to make an 8-bpp PGM image, just as there
is no way to make an 8-bpp grayscale PNG, but that's an argument we've 
already had and it's just a fact of life.  Use postprocessing if that's what
you want (16-bpp to 8-bpp conversions are legal for the IRTC, if I remember
correctly.)

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

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