POV-Ray : Newsgroups : povray.general : How can I get indexed images? Server Time
5 Nov 2024 07:18:12 EST (-0500)
  How can I get indexed images? (Message 1 to 5 of 5)  
From: JSH
Subject: How can I get indexed images?
Date: 18 Jul 2007 12:10:02
Message: <web.469e3b1f3dbe0fd01510e1dc0@news.povray.org>
Hi!

I've started to work with PovRay recently and I wonder how to get an indexed
image file. As the standard output formats are .png or similar image formats
that don't allow any access to the indexed image, but directly contain an
RGB image.

a) Am I right that .df3 density files contain such indexed image data?

b) If so, how can I gain access to the .df3 file when I produce an image
with PovRay?

c) Is there an even better way to obtain indexed image data?


Grateful for any help,

JSH


Post a reply to this message

From: Tim Attwood
Subject: Re: How can I get indexed images?
Date: 18 Jul 2007 14:46:58
Message: <469e6022$1@news.povray.org>
> I've started to work with PovRay recently and I wonder how to get an 
> indexed
> image file. As the standard output formats are .png or similar image 
> formats
> that don't allow any access to the indexed image, but directly contain an
> RGB image.

First off some terminology, "indexed image" means that the palette of colors
is indexed. "Layered image" means that there are multiple image layers
with alpha transparency on top of each other.

> a) Am I right that .df3 density files contain such [layered] image data?

Sort of, they are really voxels conceptually. It's intended that this format
contains densities, not color information.

> b) If so, how can I gain access to the .df3 file when I produce an image
> with PovRay?

I think there's an option in MegaPov for outputing to df3, but I'm not
really familiar with that. In general .df3 files are created outside POV
and then used to control media density (make clouds).

> c) Is there an even better way to obtain [layered] image data?

Yes, use alpha transparency and then combine your rendered images
(.png) in a paint program. You can turn on the alpha channel with +UA.


Post a reply to this message

From: Alain
Subject: Re: How can I get indexed images?
Date: 18 Jul 2007 21:03:14
Message: <469eb852@news.povray.org>
JSH nous apporta ses lumieres en ce 2007/07/18 12:09:
> Hi!
> 
> I've started to work with PovRay recently and I wonder how to get an indexed
> image file. As the standard output formats are .png or similar image formats
> that don't allow any access to the indexed image, but directly contain an
> RGB image.
A GIF image is indexed (into a colours palete), as is a 256 colours BMP, PNG, 
TGA and others.
> 
> a) Am I right that .df3 density files contain such indexed image data?
Those are density files, NOT image files. It contains RAW values for voxels 
within a given volume. There are no indexes to speak of. It may be tough of as a 
kind of volumetric, uncompressed, black and white, targa image. Any form of 
indexing is external to the file, independent from it, and totaly arbitrary.
> 
> b) If so, how can I gain access to the .df3 file when I produce an image
> with PovRay?
POV-Ray don't output DF3s, nor does it use them internaly, it can use them to 
modulate the density of a media. It can also use them to generate an isosurface.
> 
> c) Is there an even better way to obtain indexed image data?
Convert an image generated to an indexed format: reduce the colour depth to 8 
bits per pixel (256 colours) or less (16 = 4 bpp, 8 colours = 3 bpp, 4 colours = 
2 bpp).
> 
> 
> Grateful for any help,
> 
> JSH
> 
> 


-- 
Alain
-------------------------------------------------
"We returned the General to El Salvador, or maybe Guatemala, it's difficult to 
tell from 10,000 feet."           -- Anon.


Post a reply to this message

From: JSH
Subject: Re: How can I get indexed images?
Date: 19 Jul 2007 08:55:01
Message: <web.469f5ec7842bd7cc1510e1dc0@news.povray.org>
Alain <ele### [at] netscapenet> wrote:

Hi,

thanks so far. Indeed, I could use the .gif format and convert this back to
an image only containing intensities. But they are two dimensional!!

I am interested in the 3d image in form of a 3d-matrix or something similar.
On each position (x,y,z) there should be an intensity such that combining
this with an apropriate colorbar (or more colorbars) leads to the final
image.

a) To be more precise. Is there any way to receive such a 3d intensity
image? When I checked the source code it just looked as if they write this
information into .df3 files.

b) Some people do animations with povray. Is this maybe a way to receive 3d
images and not only projections into 2d??

What I am planning to do is to make images in povray and export this to
another software, where I want to use such pictures to test image
restoration procedures. I thought using povray could be an easy way to
design 3d geometrical structures. I just need one object per picture, so
there should be no problem with different color palets.

I would really apreciate it, if anybody could give me more hints.

Thank you again,
JSH


Post a reply to this message

From: Stephen
Subject: Re: How can I get indexed images?
Date: 19 Jul 2007 10:55:02
Message: <web.469f7a58842bd7ccc4e49fa40@news.povray.org>
"JSH" <nomail@nomail> wrote:
>
> I would really apreciate it, if anybody could give me more hints.
>


used are;
1. Slice (intersect) the object in question with a thin box in, stages and
output each image as a tga.
2. Each frame is a view of a 2D or 3D function in 2D and outputted as a tga.
I used this method to create a density file of a comet and a cubic
Mandelbrot.
You can then run tga3df3.exe to create the density file. The density files


Pov.

I posted an image and a couple of animations a few years ago

http://news.povray.org/povray.binaries.images/thread/%3C5eb2c19b7qgn62tbiaqfatoqp776pqpbdn%404ax.com%3E/?ttop=244520&to
ff=1500

http://news.povray.org/povray.binaries.animations/thread/%3Clttgc19cu5o4389ot7jdqfqjii18u14ssr%404ax.com%3E/?ttop=24433
5&toff=150

and
http://news.povray.org/povray.binaries.animations/thread/%3Ck9cfr1t7tiqs8v9c04lpif8vtfmso66584%404ax.com%3E/?ttop=24433
5&toff=100

The latter is from a problem I was getting due to the placement of the
camera, I think.




Stephen


Post a reply to this message

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