|
|
Stephen <mca### [at] aolcom> wrote:
> Has anyone tried to produce a solarisation effect?
Hi,
with a simple approach I got this image - here is the code
// render with image resolution and No AA. Method is very memory intensive for
large image sizes!
#version 3.7;
global_settings {
assumed_gamma 1
}
#include "stdinc.inc"
camera {
orthographic
location <0,0,-2>
look_at 0
right x*image_width
up y*image_height
}
#declare image_width_Old = image_width;
#declare image_ratio = image_width/image_height;
#declare image_height_Old = image_width_Old/image_ratio;
#declare pig_map =
function {
pigment {
image_map {jpeg "glasses" gamma 2.2}
scale <image_width_Old,image_height_Old,1>
}
}
#declare nx = 0;
#while (nx < image_width)
#declare ny = 0;
#while (ny < image_height)
#declare paint_pig = pig_map (nx+0.5,ny+0.5,0);
box {
0, 1
pigment {color srgb <max (paint_pig.x,
1-paint_pig.x),max (paint_pig.y, 1-paint_pig.y),max (paint_pig.z,
1-paint_pig.z)>*2-1}
finish {emission 1 diffuse 0}
translate <nx-image_width*0.5,ny-image_height*0.5,0>
}
#declare ny = ny+1;
#end
#declare nx = nx+1;
#debug concat (str (nx/image_width*100, 0, 1)," % processed \n")
#end
Norbert
Post a reply to this message
Attachments:
Download 'glasses solarized.jpg' (359 KB)
Preview of image 'glasses solarized.jpg'
|
|