POV-Ray : Newsgroups : povray.newusers : image brightness Server Time
28 Jul 2024 18:20:12 EDT (-0400)
  image brightness (Message 1 to 2 of 2)  
From: honnza
Subject: image brightness
Date: 14 Sep 2007 09:10:00
Message: <web.46ea870cd87267e0a9ce4df50@news.povray.org>
Hello,
 how do I make an image_map (or even any pigment) brighter or darker?
I could average it with black but that is not that nice and it can only
darken the picture (unless you can use negative weights).
 Also, how do I create a pigment which is a sum of red gradient x, green
gradient y and blue gradient z, so that the pigment color describes its
position in space?
the best I could do is to average those three gradients but I look for a
cleaner way.
 Thanks in advance,
Honnza


Post a reply to this message

From: Vincent Le Chevalier
Subject: Re: image brightness
Date: 14 Sep 2007 09:33:05
Message: <46ea8d91$1@news.povray.org>

>  Also, how do I create a pigment which is a sum of red gradient x, green
> gradient y and blue gradient z, so that the pigment color describes its
> position in space?
> the best I could do is to average those three gradients but I look for a
> cleaner way.

I don't know if it's the cleanest way but this seems to do the trick:

#declare colorCube =  pigment
  {
   gradient x
   pigment_map
   {
    [0 gradient y
       pigment_map
       {
        [0 gradient z color_map{[0 rgb <0,0,0>][1 rgb <0,0,1>]}]
        [1 gradient z color_map{[0 rgb <0,1,0>][1 rgb <0,1,1>]}]
       }
     ]
    [1 gradient y
       pigment_map
       {
        [0 gradient z color_map{[0 rgb <1,0,0>][1 rgb <1,0,1>]}]
        [1 gradient z color_map{[0 rgb <1,1,0>][1 rgb <1,1,1>]}]
       }
     ]
   }
  }


A bit repetitive, but...

-- 
Vincent


Post a reply to this message

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