POV-Ray : Newsgroups : povray.newusers : How to combine an image map, color and transparency? : Re: How to combine an image map, color and transparency? Server Time
1 May 2024 15:36:38 EDT (-0400)
  Re: How to combine an image map, color and transparency?  
From: MichaelJF
Date: 24 Nov 2014 15:40:01
Message: <web.547396cc54c41e2211dcbc4e0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> I THINK what you might want to do is embed those into an IMAGE_PATTERN.
>
> The image_pattern will use the image file to determine the mapping values.
> Depending on the mapping value, you can either assign a color, or the "pieces"
> of the actual image file using image_map.
>
> So, for example -
>
> #declare ImageMap = pigment {image_map {png "ImageFile.png" once} };
>
> texture {
>  image_pattern {png "ImageFile.png" use_alpha once}
>  texture_map {
>   [0.0 SomePigment ]
>   [0.3 AnotherPigment ]
>   [0.6 pigment { ImageMap }]
>   [1.0 pigment { transmit 1 }]  // fully transparent
>  }
> }

Sorry, played around with that, but yield only syntax errors. This seems to be
better than my first proposal but still needs adjustment:

average pigment_map {
    [0.2 function{PR_FRed(x,y,z)} color_map{[0 rgbt 0][1 rgbt <1,0,0,1>*5]}]
    [0.2 function{PR_FGrn(x,y,z)} color_map{[0 rgbt 0][1 rgbt <0,1,0,1>*5]}]
    [0.2 function{PR_FBlu(x,y,z)} color_map{[0 rgbt 0][1 rgbt <0,0,1,1>*5]}]
}


Best regards,
Micahel


Post a reply to this message

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