POV-Ray : Newsgroups : povray.general : df3 and color-maps : Re: df3 and color-maps Server Time
30 Jul 2024 20:17:53 EDT (-0400)
  Re: df3 and color-maps  
From: Alain
Date: 27 May 2008 10:15:15
Message: <483c1773$1@news.povray.org>
minzi0815 nous illumina en ce 2008-05-27 09:18 -->
> Hi,
> 
> I have a df3-file that holds 2-byte values and have problms setting up the
> color_map - not very successfull yet.
> 
> I have tried outthings like :
> 
> color_map{
>         [0 rgb 0]
>     [1 rgb <1,1,1>]
>  }
> 
> ....or...
> 
> color_map{
>  [0.2 rgb <0,0,0>]
>  [0.3 rgb <1,0,0>]
>  [0.4 rgb <0,1,0>]
>  [0.5 rgb <0,0,1>]
>  [0.8 rgb <1,1,1>]
>  }
> 
> ....but not very successfull yet. What I want to achieve us to have a different
> color for every different value in the df3-file.
> 
> Any idea ? Thanks in advance...
> 
> 
> 
> 
A color_map can have at most 256 entries. It's interpolated between the given 
values, I think that it's a linear interpolation.

The first map give a linear ramp going from black (no media) to white. The 
result should be the same as if you don't provide any map.

The second map turn off any voxel with a value of 0.2 or less, then raise to 
pure red at 0.3, shift to green at 0.4 with yellow at 0.35, then turn blue at 
0.5, then turn to pure white at 0.8 and stay there for any value larger than 
0.8. That white can hide the contribution of other voxels on the same ray.

-- 
Alain
-------------------------------------------------
Cat, n.: Lapwarmer with built-in buzzer.


Post a reply to this message

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