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 06:18:23 EDT (-0400)
  Re: remap RGBT color to anther RGBT color?  
From: Alain
Date: 10 Jul 2009 23:21:32
Message: <4a58053c$1@news.povray.org>

> I am working with an application that produces POV files of 3D objects from a
> library. The problem I am facing is when the objects are colored black. We
> render most objects to Steel and when an item is absolute black it does not
> render well as there is no reflectivity of course (I understand why this
> occurs)
> 
> The value in the POV file is:
> 
> texture {
>     pigment
>       {
>           color rgbt <0.,0.,0.,0.>
>       }
> 
> I found if I manually changed to:
> 
> texture {
>     pigment
>       {
>           color Gray20
>       }
> 
> Then it rendered just as I want. What I am trying to accomplish is a way to
> remap these colors with one of the include files. We currently point to a
> material ppv file which has color.inc, skies.inc and textures.inc. Is it
> possible to either add to one of these or add a new inc file that would run a
> macro to remap that absolute black to a dark gray?
> 
> One of my colleagues suggested we take this approach:
> 
> color rgbt <<%R%> * 0.8 + 0.2,<%G%> * 0.8 + 0.2,<%B%> * 0.8 + 0.2,<%A%>>
> 
> But that also forces light gray to white by pushing every color and this has the
> same problem pure white and pure black are not good in renderings and also not
> desirable in print. SO ultimately I would like 2 macros I guess, one to push
> pure white to light gray and pure black to dark gray. I looked through the
> macro documents but could only see how to push one colors space e.g. RGB to
> another e.g. HSL and not how to map RGB to RGB (or RGBT to RGBT). I see the
> fine folks here accomplishing some very cool things so figured this would be
> the place to find out. IS this possible?
> 
> 

If the rgbt<0,0,0,0> is generated by the external application, can you 
set it's palete? If you can, set "black" as something like 
rgb<0.1,0.1,0.1> or rgbt<0.1,0.1,0.1,0>
By the same way, you could redefine "white" as rgb<0.9,0.9,0.9> or 
rgbt<0.9,0.9,0.9,0>



Alain


Post a reply to this message

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