POV-Ray : Newsgroups : povray.general : df3 and color-maps : Re: df3 and color-maps Server Time
30 Jul 2024 20:24:58 EDT (-0400)
  Re: df3 and color-maps  
From: minzi0815
Date: 28 May 2008 05:55:01
Message: <web.483d2be6faa86b18c32955910@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:
> > Well, to be honest, I am getting a little cobfused.
> > The question for me is the following:
> >
> > I want to display a df3 - file that holds 16 Bit measuring values that
> > range
> > from 0 to 65535. I want povray to display each value in a different color.
> > How
> > is that possible to do ? Do I need a color map at all ?
>
> There are several issues with what you are asking...
>
> 1) DF3 data describes a value for a 3D voxel,
> many voxels will be obsured by the voxels in front
> of them, to really see the values you need to
> slice the cloud of voxels.
>
> 2) The human eye can barely distinguish between nearby
> 16 bit colors, but if you wish to create a large color map
> the colors are linearly interpreted between entries in the
> color map. So if you have a color map...
> color_map {
>    [0 Black]
>    [1/255 Red]
>    [2/255 Yellow]
>    ...etc
> }
> then a value of $007F (127) will be a color rgb <0.498,0,0>,
> a value of $017F (295) will be a color rgb <1,0.498,0>.
>
> 3. POV is capable of producing 16 bit images instead of
> 24 bit. Set the Output_File_Type=T in povray.ini to produce
> targa format images, then add hf_gray_16 to your
> global_settings. Then set up your pigment slice with
> ambient 1 and no other lighting (no color map). The TGA
> image will have the MSB in the red channel and the LSB
> in the green channel. The preview shows just the red
> channel. When loaded into a paint program, this is a striped
> red-yellow-green image not very suited to human viewing,
> but the color values are unique per DF3 value. POV can
> load such TGA images as a height_field to show values
> as a height.
>
> // File: df3_slice.pov
> // Vers: 3.6
> // Desc: Orthographic DF3 slice
> // use Output_File_Type=T in povray.ini
> // use a square image ratio
>
> #version 3.6;
>
> #declare SliceAt = -0.5; // from 0 to -1
>
> global_settings {
>   assumed_gamma 1.0
>   hf_gray_16
> }
>
> camera {
>   orthographic
>   location <0,0,1>
>   look_at  <0,0,0>
>   right 1*x
>   up 1*y
> }
>
> box { // this box fits exactly in view
>   <-0.5, -0.5, 0>, <0.5, 0.5, 0.001>
>   texture {
>     pigment {
>       density_file df3 "spiral.df3"
>       translate <-0.5,-0.5,SliceAt>
>     }
>     finish {
>       ambient 1.0
>       diffuse 0.0
>     }
>   }
> }

Hm, I don't know what's wring in my configuration: All I get is white. Is there
a way I can contact you directley ?


Post a reply to this message

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