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: Tim Nikias v2 0
Date: 17 Jun 2003 06:08:44
Message: <3eeee8ac$1@news.povray.org>
I'm doing it like this now:

 #local _I=function{pigment{_ImagePigment}}
 #local _Image=texture{
  pigment{function{_I(x,y,z).x}
   color_map{[0 rgbt <1,1,1,1>][1 rgbt <1,1,1,0>]}
   poly_wave _Exponent
   }
  finish{ambient _Brightness diffuse 0}
  }

And it works fine. Thanks for the suggestion though,
even though that one didn't work, it got me to the right
place.

Regards,
Tim
-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde
"Mark Weyer" <wey### [at] informatikuni-freiburgde> schrieb im Newsbeitrag
news:3EE### [at] informatikuni-freiburgde...
> > 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.