POV-Ray : Newsgroups : povray.binaries.images : pattern blend : Re: pattern blend Server Time
17 May 2024 13:18:46 EDT (-0400)
  Re: pattern blend  
From: Norbert Kern
Date: 4 Mar 2018 12:15:05
Message: <web.5a9c28f78351d7b0bed38e420@news.povray.org>
"And" <49341109@ntnu.edu.tw> wrote:

> Actually I don't know how you blend 3 colors to this.


Hi,

I used this little scene -


#version 3.7;

global_settings {
        assumed_gamma 1
        max_trace_level 5
        noise_generator 2
}

#include "stdinc.inc"

background {color rgb 1}

camera {
 orthographic
 location -z
 right image_width*x
 up image_height*y
 look_at 0
}

#declare p_original =
function {
 pigment {
                image_map {jpeg "glasses" gamma 2.2}
         translate -0.5
         scale <image_width,image_height,1>
        }
}

#declare p_o_x = function {p_original (x,y,z).x}
#declare p_o_y = function {p_original (x,y,z).y}
#declare p_o_z = function {p_original (x,y,z).z}

#declare p_modify1 =
pigment {
        average
        pigment_map {
                [1      function {p_o_x (x,y,z)}
                        pigment_map {
                                #for (i, 0, 255)
                                        [i/255  bumps
                                                scale 2 // 1/input_wide_res
                                                scale 0.8
                                                rotate <0,0,20>
                                                color_map {
                                                        [0.2+0.6*(1-pow
(i/255,1/3))    srgbt <0,0,0,0.1>]
                                                        [0.2+0.6*(1-pow
(i/255,1/3))    srgbt <3,0,0,0.9>]
                                                }
                                        ]
                                #end
                        }
                ]
                [1      function {p_o_y (x,y,z)}
                        pigment_map {
                                #for (i, 0, 255)
                                        [i/255  bumps
                                                scale 2 // 1/input_wide_res
                                                scale 0.8
                                                rotate <0,0,20>
                                                color_map {
                                                        [0.2+0.6*(1-pow
(i/255,1/3))    srgbt <0,0,0,0.1>]
                                                        [0.2+0.6*(1-pow
(i/255,1/3))    srgbt <0,3,0,0.9>]
                                                }
                                        ]
                                #end
                        }
                ]
                [1      function {p_o_z (x,y,z)}
                        pigment_map {
                                #for (i, 0, 255)
                                        [i/255  bumps
                                                scale 2 // 1/input_wide_res
                                                scale 0.8
                                                rotate <0,0,20>
                                                color_map {
                                                        [0.2+0.6*(1-pow
(i/255,1/3))    srgbt <0,0,0,0.1>]
                                                        [0.2+0.6*(1-pow
(i/255,1/3))    srgbt <0,0,3,0.9>]
                                                }
                                        ]
                                #end
                        }
                ]
        }
}

plane {
 z, 10
 pigment {p_modify1}
 finish {emission 1}
}

Norbert


Post a reply to this message

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