POV-Ray : Newsgroups : povray.binaries.images : Lensflare : Re: Lensflare Server Time
8 Aug 2024 18:21:55 EDT (-0400)
  Re: Lensflare  
From: Rune
Date: 19 May 2005 12:15:14
Message: <428cbb92@news.povray.org>
Zeger Knaepen wrote:
> "Rune" <run### [at] runevisioncom> wrote in message
> news:428c3e26$1@news.povray.org...
>> Zeger Knaepen wrote:
>>> Is there a fast way to combine pigments in an additive way?
>>
>> As fast as average. Use average, while multiplying all colors (or
>> alternatively the ambient and diffuse values) with the number of
>> pigments being averaged.
>
> That's how I did it, but it results in different shades of gray when
> I used more than one hue. But Slime's macro worked, so maybe this
> will become a fully functional lensflare-system, someday :)

Slime's macro can be used for creating pigments that are added to what is 
*behind* the object surface. But if you want to also add several of these 
pigments to *each other*, while still using one object surface only, then 
you can still use an average where you multiply all colors (or ambient and 
diffuse values) with the number of pigments being averaged.

So if you use both Slime's macro for the colors *and* the average trick, 
then you can have several pigments that are additive *both* to the 
background *and* to each other. :)

Example:

plane {-z, 0
   pigment {checker rgb 0.3, rgb 0.7}
   finish {ambient 1 diffuse 0}
   translate 10*z
}
plane {-z, 0
   pigment {
      average
      pigment_map {
         [1, spherical color_map {[0 transmit 0.99][0.3,rgbt <1,0,0,0.99>]} 
translate < 0.6, 0.0,0>]
         [1, spherical color_map {[0 transmit 0.99][0.3,rgbt <0,1,0,0.99>]} 
translate <-0.3, 0.5,0>]
         [1, spherical color_map {[0 transmit 0.99][0.3,rgbt <0,0,1,0.99>]} 
translate <-0.3,-0.5,0>]
      }
   }
   finish {ambient 100*3 diffuse 0}
   translate 3*z
}

Rune
-- 
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

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