POV-Ray : Newsgroups : povray.general : idea for an alternate type of focal blur : Re: idea for an alternate type of focal blur Server Time
31 Jul 2024 12:15:42 EDT (-0400)
  Re: idea for an alternate type of focal blur  
From: John VanSickle
Date: 21 Sep 2007 18:23:07
Message: <46f4444b$1@news.povray.org>
Kenneth wrote:
> 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?

The caveat is that in the Pixar paper, for each ray traced from the 
viewpoint, only one shadow ray is shot per light source, and only one 
reflective ray and one transparent ray gets shot.

The shadow ray is shot to some random point on the surface of the 
light_source; this neatly simulates an area light of any size or shape, 
and even one with different colors across its face.

The reflected ray can be given the strict reflection used in POV-Ray for 
a smooth reflection, or its direction can be jittered to simulate a 
blurred reflection.

Transparency can be calculated directly from the laws of refraction, or 
the refracted ray can be jittered in order to simulate a translucent 
interior.

Motion blur is set by selecting a random time within the time slice that 
represents the duration of the frame, and positioning everything 
according to that precise time for that ray shot.  There are tricks to 
prevent a complete re-parsing of the entire shot for this, and there are 
shortcuts that trade unneeded precision for speed.

Focal blur is done by selecting a focal point and then moving the origin 
of the ray by a random amount for each camera ray.

With the AA level set to 1x1, the results will be a very grainy image 
where these features are in force, but as the AA level climbs, the grain 
gets averaged out.  There are sampling methods that can reduce the 
graininess as well.  The paper reports that they seldom need more than 
64 samples per screen pixel.

The present POV-Ray method can involve an insane amount of rays shot, 
and the payoff is not necessarily cost-effective, because the 10x10 area 
light, necessary to make the shadows smooth, and the 4x4 spatial 
anti-aliasing necessary to remove the jaggies, multiply together to 
create 1600 shadow rays per pixel, which is probably overkill.

Regards,
John


Post a reply to this message

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