POV-Ray : Newsgroups : povray.general : idea for an alternate type of focal blur Server Time
5 Nov 2024 05:24:22 EST (-0500)
  idea for an alternate type of focal blur (Message 1 to 10 of 22)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Kenneth
Subject: idea for an alternate type of focal blur
Date: 20 Sep 2007 02:40:01
Message: <web.46f2155cf7875f7e928c85260@news.povray.org>
This is something I posted recently, just as a comment at another,
somewhat-related news thread; but I had been wanting to suggest it for some
time, so  I thought I'd give it its own post...

I believe that an alternate
type of focal blur would be visually/aesthetically useful, one that blurs
the image only from the camera to the
object/point of interest, then keeps the distance beyond that sharp. I'm
thinking along the lines of "hyperfocal distance" in a real camera lens,
but more extreme. It probably has no analog in the real world of lenses, but
I believe (and this is subjective, of course) that it
would help to make the blurring more realistic in some circumstances-- as
for outdoor scenes on a
bright and sunny day.  The blurring that POV currently uses sometimes makes
objects in a scene look "small" or miniaturized--a sharp zone surrounded by
a sea of blurriness.   I realize that real lenses do that (!), and that it's
more pronounced when making close-up photos, depending on the lens aperture.
 But I guess that's the point I'm trying to make: that the current focal
blur has a tendency to make all scenes look like they are close-ups. But
the way we "see" the world, things close to our eyes are blurry, things far
away are sharp (or at least, our brains seem to make it so!)

I'm thinking that implementing such a blur in POV-Ray
would *only* (?) require that image pixels (or rays) "beyond" the point of
max
sharpness not be jittered. As it is now, pixels/rays are jittered (equally?)
in
*both* directions relative to the max sharpness point.

Could this be implemented as easily as I imagine?

Ken W.


Post a reply to this message

From: honnza
Subject: Re: idea for an alternate type of focal blur
Date: 20 Sep 2007 05:35:00
Message: <web.46f23df756160c32a9ce4df50@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> This is something I posted recently, just as a comment at another,
> somewhat-related news thread; but I had been wanting to suggest it for some
> time, so  I thought I'd give it its own post...
>
> I believe that an alternate
> type of focal blur would be visually/aesthetically useful, one that blurs
> the image only from the camera to the
> object/point of interest, then keeps the distance beyond that sharp. I'm
> thinking along the lines of "hyperfocal distance" in a real camera lens,
> but more extreme. It probably has no analog in the real world of lenses, but
> I believe (and this is subjective, of course) that it
> would help to make the blurring more realistic in some circumstances-- as
> for outdoor scenes on a
> bright and sunny day.  The blurring that POV currently uses sometimes makes
> objects in a scene look "small" or miniaturized--a sharp zone surrounded by
> a sea of blurriness.   I realize that real lenses do that (!), and that it's
> more pronounced when making close-up photos, depending on the lens aperture.
>  But I guess that's the point I'm trying to make: that the current focal
> blur has a tendency to make all scenes look like they are close-ups. But
> the way we "see" the world, things close to our eyes are blurry, things far
> away are sharp (or at least, our brains seem to make it so!)
>
> I'm thinking that implementing such a blur in POV-Ray
> would *only* (?) require that image pixels (or rays) "beyond" the point of
> max
> sharpness not be jittered. As it is now, pixels/rays are jittered (equally?)
> in
> *both* directions relative to the max sharpness point.
>
> Could this be implemented as easily as I imagine?
>
> Ken W.

IIUC the blur is implemeted by shooting rays from random locations to the
focused plane. Maybe you could focus to the infinity (fixed focus cameras
do this) but then you can not focus anything else. You can already do/fake
this by focusing a very distant object (focal_point 1e6*z). Then the only
thing you can change is the aperture.
BTW anything is a close-up relative to the background, just the relative
aperture gets smaller. :-)

one idea might be to refract the ray to one particular direction if it
reaches the focused point but:
1) it's unrealistic
2) what if the ray undergoes a refraction before reaching the focus plane?
It might be difficult to decide the correct direction and might not look
good in some cases. Doing nothing results in e.g. FBing the background
behind a (refractive) window but not if seen directly.

The eye works just like a usual camera with two differences:
-the retina is spherical, not planar. This can simulated by lowering the
aperture around the edges but that's not that important.
-the eye focuses on whatever you look, but not at the same time. When you
watch the clouds, your newspaper is blurred. If you are reading the clouds
are.
This can be simulated by shooting one ray directly and then focusing other
ones on this one if it is far enough, else at the closest focusable point.
However,
--you can also want to focus on the reflections/refractions. You might not
want to focus your window when looking through. Correctly determining the
focal distance through curved surfaces is impossible (but you can pretend
they are completely flat). Another question is, what to focus at, though?
--you still get blurred background in front of an object and the object
blurred in front of the background, just with a sharp line between those
two. Never mind the antialiasing.
--If you don't sample more points when hitting an object far enough you get
no blur of a close-by object when it should contribute below 50% color.
--Simple said, multi-focus cannot be simulated on a static image. The eye
doesn't produce static images, after all. Still you can render series of
images with different focal distances and feed them to a software to
refocus (or use a realtime blurring map, fed with a focused image and a
depthmap, but it doesn't display anything hidden by foreground objects).

All you can do is to use a low aperture (the most correct way), focus the
infinity (i.e. use a fixed focus camera), or not blur at all (or use a
post-processing tool to do so).


Post a reply to this message

From: Bill Pragnell
Subject: Re: idea for an alternate type of focal blur
Date: 20 Sep 2007 06:00:00
Message: <web.46f2443c56160c32731f01d10@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
>  But I guess that's the point I'm trying to make: that the current focal
> blur has a tendency to make all scenes look like they are close-ups. But
> the way we "see" the world, things close to our eyes are blurry, things far
> away are sharp (or at least, our brains seem to make it so!)

I think the tendency of POV-Ray scenes to look like miniatures is completely
down to the artist. It can be tricky to achieve realism but the fact is, if
you take simple lighting and geometry and then slap the default focal blur
settings on it, it won't look realistic. Time and effort are required...
:-) IMO, people tend to overuse focal blur, and frequently use it in scenes
that do not warrant it.

I think I see what you're getting at with your proposed foreground-only
blur, but you should be able to achieve this effect with the existing
algorithm.

Bill


Post a reply to this message

From: Alain
Subject: Re: idea for an alternate type of focal blur
Date: 20 Sep 2007 10:10:36
Message: <46f27f5c$1@news.povray.org>
Kenneth nous apporta ses lumieres en ce 2007/09/20 02:38:
> This is something I posted recently, just as a comment at another,
> somewhat-related news thread; but I had been wanting to suggest it for some
> time, so  I thought I'd give it its own post...
> 
> I believe that an alternate
> type of focal blur would be visually/aesthetically useful, one that blurs
> the image only from the camera to the
> object/point of interest, then keeps the distance beyond that sharp. I'm
> thinking along the lines of "hyperfocal distance" in a real camera lens,
> but more extreme. It probably has no analog in the real world of lenses, but
> I believe (and this is subjective, of course) that it
> would help to make the blurring more realistic in some circumstances-- as
> for outdoor scenes on a
> bright and sunny day.  The blurring that POV currently uses sometimes makes
> objects in a scene look "small" or miniaturized--a sharp zone surrounded by
> a sea of blurriness.   I realize that real lenses do that (!), and that it's
> more pronounced when making close-up photos, depending on the lens aperture.
>  But I guess that's the point I'm trying to make: that the current focal
> blur has a tendency to make all scenes look like they are close-ups. But
> the way we "see" the world, things close to our eyes are blurry, things far
> away are sharp (or at least, our brains seem to make it so!)
> 
> I'm thinking that implementing such a blur in POV-Ray
> would *only* (?) require that image pixels (or rays) "beyond" the point of
> max
> sharpness not be jittered. As it is now, pixels/rays are jittered (equally?)
> in
> *both* directions relative to the max sharpness point.
> 
> Could this be implemented as easily as I imagine?
> 
> Ken W.
> 
> 
In to many scenes using focal blur, the aperture is set way to large, resulting 
in a "macro photo" type of rendering. It's good to show the focal blur, but give 
a miniature look.
If the camera to focal_point distanse is at least 100 times the aperture, you 
start  to remove that miniature look (medium close-up). A factor of about 1000 
or more is usualy realistic. With such a setting, the area of sharpness will 
extend farther from the focal point when moving away than moving toward the camera.
Think about it: with a real camera, your aperture can be mesured in milimeters, 
sometimes in centimeters, while your distances are normaly mesured in meters, 
even in kilometers. When doing macro photography, the aperture is still mesured 
in the same units, but the distances are in centimeters...

-- 
Alain
-------------------------------------------------
It doesn’t matter what you do. It only matters what you say you’ve done and what 
you’re going to do.


Post a reply to this message

From: John VanSickle
Subject: Re: idea for an alternate type of focal blur
Date: 20 Sep 2007 19:01:47
Message: <46f2fbdb@news.povray.org>
Kenneth wrote:

> Could this be implemented as easily as I imagine?

http://graphics.pixar.com has a paper on combining focal blur, 
anti-aliasing, motion blur, specular highlighting, area lights, and 
blurred transparency into one feature.  To improve the quality of any of 
these, one merely increases the anti-aliasing level.

The way POV-Ray handles this now is rather cumbersome.  If I set 4x4 
anti-aliasing, and uses a 4x4 area light, the area light is fully 
sampled for each sample of the spatial anti-aliasing, and if I throw in 
10x oversampling for motion blur, then the scene takes 2560 times as 
long as a scene with no area lights, anti-aliasing, or motion blur.

The Pixar method rolls all of this together, so that the anti-aliasing 
level sets the quality level for all of these features that call for 
extra samples, and the rendering time is based strictly on the highest 
level required, and not the product of all the different quality levels 
multiplied together.  Essentially, extra quality for all features is 
paid for with the increase in quality to any feature.

In the example above, setting the anti-aliasing to 4x4 automatically 
sets the area lights to 4x4 subsampling, and also turns on 16x 
oversampling for the motion blur (if the objects receive the frame_start 
and frame_end settings that are necessary for motion blur), and the 
sampling level only goes up by a factor of 16.  If one of these features 
isn't sampled well enough, increasing the anti-aliasing level raises the 
sampling for that feature (and all others that are turned on for the 
render).  The Pixar docs say that 8x8 anti-aliasing is usually enough to 
take care of all the effects covered by this technique; the 2560x 
oversampling level from the current POV-Ray method would translate to an 
anti-aliasing level of 50x50 per pixel, which is overkill for almost any 
scene.

Regards,
John


Post a reply to this message

From: Kenneth
Subject: Re: idea for an alternate type of focal blur
Date: 21 Sep 2007 01:05:00
Message: <web.46f34e5d56160c3232a3ba970@news.povray.org>
"honnza" <jan### [at] centrumcz> wrote:

>
> IIUC the blur is implemeted by shooting rays from random locations to the
> focused plane. Maybe you could focus to the infinity (fixed focus cameras
> do this) but then you can not focus anything else. You can already do/fake
> this by focusing a very distant object (focal_point 1e6*z).

This idea that you and others have mentioned might well accomplish what I'm
after.  Perhaps not  by setting the sharp point (plane) "to infinity," but
however far (in z) my scene happens to extend to.  Anything past that
point wouldn't matter. Embarassed to say that such an obvious solution
hadn't occured to me. :-( The only small downside to this that I can think
of is not being able to set a point (plane) close to the camera where the
blurriness should cease; it's all up the aperature setting in this case. But
hey, I'll try it--maybe it will work just fine!

> BTW anything is a close-up relative to the background, just the relative
> aperture gets smaller. :-)

That's true. :-)

> -the eye focuses on whatever you look, but not at the same time. When you
> watch the clouds, your newspaper is blurred. If you are reading the clouds
> are.

Yes--and binocular vision adds complexity to the issue as well--two
overlapping "images" that the ol' brain has to make sense of.

Thanks for the reply!

KW


Post a reply to this message

From: Kenneth
Subject: Re: idea for an alternate type of focal blur
Date: 21 Sep 2007 01:35:01
Message: <web.46f3577856160c3232a3ba970@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote:
st, our brains seem to make it so!)
>
> I think the tendency of POV-Ray scenes to look like miniatures is completely
> down to the artist. It can be tricky to achieve realism but the fact is, if
> you take simple lighting and geometry and then slap the default focal blur
> settings on it, it won't look realistic. Time and effort are required...
> :-) IMO, people tend to overuse focal blur, and frequently use it in scenes
> that do not warrant it.

Most definitely. Far too many blurred-spheres-on-checkered-planes.  :-p  But
seriously, it does seem to be overused, more as an "effect" (albeit a
realistic one) than as an artistic/aesthetic addition to a scene.
>
> I think I see what you're getting at with your proposed foreground-only
> blur, but you should be able to achieve this effect with the existing
> algorithm.

I'll give it a try.

KW


Post a reply to this message

From: Kenneth
Subject: Re: idea for an alternate type of focal blur
Date: 21 Sep 2007 01:50:01
Message: <web.46f35a6056160c3232a3ba970@news.povray.org>
Alain <ele### [at] netscapenet> wrote:

> In to many scenes using focal blur, the aperture is set way to large, resulting
> in a "macro photo" type of rendering. It's good to show the focal blur, but give
> a miniature look.

You're right. Of course, it's good for "focusing attention" on a particular
part of an image; but there are other, opposite uses for focal blur where
you want to "de-emphasize" an area (the foreground.) without affecting
anything else.  That's my primary reason for wanting an alternate type of
blur.

> If the camera to focal_point distanse is at least 100 times the aperture, you
> start  to remove that miniature look (medium close-up). A factor of about 1000
> or more is usualy realistic. With such a setting, the area of sharpness will
> extend farther from the focal point when moving away than moving toward the camera.

Good point, and that's the way real lenses work (making hyperfocal distance
possible.) I wasn't aware that POV worked that way; I'll have to experiment
and see.

KW


Post a reply to this message

From: Kenneth
Subject: Re: idea for an alternate type of focal blur
Date: 21 Sep 2007 02:00:05
Message: <web.46f35ca456160c3232a3ba970@news.povray.org>
John VanSickle <evi### [at] hotmailcom> wrote:

>
> http://graphics.pixar.com has a paper on combining focal blur,
> anti-aliasing, motion blur, specular highlighting, area lights, and
> blurred transparency into one feature.  To improve the quality of any of
> these, one merely increases the anti-aliasing level.

Thanks for reminding me of this link; I had seen it recently in another news
thread comment (probably from you!) but hadn't looked at it carefully.
>
> The way POV-Ray handles this now is rather cumbersome.  If I set 4x4
> anti-aliasing, and uses a 4x4 area light, the area light is fully
> sampled for each sample of the spatial anti-aliasing, and if I throw in
> 10x oversampling for motion blur, then the scene takes 2560 times as
> long as a scene with no area lights, anti-aliasing, or motion blur.

OW!  That hurts.

Thanks for the reply; your explanation of the PIXAR method is fascinating.
Think a similar methodolgy could make it into POV?


Post a reply to this message

From: Bill Pragnell
Subject: Re: idea for an alternate type of focal blur
Date: 21 Sep 2007 05:45:00
Message: <web.46f3921356160c32731f01d10@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> You're right. Of course, it's good for "focusing attention" on a particular
> part of an image; but there are other, opposite uses for focal blur where
> you want to "de-emphasize" an area (the foreground.) without affecting
> anything else.  That's my primary reason for wanting an alternate type of
> blur.

My personal experience of focal blur is not extensive, but what you describe
was my goal in this image:

http://news.povray.org/povray.binaries.images/thread/%3Cweb.4669ae9cb060a40a7e595fbb0%40news.povray.org%3E/

The background (the object in focus - the brick structure) is not exactly an
infinite expanse, but it certainly occupies most of the scene's depth. Is
this the kind of thing you meant?

> > The way POV-Ray handles this now is rather cumbersome.  If I set 4x4
> > anti-aliasing, and uses a 4x4 area light, the area light is fully
> > sampled for each sample of the spatial anti-aliasing, and if I throw in
> > 10x oversampling for motion blur, then the scene takes 2560 times as
> > long as a scene with no area lights, anti-aliasing, or motion blur.
>
> OW!  That hurts.
>
> Thanks for the reply; your explanation of the PIXAR method is fascinating.
> Think a similar methodolgy could make it into POV?

I've noticed quite a few people who use focal blur regularly say they just
don't bother with AA - the focal blur does the job for them. Not quite what
you're asking but it does bring potential render times down a little!

:)


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.