POV-Ray : Newsgroups : povray.pov4.discussion.general : palette RGB values instead of index : palette RGB values instead of index Server Time
20 Jul 2024 07:02:09 EDT (-0400)
  palette RGB values instead of index  
From: Woody
Date: 30 Aug 2012 18:25:01
Message: <web.503fe720c06b9598d9fdb3af0@news.povray.org>
This question is in regards to a post I made earlier today in the general forum

Specifically it relates to the 'image_map' keyword and how 'filter' and
'transmit' colors are specified. Currently they are specified by integer values
that serve as index numbers. (See documentation at

How hard would it be to make it so instead of requiring an index number, only
the RGB value of the color in question was needed?

For example instead of something like (as detailed at the above documentation

 image_map {
    gif "mypic.gif"
    filter   0, 0.5 // Make color 0 50% filtered transparent
    filter   5, 1.0 // Make color 5 100% filtered transparent
    transmit 8, 0.3 // Make color 8 30% non-filtered transparent

something like

 image_map {
    gif "mypic.gif"
    filter   <0,0,0>, 0.5
         // RGB value of color 0, make it 50% filtered transparent
    filter   <0,128,0>, 1.0
        // RGB value of color 5, make it 50% filtered transparent
    transmit <0,255,255>, 0.3
        // RGB value of color 8, make it 30% non-filtered transparent

I'm assuming for such a convention that if the color is not present there is no
filter or transmit applied.

Any thoughts?


Post a reply to this message

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