POV-Ray : Newsgroups : povray.programming : New Output File Format Server Time
29 Jul 2024 00:35:20 EDT (-0400)
  New Output File Format (Message 1 to 10 of 10)  
From: Mat Anger
Subject: New Output File Format
Date: 27 Apr 1999 20:11:46
Message: <37264432.0@news.povray.org>
I'm working with the generic unix 3.1 sources on Win98 with MSVisual C++ 5,
to try to add a new file format which i would like to experient with using
some post-processing utilities.  The file format I would like to use would
be very similar to an uncompressed TGA, except it would use 48 bits per
colour (16 bits per component), and mapping pov intensity values 0 to 255 to
the whole range, instead of the range 0 to 1.0 which TGA does at the moment.
This is primarily so I can make 'luminous glow' around particulary bright
objects and highlights.

To do this, I have first created duplicates of the TGA implementation source
code, and symbols used in POV, to make my XLI (eXtended Lumination Image)
format.  It compiles fine, and recognises my new command-line option, and
outputs an .xli file in the TGA format, which is as far as I implemented,
but it only outputs the first 17 bytes of the file.  What am i doing wrong?
Has anyone got an example of how to add a new file format?  Is what I am
trying to do actually possibile?

Thanks for your time.

Mat Anger


Post a reply to this message

From: Mat Anger
Subject: Re: New Output File Format
Date: 28 Apr 1999 15:01:58
Message: <37274d16.0@news.povray.org>
Success! I've fixed the output problem; there was some code in targa.c which
was switching between 24 and 32 bit targa files and not recognising my
filetype so it simply didn't output any pixels.  I've coded my own output
routines and it now works fine in outputting a 48 bit-per-pixel image (16bit
RGBA)... BUT... these colour values are always in the range of 0 to 1.0 (256
in my file-format), never higher, so I've concluded that there is some code
in the lighting routines in POV that clips to the 0-1.0 range... to the
point, anyone know where it is? or can think of another reason?


Post a reply to this message

From: Ron Parker
Subject: Re: New Output File Format
Date: 28 Apr 1999 15:56:37
Message: <372759e5.0@news.povray.org>
On Wed, 28 Apr 1999 18:59:02 +0100, Mat Anger <mat### [at] angerforce9couk> wrote:
>... I've concluded that there is some code
>in the lighting routines in POV that clips to the 0-1.0 range... to the
>point, anyone know where it is? or can think of another reason?

Yes.  It's in colour.c.  The function is named Clip_Colour.


Post a reply to this message

From: TonyB
Subject: Re: New Output File Format
Date: 28 Apr 1999 16:45:31
Message: <372750A7.43CD2F94@panama.phoenix.net>
What programs are there able to view your new format?

I long ago suggested a format I discovered when looking at Radiance. It's called
RGBE. The E stands for 'exponent'. I don't really know what the benefit would be
over 32-bit color, but you should check it out. It looks good for raytracing.

Here's the link: http://www.graphics.cornell.edu/~bjw/rgbe.html

Enjoy. And good luck with yours. (=


Post a reply to this message

From: Ron Parker
Subject: Re: New Output File Format
Date: 28 Apr 1999 16:57:06
Message: <37276812.0@news.povray.org>
On Wed, 28 Apr 1999 14:17:12 -0400, TonyB <ben### [at] panamaphoenixnet> wrote:
>What programs are there able to view your new format?
>
>I long ago suggested a format I discovered when looking at Radiance. It's called
>RGBE. The E stands for 'exponent'. I don't really know what the benefit would be
>over 32-bit color, but you should check it out. It looks good for raytracing.
>
>Here's the link: http://www.graphics.cornell.edu/~bjw/rgbe.html

I recall looking at rgbe format, and the main complaint I had about it is it 
tries to represent things in real-world units.  Were it not for that, I think
something like it would be a nice addition to POV-Ray, though support in 
third-party apps would be severely lacking.

If the goal is to provide more dynamic range, might I suggest Daren Scot 
Wilson's unlimited light patch?


Post a reply to this message

From: Glen Berry
Subject: Re: New Output File Format
Date: 29 Apr 1999 06:48:06
Message: <372828b8.30037430@news.povray.org>
On 28 Apr 1999 15:57:06 -0500, par### [at] my-dejanewscom (Ron Parker)
wrote:

>
>If the goal is to provide more dynamic range, might I suggest Daren Scot 
>Wilson's unlimited light patch?

Correct me if I'm wrong, but Daren Scot's patch only serves to
compress the dynamic range of scenes to fit better into an 8
bit-per-pixel image. I wasn't aware that it would allow for higher bit
depths in the final image.

Personally, I wish that it were possible to create, display, and print
images with higher bit depths than is currently possible. The dynamic
range of 8 bpp pales in comparison to a well exposed Kodachrome slide.
Being a photographer for several years, I will never be totally
satisfied with digital imaging until the dynamic range of the images
is improved.

Later,

Glen Berry

Email:    7no### [at] ezwvcom
(remove the "7" to reply via personal email)

Website:  http://www.ezwv.com/~mclilith/index.html


Post a reply to this message

From: Ron Parker
Subject: Re: New Output File Format
Date: 29 Apr 1999 10:27:48
Message: <37285e54.0@news.povray.org>
On Thu, 29 Apr 1999 09:51:25 GMT, Glen Berry <7no### [at] ezwvcom> wrote:
>On 28 Apr 1999 15:57:06 -0500, par### [at] my-dejanewscom (Ron Parker)
>wrote:
>>If the goal is to provide more dynamic range, might I suggest Daren Scot 
>>Wilson's unlimited light patch?
>
>Correct me if I'm wrong, but Daren Scot's patch only serves to
>compress the dynamic range of scenes to fit better into an 8
>bit-per-pixel image. I wasn't aware that it would allow for higher bit
>depths in the final image.

It is probably true that it doesn't do anything to bit depth, but the
official POV already supports higher bit depths.  Quoting from the POV 
manual:

  Most of these formats output 24 bits per pixel with 8 bits for each of 
  red, green and blue data. PNG allows you to optionally specify the 
  output bit depth from 5 to 16 bits for each of the red, green, and blue 
  colors, giving from 15 to 48 bits of color information per pixel. The 
  default output depth for all formats is 8 bits/color (16 million possible 
  colors), but this may be changed for PNG format files by setting 
  Bits_Per_Color=n or by specifying +FNn, where n is the desired bit depth.

In combination with the unlimited light patch, this seems to provide the
desired functionality without the need for a custom file format.  While 
support for 16-bpp PNG files may not be universal, it is certainly more
widespread than that for RGBE or for any custom format.


Post a reply to this message

From: Glen Berry
Subject: Re: New Output File Format
Date: 30 Apr 1999 21:16:02
Message: <372a46ca.924945@news.povray.org>
On 29 Apr 1999 09:27:48 -0500, par### [at] my-dejanewscom (Ron Parker)
wrote this about the Unlimited Light patch:
>
>It is probably true that it doesn't do anything to bit depth, but the
>official POV already supports higher bit depths.  Quoting from the POV 
>manual:
>
>  Most of these formats output 24 bits per pixel with 8 bits for each of 
>  red, green and blue data. PNG allows you to optionally specify the 
>  output bit depth from 5 to 16 bits for each of the red, green, and blue 
>  colors, giving from 15 to 48 bits of color information per pixel. The 
>  default output depth for all formats is 8 bits/color (16 million possible 
>  colors), but this may be changed for PNG format files by setting 
>  Bits_Per_Color=n or by specifying +FNn, where n is the desired bit depth.
>

Yeah, I almost mentioned the 16 bpp PNG format in my previous message.
I had assumed that the person who posted the earlier message about the
Radiance format already knew about 16 bpp PNG's and had decided that
the Radiance format had some sort of advantage for their use.

My personal wish was to not only create these sorts of files, but to
view and print them in their full glory. If anyone knows how to do
those last two tasks, please let me know also. I have never made a 16
bpp PNG for the simple reason that I don't have any idea how to output
the image to film without dithering to 8 bpp before the transfer. Does
anyone else know of a method to do this?


Thanks,

Glen Berry

Email:    7no### [at] ezwvcom
(remove the "7" to reply via personal email)

Website:  http://www.ezwv.com/~mclilith/index.html


Post a reply to this message

From: Mat Anger
Subject: Re: New Output File Format
Date: 2 May 1999 01:12:39
Message: <372bd0b7.0@news.povray.org>
Glen Berry <7no### [at] ezwvcom> wrote in message
<372a46ca.924945@news.povray.org>...

>My personal wish was to not only create these sorts of files, but to
>view and print them in their full glory. If anyone knows how to do
>those last two tasks, please let me know also. I have never made a 16
>bpp PNG for the simple reason that I don't have any idea how to output
>the image to film without dithering to 8 bpp before the transfer. Does
>anyone else know of a method to do this?


I've finally got my addition to the POV 3.1e source working properly.  It
outputs as a 16bit RGBA file, with a similar format to TGA.  Photoshop 5
loads these if I manually specify the resolution and the 16 byte header and
it keeps the 16bits per channel.  I'm not sure if it also prints at 16bit,
printing on my original HP Deskjet wouldn't help much there :)

Mat Anger

mat### [at] angerforce9couk


Post a reply to this message

From: Jon A  Cruz
Subject: Re: New Output File Format
Date: 2 May 1999 22:27:17
Message: <372CFB97.9605AE42@geocities.com>
Mat Anger wrote:

> I've finally got my addition to the POV 3.1e source working properly.  It
> outputs as a 16bit RGBA file, with a similar format to TGA.  Photoshop 5
> loads these if I manually specify the resolution and the 16 byte header and
> it keeps the 16bits per channel.  I'm not sure if it also prints at 16bit,
> printing on my original HP Deskjet wouldn't help much there :)
>

So, is there any difference to using that format over outputting a 16bpp PNG
file?


Post a reply to this message

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