POV-Ray : Newsgroups : povray.general : Adding two images via functions...? : Re: Adding two images via functions...? Server Time
5 Nov 2024 05:21:51 EST (-0500)
  Re: Adding two images via functions...?  
From: Mark Weyer
Date: 17 Jun 2003 03:50:47
Message: <3EEEC8AA.60709@informatik.uni-freiburg.de>
> What I'm trying to do is following:
> I've got two images, one in grayscale,
> the other just some image. I want to
> add the grayscale to the other image, so
> that white areas of the grayscale are white
> in the combination, and black won't change
> the colored image.

Let eps be small enough. I usually use

   #declare eps = 1e4;

Apply the gray picture as a texture to a plane and add:

   pigment_map {
     [0 rgbt <0,0,0,1-eps>]
     [1 rgbt <1,1,1,1-eps>]
   }
   finish {ambient 1/eps}

There should be a way to do that without the pigment_map,
but I am unsure enough about above syntax. Hope the idea
made it through, though...


-- 
merge{#local i=-11;#while(i<11)#local
i=i+.1;sphere{<i*(i*i*(.05-i*i*(4e-7*i*i+3e-4))-3)10*sin(i)30>.5}#end
pigment{rgbt 1}interior{media{emission x}}hollow}//  Mark Weyer


Post a reply to this message

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