POV-Ray : Newsgroups : povray.general : remap RGBT color to anther RGBT color? : remap RGBT color to anther RGBT color? Server Time
30 Jul 2024 06:29:42 EDT (-0400)
  remap RGBT color to anther RGBT color?  
From: caduser
Date: 10 Jul 2009 10:30:01
Message: <web.4a574f3ea2e71d6edbd439ba0@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?


Post a reply to this message

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