|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello! is there a way to do toon rendering and DOF with POV-ray?
thanks
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
nhytro wrote:
> Hello! is there a way to do toon rendering and DOF with POV-ray?
>
>
> thanks
With 3.5 there is no easy way of doing toon rendering that I know of but I
believe some people have done it, hopefully they'll see this and answer. I
assume focal blur is the same effect as DOF in some other packages. Check
section 6.4.3 in the docs.
-Jide
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
#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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
This great!! thanks for your help
T.J.Viking wrote:
> #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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
user wrote:
>This great!! thanks for your help
>
Oi! Stop top-posting
John
--
Run Fast
Run Free
Run Linux
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|