|
![](/i/fill.gif) |
#version 3.5;
#include "colors.inc"
global_settings {
assumed_gamma 1.0
}
#declare cam_loc=<0.0, 0.5, -8.0>;
#declare cam_target=<0.0, 0.0, 0.0>;
#declare cam_dir=cam_target-cam_loc;
// ----------------------------------------
camera {
location cam_loc
direction 1.5*z
right x*image_width/image_height
look_at cam_target
}
sky_sphere {
pigment {
gradient y
color_map {
[0.0 rgb <0.6,0.7,1.0>]
[0.7 rgb <0.0,0.1,0.8>]
}
}
}
light_source {
<0, 0, 0> // light's position (translated below)
color rgb <1, 1, 1> // light's color
translate <-30, 30, -30>
}
// ----------------------------------------
plane {
y, -1
pigment { color rgb <0.7,0.5,0.3> }
}
#macro
cartoon_texture(edge,edge_color,base_color,light_hardness,light_ambience,obj_center)
texture {
pigment {
slope obj_center-cam_loc
color_map {
[0.00 color rgb base_color ]
[0.5-edge-0.01 color rgb base_color ]
[0.5-edge color rgb edge_color ]
[0.5+edge color rgb edge_color ]
[0.5+edge+0.01 color rgb base_color ]
[1.00 color rgb base_color ]
}
}
finish{
specular 0 ambient light_ambience diffuse 1 brilliance 1-light_hardness
}
}
#end
sphere {
0.0, 1
cartoon_texture(0.12,<0,0,0>,<1,0.5,0>,0.8,0.2,<0,0,0>)
}
blob {
threshold .65
sphere { <.5,0,0>, .8, 1 }
sphere { <-.5,0,0>,.8, 1 }
sphere { <0,0.5,-0.5>,.8, 1 }
sphere { <0,-0.5,-0.5>,.8, 1 }
rotate y*30
translate -2*z//use translate, rotate etc before applying texture!!!!
translate -x
cartoon_texture(0.12,<0,0,0>,<1,0.5,1>,0.8,0.2,<-1,0,-2>) // we put there
transformed center!!
}
// as you can see.... the sharp objects render not properly.... just
// because the tangent of the surface is constant... got no idea how to cope with it
box { <2,-1,-3>,<4,1,-1>
cartoon_texture(0.146,<0,0,0>,<0.5,1,0.5>,0.8,0.2,(<2,-1,-3>+<4,1,-1>)/2)
}
Post a reply to this message
|
![](/i/fill.gif) |