 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
: I was playing with sponza atrium recently.
Beautiful! What is "Sponza Atrium"? Google to the rescue!
http://www.rna.hr/home.htm
=Bob=
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Przemek Loesch wrote:
> By the way - has anybody tried to make an post-processed DOF with MegaPov
> new features? I mean to create depth map first and then to use it for
> blurring original image?
Przemek,
The attached image was made using POV-Ray 3.6 and the Gimp (image
editor). Three files were used to make it: one to make a depth_map of
the geometry, one to render the sharp image, and one to put the first
two images together to make the fake depth-of-field effect.
The effect is far from perfect. I had to blur the depth map with the
Gimp so that the edges wouldn't remain sharp.
I can post the files with basic instructions if you are interested.
-Sam
Post a reply to this message
Attachments:
Download 'fake_dof.jpg' (42 KB)
Preview of image 'fake_dof.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
jer### [at] voila fr news:web.4190e7c07ef86eab5d3520950@news.povray.org
> http://site.voila.fr/jcolin/galerie/SponzaCamera2.jpg
> http://site.voila.fr/jcolin/galerie/SponzaCamera3.jpg
> http://site.voila.fr/jcolin/galerie/SponzaCamera4.jpg
>
>
Beautiful!
Btw, how about (all of us) posting own images with a small banner
containing
1) PovRAY 3.6 bleh,bleh..
2) (C) 2004 by...
3) WWW page
this way we can promote PovRAY, and also ourselfs :)
--
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 9 Nov 2004 18:53:25 -0500, "Rafal 'Raf256' Maj" <spa### [at] raf256 com> wrote:
> 1) PovRAY 3.6 bleh,bleh..
>
> this way we can promote PovRAY
Cool, but why to promote it with wrong shape of the name?
POV-Ray
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
abx### [at] abx art pl news:bfm3p0lc9qared8rpek8l7ui5c5tm2jdei@4ax.com
> Cool, but why to promote it with wrong shape of the name?
> POV-Ray
Whell... even the WWW should be change btw ;)
Oh, I see it is (redirection to povray).
--
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Samuel Benge <stb### [at] hotmail com> wrote:
> The attached image was made using POV-Ray 3.6 and the Gimp (image
> editor). Three files were used to make it: one to make a depth_map of
> the geometry, one to render the sharp image, and one to put the first
> two images together to make the fake depth-of-field effect.
>
> The effect is far from perfect. I had to blur the depth map with the
> Gimp so that the edges wouldn't remain sharp.
>
> I can post the files with basic instructions if you are interested.
>
> -Sam
Hi Sam!
Yes, this is what I was asking for. I've managed to make a similliar effect
with the Gimp. Upper two are the original images rendered with MegaPov,
lower left is the final image with faked DOF, and lower right is depth-map
corrected by making difference with gray, to shift focal point to the
middle.
My only question to you is about applying blur: Is there any way to apply an
effect selectively relative to gray map? In my image I've made layer mask
and then converted it to selection - Is it the right way?
Still I am investigating possibility of making this effect directly in
MegaPov in a similar way like "convolution_matrix" macro works, but with
creating new matrix for each point. It will be probably very slow, but
maybe faster then original DOF procedure.
Greetings!
Przemek
Post a reply to this message
Attachments:
Download 'bud.jpg' (55 KB)
Preview of image 'bud.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thank you Sam,
I see your technique is completely different than I thought. It may be very
useful if we try to make all things with POVRay. I still try to make it
purely in MegaPOV with matrixes defined for each point.
Przemek
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Przemek Loesch wrote:
> Thank you Sam,
> I see your technique is completely different than I thought. It may be very
> useful if we try to make all things with POVRay.
Yes, it would be nice. Since I have to pre-blur the depth_map, it would
be very difficult to do the whole effect with POV alone.
> I still try to make it
> purely in MegaPOV with matrixes defined for each point.
> Przemek
What does that do? Does it involve the matrix keyword?
-Sam
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Samuel Benge <stb### [at] hotmail com> wrote:
> What does that do? Does it involve the matrix keyword?
Not at all. I have never used "matrix" keyword but if I am not mistaken it
describes transformation of an object in 3D space. Actually I want to use
array[n][n], but technically it can be called matrix.
My idea is to create matrixes like this:
#declare array_for_single_point = array[5][5];
And then to fill this array with values based on depth map. The values are
scales for neighbours' colors.
For example - array for point which is exactly in focal distance looks like
this:
|0 0 0 0 0|
|0 0 0 0 0|
|0 0 25 0 0|
|0 0 0 0 0|
|0 0 0 0 0|
and for point which is completelly out of focus:
|1 1 1 1 1|
|1 1 1 1 1|
|1 1 1 1 1|
|1 1 1 1 1|
|1 1 1 1 1|
For all other points which are in between the values are in range 0-25.
The final value of color for the given point is averaged based on matrix
content.
I don't have any working code yet and even I'am not sure if it works like
this. If you are interested in please study "convolution_matrix.pov" and
"pprocess.inc" from MegaPov samples.
Przemek
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |