POV-Ray : Newsgroups : povray.general : remap RGBT color to anther RGBT color? : Re: remap RGBT color to anther RGBT color? Server Time
30 Jul 2024 12:20:29 EDT (-0400)
  Re: remap RGBT color to anther RGBT color?  
From: Christian Froeschlin
Date: 11 Jul 2009 18:17:38
Message: <4a590f82$1@news.povray.org>
Chris B wrote:
> 
> "caduser" <nomail@nomail> wrote in message 
> news:web.4a588d74bddeda84dbd439ba0@news.povray.org...
>> It seems if there is a way it would be the material file not the inc 
>> file right?
>> When I tried my colleagues approach:
>>
>> <%MATERIAL
>> texture {
>>    pigment
>>      {
>>          color rgbt <<%R%> * 0.8 + 0.2,<%G%> * 0.8 + 0.2,<%B%> * 0.8 +
>> 0.2,<%A%>>
>>
>>      }
>> It did work for Black but shifts every color if there was a way at 
>> this point to
>> just push one color value.
>> I also need to look more at the reflectivity discussed early see if I 
>> can make
>> Black reflect enough to not be pure black in the render.
>>
> 
> So did you try the other suggestions for your 'material' file (min, max 
> or clip)?
> They would seem to be able to do exactly what you're asking for.

I think he did not want to have colors change except pure Black/White.

However, if the above syntax allows you to configure the output then
it would seem you can insert arbitrary code into the SDL, e.g.,

<%MATERIAL
   texture {
     pigment {
       #local RED   = <%R%>;
       #local GREEN = <%G%>;
       #local BLUE  = <%B%>;
       #if (RED = 0 & GREEN = 0 & BLUE  = 0)
         #local RED   = 0.1;
         #local GREEN = 0.1;
         #local BLUE  = 0.1;
       #end
       #if (RED = 1 & GREEN = 1 & BLUE  = 1)
         #local RED   = 0.9;
         #local GREEN = 0.9;
         #local BLUE  = 0.9;
       #end
      color rgbt <RED, GREEN, BLUE, <%A%>>

      ...


Post a reply to this message

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