POV-Ray : Newsgroups : povray.general : Color add : Re: Color add Server Time
5 Aug 2024 08:27:36 EDT (-0400)
  Re: Color add  
From: DTWallace
Date: 6 Jan 2003 02:25:02
Message: <web.3e192e3b29d06f4776a7aa520@news.povray.org>
Rafal 'Raf256' Maj wrote:
>I have i.e. sphere rgb <1,0,0> behind a box rgb <0,1,0> and all this behind
>a wall rgb .3
>
>Now I want color of pixel, that is on render output "inside" all 3 shapes
>(inside there projection on view port exacly) to have color :
>
><1,0,0> + <0,1,0> + .3 = <1.3,1.3,0.3>
>

This is possible in Pov 3.5.  There's a trick with transmit and ambient:

object {
  thing
  #declare small = 0.00001;
  pigment {rgbft <1,0,0, 0,1-small>} // additive red
  finish {ambient 1/small diffuse 0}
}

(here's another cool trick:
  pigment {rgbft <1,1,1, -1,0>}
  finish {ambient 0.5 diffuse 0}
inverts the colors behind it.)

Of course the addition / inversion happens once each time the ray passes
through the object's surface, so it works best on discs and planes and such,
which the ray can only hit once.

 -DTWallace


Post a reply to this message

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