POV-Ray : Newsgroups : povray.general : Rendering part of an image in black and white : Re: Rendering part of an image in black and white Server Time
4 Nov 2024 23:16:02 EST (-0500)
  Re: Rendering part of an image in black and white  
From: Kaveh
Date: 26 Aug 2003 06:51:06
Message: <kaveh-6F75AE.11510526082003@netplex.aussie.org>
In article <7hdmkvsdtnoqc06ut5rld340q39njfonh5@4ax.com>,
 ABX <abx### [at] abxartpl> wrote:

> On Tue, 26 Aug 2003 10:30:53 +0100, Kaveh Bazargan <kav### [at] maccom> wrote:
> > So imagine a rendered scene which is in full color, except a part of it 
> > which is scene through a special glass filter which is held up.
> 
> 1. Render your scene in color into image.png.
> 2. Render your mask.png with area of glass filter as white and rest in black.
> 3. Create scene like:
> 
>   #version 3.5;
>   global_settings{assumed_gamma 1.0}
>   #include "screen.inc" /* http://www.povray.org/documentation/view/288/ */
>   #declare Image=pigment{image_map{"image.png"}};
>   #declare f_Image=function{pigment{Image}};
>   #declare Processed=texture{
>     pigment{
>       image_pattern{"mask.png}
>       pigment_map{
>         [0 Image]
>         [1 function{f_Image(x,y,z).gray}]
>       }
>     }
>     finish{ambient 1 diffuse 0}
>   }
>   Screen_Plane(Processed, 1, 0, 1)
> 
> not tested but should work the way I understand your problem.

Thanks very much for taking the time to write this. Plenty of new stuff 
for me to learn here. 

Can I just confirm, this needs two renderings, one to create the first 
png, another to map it onto the 'screen'. Any possibility of a single 
render?

-- 
Kaveh


Post a reply to this message

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