|
|
Przemek Loesch wrote:
> Hi Sam!
Przemek,
I'm sorry my reply is late. I didn't see yours until today :)
<clip>
> and lower right is depth-map
> corrected by making difference with gray, to shift focal point to the
> middle.
Interesting trick.
> My only question to you is about applying blur: Is there any way to apply an
> effect selectively relative to gray map?
Yes, there is.
With my technique, I blurred only the depth map with the Gimp. With POV,
I used the blurred depth_map as a 'container' for the real image. You
can blur an image in POV by using the average pattern and a #while loop.
The blurred pattern is placed in another pigment_map which is inside the
depth_map.
It's a bit hard for me to explain, so here's a prototype:
#declare depth_map =
pigment{
image_map{
tga"depth_map.tga" interpolate 2 once
}
}
#declare actual_image =
pigment{
image_map{
tga"actual_image.tga" interpolate 2 once
}
}
#declare R = seed(0001);
#declare DOF=
pigment {
// our 'container'
pigment_pattern{depth_map}
pigment_map{
#local V=0;
#while(V<=1)
[V
// this blurs the image
average
pigment_map{
#local vv=0;
#while(vv<=V*255)
[1
actual_image
// the 'V/20' at the end of the line below is how
// we adaptively blur the image according to our
// depth_map
translate<rand(R)-rand(R),rand(R)-rand(R),0>*V/20
]
#local vv=vv+1;
#end
}
]
#local V=V+1/255;
#end
}
}
I hope this helps.
Good luck~
-Sam
Post a reply to this message
|
|