POV-Ray : Newsgroups : povray.beta-test : Headers in crater.pov and crater_dat.pov Server Time
30 Jul 2024 16:25:58 EDT (-0400)
  Headers in crater.pov and crater_dat.pov (Message 11 to 14 of 14)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Anders K 
Subject: Re: Headers in crater.pov and crater_dat.pov
Date: 12 Nov 2001 20:50:24
Message: <3bf07c60$1@news.povray.org>
> > When I try to use a PNG with 16 bits per color as a height field, why
does
> > POV-Ray say, "Warning: Converting PNG image map to 8 bits/sample from
higher
> > bit depth."?
>
> Good question.  Maybe a damaged PNG image?
>
> Can anybody confirm such a message with any other PNG image?

In fact, I can reproduce it simply by rendering this file:

  // cmd: +w400 +h400 -a +fn16 +otesthf
  camera { orthographic location z look_at 0 right x up y }
  plane { z, 0 pigment { gradient x translate x/2 } finish { ambient 1 } }

which creates testhf.png, and then rendering this:

  height_field { png "testhf.png" }

Anders


Post a reply to this message

From: Bob H 
Subject: Re: Headers in crater.pov and crater_dat.pov
Date: 13 Nov 2001 00:24:27
Message: <3bf0ae8b@news.povray.org>
"Anders K." <and### [at] f2scom> wrote in message
news:3bf07c60$1@news.povray.org...
> > > When I try to use a PNG with 16 bits per color as a height field, why
> does
> > > POV-Ray say, "Warning: Converting PNG image map to 8 bits/sample from
> higher
> > > bit depth."?
> >
> > Good question.  Maybe a damaged PNG image?
> >
> > Can anybody confirm such a message with any other PNG image?
>
> In fact, I can reproduce it simply by rendering this file:
>
>   // cmd: +w400 +h400 -a +fn16 +otesthf
>   camera { orthographic location z look_at 0 right x up y }
>   plane { z, 0 pigment { gradient x translate x/2 } finish { ambient 1 } }
>
> which creates testhf.png, and then rendering this:
>
>   height_field { png "testhf.png" }

Ron has said it is broken in some way, I guess... well maybe not broken,
judging by the conversion message, but at least not possible for now.

Think I understand all this more anyhow, I was pretty sure my image software
is too feeble to decipher 16 bpp images so I'm convinced of that.  I'll look
for stuff that can read image info better.

Bob H.


Post a reply to this message

From: Thierry B 
Subject: Re: Headers in crater.pov and crater_dat.pov
Date: 13 Nov 2001 10:26:31
Message: <3BF13BFF.E0DF0952@chez.com>
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?
> 
	you can try  http://www.wotsit.org/ or Google...

-- 
Thierry     exposant de trucs bizarres     http://la.buvette.org/exPOV/


Post a reply to this message

From: Ron Parker
Subject: Re: Headers in crater.pov and crater_dat.pov
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

<<< Previous 10 Messages Goto Initial 10 Messages

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