POV-Ray : Newsgroups : povray.newusers : Looking for Full RGB color spectrum for my media density file. Server Time
23 Nov 2024 09:55:11 EST (-0500)
  Looking for Full RGB color spectrum for my media density file. (Message 1 to 6 of 6)  
From: sirzerp
Subject: Looking for Full RGB color spectrum for my media density file.
Date: 21 Dec 2015 17:05:02
Message: <web.5678775673f2438d25a5dca20@news.povray.org>
I am looking for color map that maps the deepest red at 0 value of my density
file and then works to green at .5 value and then works to deepest blue at the 1
value of my density file.

The kind of color map that you would use for a rain weather map.  I have worked
enough with colors to know that what I am looking for sounds easy, but might not
be easy at all.  RGB colors are kind of tricky.

The pov code below is an example of my format, but does not have the right color
map.



density {
         density_file df3 filename1
         interpolate 1
        color_map {
 [0.01 rgb <0,0,0>]
        [0.03 rgb <0,0,1>]
 [0.05 rgb <0,0,0>]
        [0.07 rgb <0,1,0>]
 [0.09 rgb <0,0,0>]
        [0.11 rgb <1,0,0>]
 [0.13 rgb <0,0,0>]
        [0.15 rgb <0,0,1>]
 [0.17 rgb <0,0,0>]
        [0.19 rgb <0,1,0>]

 [0.21 rgb <0,0,0>]
        [0.23 rgb <1,0,0>]
 [0.25 rgb <0,0,0>]
        [0.27 rgb <0,0,1>]
 [0.29 rgb <0,0,0>]
        [0.31 rgb <0,1,0>]
 [0.33 rgb <0,0,0>]
        [0.35 rgb <1,0,0>]
 [0.37 rgb <0,0,0>]
        [0.39 rgb <0,0,1>]

        [0.41 rgb <0,0,0>]
        [0.43 rgb <0,1,0>]
 [0.45 rgb <0,0,0>]
        [0.47 rgb <1,0,0>]
 [0.49 rgb <0,0,0>]
        [0.51 rgb <0,0,1>]
 [0.53 rgb <0,0,0>]
        [0.55 rgb <0,1,0>]
 [0.57 rgb <0,0,0>]
        [0.59 rgb <1,0,0>]

 [0.61 rgb <0,0,0>]
        [0.63 rgb <0,0,1>]
 [0.65 rgb <0,0,0>]
        [0.67 rgb <0,1,0>]
 [0.69 rgb <0,0,0>]
        [0.71 rgb <1,0,0>]
 [0.73 rgb <0,0,0>]
        [0.75 rgb <0,0,1>]
 [0.77 rgb <0,0,0>]
        [0.79 rgb <0,1,0>]

        [0.81 rgb <0,0,0>]
        [0.83 rgb <1,0,0>]
 [0.85 rgb <0,0,0>]
        [0.87 rgb <0,0,1>]
 [0.89 rgb <0,0,0>]
        [0.91 rgb <0,1,0>]
 [0.93 rgb <0,0,0>]
        [0.95 rgb <1,0,0>]
 [0.97 rgb <0,0,0>]
        [1.00 rgb <1,1,1>]


         }
      }


Post a reply to this message

From: Alain
Subject: Re: Looking for Full RGB color spectrum for my media density file.
Date: 21 Dec 2015 20:13:09
Message: <5678a3a5$1@news.povray.org>

> I am looking for color map that maps the deepest red at 0 value of my density
> file and then works to green at .5 value and then works to deepest blue at the 1
> value of my density file.
>
> The kind of color map that you would use for a rain weather map.  I have worked
> enough with colors to know that what I am looking for sounds easy, but might not
> be easy at all.  RGB colors are kind of tricky.
>
> The pov code below is an example of my format, but does not have the right color
> map.
>
>

Why is your color_map so complexe? Why do you think that you need those 
black stripes? Why do you repeat the sequence 
black-blue-black-green-black-red 8 times?
Why don't you keep it simple?

How about this?

color_map{
  [0.00   rgb<0,0,1>]
  [0.97/2 rgb<0,1,0>]
  [0.97   rgb<1,0,0>]
  [1.00   rgb 1]
}

Or

color_map{
  [0.0      rgb<0,0,1>]
  [0.97/4   rgb<0,1,1>]
  [0.97/2   rgb<0,1,0>]
  [0.97*3/4 rgb<1,1,0>]
  [0.97     rgb<1,0,0>]
  [1.0      rgb 1]
}

You may also try substituting srgb in place of rgb to use the sRGB 
colour space instead of the linear colour space used with plain RGB values.


Alain


Post a reply to this message

From: clipka
Subject: Re: Looking for Full RGB color spectrum for my media density file.
Date: 21 Dec 2015 21:33:04
Message: <5678b660$1@news.povray.org>
Am 21.12.2015 um 23:04 schrieb sirzerp:
> I am looking for color map that maps the deepest red at 0 value of my density
> file and then works to green at .5 value and then works to deepest blue at the 1
> value of my density file.

Make sure to use assumed_gamma 1.0 in the global settings; that'll give
you good colour transitions without drops in the brightness for the
in-between colours.

You'll probably want to start at rgb <R,0,0> for the red, then rgb
<Y,Y,0> if you want to go via yellow, then rgb <0,G,0>, and finally rgb
<0,0,B> for blue. I'd start with R=Y=G=B=1.0, and tweak from there.


Post a reply to this message

From: Cousin Ricky
Subject: Re: Looking for Full RGB color spectrum for my media density file.
Date: 22 Dec 2015 08:05:01
Message: <web.567949ef1d62f6e7566b73360@news.povray.org>
Alain <kua### [at] videotronca> wrote:
> You may also try substituting srgb in place of rgb to use the sRGB
> colour space instead of the linear colour space used with plain RGB values.

srgb won't make any difference if all of the anchor values are either 1 or 0.
The srgb keyword controls only the initial color, not the transitions between
colors.


Post a reply to this message

From: sirzerp
Subject: Re: Looking for Full RGB color spectrum for my media density file.
Date: 23 Dec 2015 15:15:18
Message: <web.567b001f1d62f6e725a5dca20@news.povray.org>
Thank for your answer, I will try it.  The reason that the first color scheme is
so complex is that I plot out equal potential contours of EM fields.

Continuous volumes of the same color have the save value in the density file.

Here's an example done with pov-ray.

https://youtu.be/nUsZniD6alA




Alain <kua### [at] videotronca> wrote:

> > I am looking for color map that maps the deepest red at 0 value of my density
> > file and then works to green at .5 value and then works to deepest blue at the 1
> > value of my density file.
> >
> > The kind of color map that you would use for a rain weather map.  I have worked
> > enough with colors to know that what I am looking for sounds easy, but might not
> > be easy at all.  RGB colors are kind of tricky.
> >
> > The pov code below is an example of my format, but does not have the right color
> > map.
> >
> >
>
> Why is your color_map so complexe? Why do you think that you need those
> black stripes? Why do you repeat the sequence
> black-blue-black-green-black-red 8 times?
> Why don't you keep it simple?
>
> How about this?
>
> color_map{
>   [0.00   rgb<0,0,1>]
>   [0.97/2 rgb<0,1,0>]
>   [0.97   rgb<1,0,0>]
>   [1.00   rgb 1]
> }
>
> Or
>
> color_map{
>   [0.0      rgb<0,0,1>]
>   [0.97/4   rgb<0,1,1>]
>   [0.97/2   rgb<0,1,0>]
>   [0.97*3/4 rgb<1,1,0>]
>   [0.97     rgb<1,0,0>]
>   [1.0      rgb 1]
> }
>
> You may also try substituting srgb in place of rgb to use the sRGB
> colour space instead of the linear colour space used with plain RGB values.
>
>
> Alain


Post a reply to this message

From: Dick Balaska
Subject: Re: Looking for Full RGB color spectrum for my media density file.
Date: 24 Dec 2015 00:53:14
Message: <MPG.30e55240c889273e989693@news.povray.org>
In article <web.567b001f1d62f6e725a5dca20@news.povray.org>, 
sir### [at] gmailcom says...
> 
> Thank for your answer, I will try it.  The reason that the first color scheme is
> so complex is that I plot out equal potential contours of EM fields.
> 
> Continuous volumes of the same color have the save value in the density file.
> 
> Here's an example done with pov-ray.
> 
> https://youtu.be/nUsZniD6alA
> 

That's slick.


Post a reply to this message

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